export interface Middleware { (context: T, next: ContinuationMiddleware): any; } export interface ContinuationMiddleware { (context?: T, next?: Middleware): any; } export declare function functionList(list: Function | Function[], ...args: any[]): Middleware[]; /** * Create a function to invoke all passed middleware functions * with a single argument context * @param middleware */ export declare function compose(...middleware: (Middleware | Middleware[])[]): ContinuationMiddleware;