export type Middleware = (context: C, next: () => Promise) => Promise | any; export declare class Stack { length: number; use(...middlewares: Middleware[]): this; execute(context?: C, depth?: number): any; mount(condition: (context: C) => boolean, stack: Stack): this; }