TypeScript: https.Request only contains .rawBody, no other properties
See original GitHub issueRelated issues
Nope
[REQUIRED] Version info
node: 12.14.0
firebase-functions: 3.3.0
firebase-tools: 7.7.0
firebase-admin: 7.11.0
[REQUIRED] Test case
functions.https.onRequest(async (request, response) => {
console.log(request.query) // Property query does not exist on type Request
return response.send("ok")
})
[REQUIRED] Steps to reproduce
…
[REQUIRED] Expected behavior
I expect the type query
to actually exist.
[REQUIRED] Actual behavior
functions.https.onRequest(async (request, response) => {
console.log(request.query) // Property query does not exist on type Request
return response.send("ok")
})
This has changed since I updated firebase-functions
from 3.0.1 to 3.3.0. Downgrading doesn’t seem to work. It is a typing issue with typescript.
Were you able to successfully deploy your functions?
Since I run TypeScript before deploying, no
Issue Analytics
- State:
- Created 4 years ago
- Reactions:11
- Comments:16 (3 by maintainers)
Top Results From Across the Web
Express missing properties when using typescript: rawBody
My temporary fix is to use the as keyword to tell the compiler to consider the req object as another type when you...
Read more >raw-body - npm
Gets the entire buffer of a stream either as a Buffer or a string. Validates the stream's length against an expected length and...
Read more >Documentation - ECMAScript Modules in Node.js - TypeScript
js files are interpreted as ES modules or CommonJS modules, and defaults to CommonJS when not set. When a file is considered an...
Read more >Types and Parameters - OpenAPI - Documentation | NestJS
Types and parameters. The SwaggerModule searches for all @Body() , @Query() , and @Param() decorators in route handlers to generate the API document....
Read more >TypeScript | Fastify 中文网
Plugins may or may not include typings. See Plugins for more information. We encourage users to send pull requests to improve typings support....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Same here after upgrading from
3.3.0
to3.6.0
. In my case, it complains about such code:Next findings: I had express installed next to
firebase-functions
. Deleting this from mypackage.json
resulted in a correct install offirebase-functions
, including@types/express-serve-static-core
. Therequest.query
typing problem persists though.