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