mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 07:40:10 +00:00
[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
})
```
This commit is contained in:
1
types/koa/index.d.ts
vendored
1
types/koa/index.d.ts
vendored
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user