MiddlewareStage
Defined in: src/middleware/types.ts:8
A stage token that identifies a middleware interception point.
Stages are created via createStage() and carry their Context/Event/Result types
as generics, enabling full type inference at registration sites.
Third parties can create custom stages — the SDK does not maintain a closed set.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
TContext |
TResult |
TEvent |
Properties
Section titled “Properties”readonly name: string;Defined in: src/middleware/types.ts:10
Human-readable name for debugging and logging.
readonly Input: MiddlewareInputPhase<TContext, TResult, TEvent>;Defined in: src/middleware/types.ts:14
Phase sub-token: transform context before execution.
readonly Wrap: MiddlewareWrapPhase<TContext, TResult, TEvent>;Defined in: src/middleware/types.ts:16
Phase sub-token: full async generator wrap (before + call next + after).
Output
Section titled “Output”readonly Output: MiddlewareOutputPhase<TContext, TResult, TEvent>;Defined in: src/middleware/types.ts:18
Phase sub-token: transform result after execution.