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 Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
TContext |
TResult |
TEvent |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | TContext |
Returns
Section titled “Returns”AsyncGenerator<TEvent, TResult, undefined>