Type Alias: Executor()<MiddlewareFn>
ts
type Executor<MiddlewareFn> = (
middleware: MiddlewareFn,
next: NextFn,
) => Promise<any>;The executor function responsible for invoking each middleware handler.
The executor gives you control over how middleware functions are called, allowing you to pass custom context and parameters to each handler.
Type Parameters
| Type Parameter | Description |
|---|---|
MiddlewareFn extends any | The type of the middleware function/handler |
Parameters
| Parameter | Type | Description |
|---|---|---|
middleware | MiddlewareFn | The current middleware handler to execute |
next | NextFn | The next function to advance the pipeline |
Returns
Promise<any>