mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
21 lines
578 B
TypeScript
21 lines
578 B
TypeScript
// Type definitions for koa v3.0.0
|
|
// Project: https://github.com/koajs/compose
|
|
// Definitions by: jKey Lu <https://github.com/jkeylu>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
declare module "koa-compose" {
|
|
function compose(middleware: compose.Middleware[]): compose.ComposedMiddleware;
|
|
|
|
namespace compose {
|
|
interface Middleware {
|
|
(context: any, next?: () => Promise<void>): Promise<any>;
|
|
}
|
|
|
|
interface ComposedMiddleware {
|
|
(context: any): Promise<void>;
|
|
}
|
|
}
|
|
|
|
export = compose;
|
|
}
|