mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
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:
Vendored
+4
-4
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user