export type MiddleWareInterceptor = (...args: I) => O | Promise; export type MiddleWareOptions = { cwd: string; }; export declare class MiddleWare { #private; private readonly options; constructor(options: MiddleWareOptions); match(patterns: string | string[], callback: MiddleWareInterceptor): this; when(pth: string, ...inputs: I): Promise; }