mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
add definitions for koa-compose
This commit is contained in:
Vendored
+20
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user