UNPKG

658 BTypeScriptView Raw
1/**
2 * An array of arguments + the next function
3 */
4export declare type MiddlewareArgs = any[];
5/**
6 * The middleware actual function
7 */
8export declare type MiddlewareFn = (...params: MiddlewareArgs) => Promise<void>;
9/**
10 * Executor job is to execute one middleware function at a
11 * time and pass arguments to it
12 */
13export declare type Executor = (fn: any, params: MiddlewareArgs) => Promise<void>;
14/**
15 * Args received by the final handler
16 */
17export declare type FinalHandlerArgs = any[];
18/**
19 * Final handler is called when the entire chain executes
20 * completely
21 */
22export declare type FinalHandler = (...params: FinalHandlerArgs) => Promise<void>;