Update koa-bodyparser

Parsed body should be `unknown` type (simulated until release in
Typescript 3.0). Any manipulations on `body` should come with type
assertions and/or verification. Note, this is a major change, and a
significant tightening of type safety.
This commit is contained in:
Anup Kishore
2018-06-06 15:17:01 -04:00
parent b3cad84aa3
commit 9f22f5e16e
+4 -4
View File
@@ -1,6 +1,6 @@
// Type definitions for koa-bodyparser 4.2
// Type definitions for koa-bodyparser 5.0
// Project: https://github.com/koajs/bodyparser
// Definitions by: Jerry Chin <https://github.com/hellopao>
// Definitions by: Jerry Chin <https://github.com/hellopao>, Anup Kishore <https://github.com/anup-2s>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -18,8 +18,8 @@ import * as Koa from "koa";
declare module "koa" {
interface Request {
body: any;
rawBody: any;
body: {} | null | undefined;
rawBody: {} | null | undefined;
}
}