UNPKG

@zodash/compose

Version:
9 lines (8 loc) 311 B
export declare type Middleware<C> = (context: C, next?: Next) => Promise<any>; export declare type Next = () => Promise<void>; /** * Compose function * * @param middlewares componse functions */ export declare function compose<C>(...middlewares: Middleware<C>[]): (context: C, next?: Next) => Promise<any>;