mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-13 04:00:33 +08:00
* add request.body
* Update koa-bodyparser.d.ts
According to the documentation of `koa-bodyparser`:
```javascript
// the parsed body will store in this.request.body
// if nothing was parsed, body will be an empty object {}
ctx.body = ctx.request.body;
```
Therefore the `body` property will exit in the `request` object.
Changing the `body` property from optional to required can also fix the conflict problem in Koa's declaration file:
```ts
class Koa extend Request, Response {}
```