export declare type NextFunction = () => Promise; export declare type Middleware = (context: T, next: NextFunction) => Promise; export declare function compose(middleware: Middleware[]): (this: any, context: T, next?: Middleware | undefined) => Promise;