blob: 7c848af8b81201d396c787e72be9f194a7d9cc50 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
export interface Middleware<T> {
(context: T, next: ContinuationMiddleware<T>): any;
}
export interface ContinuationMiddleware<T> {
(context?: T, next?: Middleware<T>): any;
}
export declare function functionList<T = any>(list: Function | Function[], ...args: any[]): Middleware<T>[];
/**
* Create a function to invoke all passed middleware functions
* with a single argument <T>context
* @param middleware
*/
export declare function compose<T = any>(...middleware: (Middleware<T> | Middleware<T>[])[]): ContinuationMiddleware<T>;
|