From 5950b10aed88f4fc785a6e92158603f4d6713e41 Mon Sep 17 00:00:00 2001 From: Guillaume Mayer Date: Fri, 4 Jan 2019 11:48:30 -0300 Subject: [PATCH 1/2] failing test (sort of) --- types/koa-router/koa-router-tests.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/koa-router/koa-router-tests.ts b/types/koa-router/koa-router-tests.ts index 51e95fb8a5..50e66509ea 100644 --- a/types/koa-router/koa-router-tests.ts +++ b/types/koa-router/koa-router-tests.ts @@ -49,6 +49,10 @@ const match = router.match('/users/:id', 'GET'); let layer: Router.Layer let layerOptions: Router.ILayerOptions +const mw: Router.IMiddleware = (ctx: Router.IRouterContext, next: () => Promise) => { + ctx.body = "Ok"; +}; + app.use(router.routes()); app.use(router.allowedMethods()); From 6e13e6088f3eab8874141412f27d23a6c6d4975a Mon Sep 17 00:00:00 2001 From: Guillaume Mayer Date: Fri, 4 Jan 2019 11:49:20 -0300 Subject: [PATCH 2/2] fix --- types/koa-router/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/koa-router/index.d.ts b/types/koa-router/index.d.ts index 81b0f697e6..b2163d09d1 100644 --- a/types/koa-router/index.d.ts +++ b/types/koa-router/index.d.ts @@ -43,7 +43,7 @@ declare namespace Router { strict?: boolean; } - export interface IRouterContext { + export interface IRouterContext extends Koa.Context { /** * url params */