Μετάβαση στο περιεχόμενο

compileHandlerPlan

Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.

compileHandlerPlan(handlerType, kind, globalBehaviors?): object

Defined in: packages/pipeline/src/services/pipeline-setup.ts:131

Compiles the pipeline a handler class declares with @UsePipeline and @SkipPipeline, together with the global behaviors that match its kind.

AnyClass

DeclaredKind

GlobalBehaviorsOptions | GlobalBehaviorsOptions[]

object

behaviorTypes: Constructor<IPipelineBehavior<unknown, unknown>>[]

globalBehaviorIds: Set<BehaviorId>

globalOptions: Map<BehaviorId, Record<string, unknown>> = globals.globalOptions

handlerBehaviorTypes: Constructor<IPipelineBehavior<unknown, unknown>>[] | undefined

handlerOptions: Map<BehaviorId, Record<string, unknown>> | undefined

hasPipeline: boolean

mergedOptions: Map<BehaviorId, Record<string, unknown>>

Error when the handler both declares and skips one behavior.

const plan = compileHandlerPlan(CreateUserHandler, 'command', globalBehaviors);
plan.behaviorTypes; // [LoggingBehavior, AuditBehavior]