From 4fa9fd98dc3fae34b8ffacfa7e7ace571680224c Mon Sep 17 00:00:00 2001 From: Ivan Lyons Date: Tue, 6 Nov 2018 14:49:09 +0800 Subject: [PATCH] [Koa] custom properties example: ``` const config = require('./config') const app = new Koa(); app.context.config = config; app.use((ctx, next) => { // use `config` object const config = ctx.config }) ``` --- types/koa/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/koa/index.d.ts b/types/koa/index.d.ts index ea6bd60a46..1cd6166f62 100644 --- a/types/koa/index.d.ts +++ b/types/koa/index.d.ts @@ -694,6 +694,7 @@ declare namespace Application { * To bypass Koa's built-in response handling, you may explicitly set `ctx.respond = false;` */ respond?: boolean; + [key: string]: any; } }