/** * Flow Hook Decorators * * This module provides decorators for defining flow stages and lifecycle hooks. * Supports both legacy TypeScript decorators and TC39 Stage 3 decorators. */ import { type FlowName, type HookMetadata, type HookOptions } from '../metadata'; /** * Resolve all pending TC39 hooks for a class by scanning its prototype * This is called by collectFlowHookMap during flow registration */ export declare function resolvePendingTC39HooksForClass(ctor: Function): HookMetadata[]; /** * Creates a typed Stage hook decorator for a specific flow * @example * ```typescript * const { Stage } = FlowHooksOf('http:request'); * * class HttpRequestFlow { * @Stage('checkAuthorization') * async checkAuthorization() { ... } * } * ``` */ export declare function StageHookOf(flow: Name): (stage: ExtendFlows[Name]["stage"], opts?: HookOptions) => MethodDecorator; /** * Creates a typed Will hook decorator (runs before stage) */ export declare function WillHookOf(flow: Name): (stage: ExtendFlows[Name]["stage"], opts?: HookOptions) => MethodDecorator; /** * Creates a typed Did hook decorator (runs after stage) */ export declare function DidHookOf(flow: Name): (stage: ExtendFlows[Name]["stage"], opts?: HookOptions) => MethodDecorator; /** * Creates a typed Around hook decorator (wraps stage execution) */ export declare function AroundHookOf(name: Name): (stage: ExtendFlows[Name]["stage"], opts?: HookOptions) => MethodDecorator; /** * Creates all hook decorators for a specific flow * @example * ```typescript * const { Stage, Will, Did, Around } = FlowHooksOf('http:request'); * * class HttpRequestFlow { * @Stage('checkAuthorization') * async checkAuthorization() { ... } * * @Will('execute', { priority: 10 }) * async beforeExecute() { ... } * } * ``` */ export declare function FlowHooksOf(name: Name): { Stage: (stage: ExtendFlows[Name]["stage"], opts?: HookOptions) => MethodDecorator; Will: (stage: ExtendFlows[Name]["stage"], opts?: HookOptions) => MethodDecorator; Did: (stage: ExtendFlows[Name]["stage"], opts?: HookOptions) => MethodDecorator; Around: (stage: ExtendFlows[Name]["stage"], opts?: HookOptions) => MethodDecorator; }; //# sourceMappingURL=hook.decorator.d.ts.map