Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript Typing for second param (request) is wrong #60

Closed
patarapolw opened this issue May 15, 2020 · 2 comments
Closed

TypeScript Typing for second param (request) is wrong #60

patarapolw opened this issue May 15, 2020 · 2 comments

Comments

@patarapolw
Copy link

patarapolw commented May 15, 2020

🐛 Bug Report

It seems not to be FastifyRequest

  • It does not have req.params. (I now know it is in the third (3rd) params)
  • req.log is undefined, not Pino Logger. I have to import Pino (and install both pino and @types/pino) directly to activate logging.

Expected behavior

  • Please append logger to req.
  • Do not use Typing for FastifyRequest if it does not have params nor log.

Your Environment

  • node version: 10, 12 (tested with both)
  • fastify version:
    "fastify": "^2.14.1",
    "fastify-cors": "^3.0.3",
    "fastify-file-upload": "^2.0.1",
    "fastify-helmet": "^3.0.2",
    "fastify-oas": "^2.7.0",
    "fastify-static": "^2.7.0",
    "fastify-websocket": "^1.1.2",
  • os: macOS Catalina
@mcollina
Copy link
Member

Would you mind to send a PR? The 1.x branch is in https://github.com/fastify/fastify-websocket/commits/v1.x.

@airhorns
Copy link
Member

airhorns commented Jul 8, 2020

This is fixed now!

@mcollina mcollina closed this as completed Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants