mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
14 lines
414 B
TypeScript
14 lines
414 B
TypeScript
import compose = require('koa-compose');
|
|
|
|
const fn1: compose.Middleware<any> = (context: any, next: () => Promise<void>): Promise<any> =>
|
|
Promise
|
|
.resolve(console.log('in fn1'))
|
|
.then(next);
|
|
|
|
const fn2: compose.Middleware<any> = (context: any, next: () => Promise<void>): Promise<any> =>
|
|
Promise
|
|
.resolve(console.log('in fn2'))
|
|
.then(next);
|
|
|
|
const fn = compose([fn1, fn2]);
|