2025-09-05 14:59:21 +08:00

5 lines
253 B
TypeScript

export interface Middleware<ReqType> {
(request: ReqType, next: (req: ReqType) => void): void;
}
export declare function pipeline<ReqType>(handlers: Middleware<ReqType>[]): (request: ReqType, andThen?: ((req: ReqType) => void) | undefined) => void;