Skip to content

MiddlewareNext

type MiddlewareNext<TContext, TResult, TEvent> = (context) => AsyncGenerator<TEvent, TResult, undefined>;

Defined in: src/middleware/types.ts:59

The next function passed to middleware. Returns an async generator that yields events of type TEvent and returns the stage result. Middleware can choose not to call next to short-circuit execution.

Type Parameter
TContext
TResult
TEvent
ParameterType
contextTContext

AsyncGenerator<TEvent, TResult, undefined>