UNPKG

ts-agi

Version:

Write AGI-server quickly! (AGI - Asterisk Gateway Interface)

4 lines (3 loc) 279 B
export declare type Middleware<T> = (context: T, next: () => Promise<any>) => any; export declare type ComposedMiddleware<T> = (context: T, next?: () => Promise<any>) => Promise<void>; export declare function compose<T>(middlewares: Array<Middleware<T>>): ComposedMiddleware<T>;