@feathersjs/hooks
Version:
Async middleware for JavaScript and TypeScript
5 lines (4 loc) • 334 B
TypeScript
export type NextFunction = () => Promise<any>;
export type AsyncMiddleware<T = any> = (context: T, next: NextFunction) => Promise<any>;
export type Middleware<T = any> = AsyncMiddleware<T>;
export declare function compose<T = any>(middleware: AsyncMiddleware<T>[]): (this: any, context: T, next?: AsyncMiddleware<T>) => Promise<any>;