From 5ddf047b2d3da0fc279cf391689917cbd3119574 Mon Sep 17 00:00:00 2001 From: Gady Date: Tue, 4 Jun 2019 20:44:11 +0000 Subject: [PATCH] [express] Add latest types for express.raw (#35787) * Add express.raw type * Add express.text type * Don't use patch number --- types/express/index.d.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/types/express/index.d.ts b/types/express/index.d.ts index ddc4509805..37855b887b 100644 --- a/types/express/index.d.ts +++ b/types/express/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for Express 4.16 +// Type definitions for Express 4.17 // Project: http://expressjs.com // Definitions by: Boris Yankov // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -30,6 +30,18 @@ declare namespace e { */ var json: typeof bodyParser.json; + /** + * This is a built-in middleware function in Express. It parses incoming requests with Buffer payloads and is based on body-parser. + * @since 4.17.0 + */ + var raw: typeof bodyParser.raw; + + /** + * This is a built-in middleware function in Express. It parses incoming requests with text payloads and is based on body-parser. + * @since 4.17.0 + */ + var text: typeof bodyParser.text; + /** * These are the exposed prototypes. */