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
Used in the nestjs (typescript) framework, the ts compiler tells you that the types do not match #10600
Comments
I also had the same problem with |
I guess upgrading fastify would fix that. #10583 |
in my given minimum reproduction code I use latest fastify, but this is due to |
|
When can it be applied |
when Kamil is available to review and approve it. |
OK |
Is there an existing issue for this?
Current behavior
Used in the nestjs (typescript) framework, the ts compiler tells you that the types do not match
as shown in the picture
I have to use type assertion like this
If I don't do this, I will get a type validation error
Minimum reproduction code
https://stackblitz.com/edit/nestjs-typescript-starter-yffp2u?file=src/main.ts
Steps to reproduce
modify
src/main.ts
toyou will get a type error
Expected behavior
like this
app.register(fastifyHelmet);
and no type errorPackage
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
fastify
NestJS version
No response
Packages versions
Node.js version
16.17.0
In which operating systems have you tested?
Other
I tried looking for a solution in the fastify-helmet repository, but I realized that I seemed to be looking in the wrong place, because the default fastify works fine
Later I forked the nestjs project and manually changed the fastify version locally. After building, I got the expected results in 10-fastify. Should I submit a PR?
The text was updated successfully, but these errors were encountered: