add definitions for koa-compose

This commit is contained in:
jKey Lu
2016-02-13 22:04:32 +08:00
parent bcd5761826
commit 59cdd05b80
4 changed files with 73 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
// 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;
module compose {
interface Middleware {
(context: any, next?: () => Promise<void>): Promise<any>;
}
interface ComposedMiddleware {
(context: any): Promise<void>;
}
}
export = compose;
}