import type { StartOptions } from './types';
import type { InitializationContext } from './initialization';
/**
 * 中间件类型
 */
export type Middleware = (options: StartOptions, next: () => Promise<InitializationContext>) => Promise<InitializationContext>;
/**
 * 中间件管理器
 */
export declare class MiddlewareManager {
    private middlewares;
    /**
     * 添加中间件
     */
    use(middleware: Middleware): void;
    /**
     * 移除中间件
     */
    remove(middleware: Middleware): void;
    /**
     * 清空所有中间件
     */
    clear(): void;
    /**
     * 执行中间件链
     */
    execute(options: StartOptions, finalHandler: () => Promise<InitializationContext>): Promise<InitializationContext>;
    /**
     * 获取中间件数量
     */
    get count(): number;
}
/**
 * 默认中间件管理器
 */
export declare const middlewareManager: MiddlewareManager;
//# sourceMappingURL=middleware.d.ts.map