Closed ufec closed 1 year ago
I also had the same problem with @fastify/compress
I guess upgrading fastify would fix that. #10583
I guess upgrading fastify would fix that. #10583
in my given minimum reproduction code
I use latest fastify, but this is due to
packages/platform-fastify/package.json
The version of fastify that this file depends on is too low. I tried to submit a PR #10601 but it was closed
but it was closed
https://github.com/nestjs/nest/pull/10601#issuecomment-1327965186
but it was closed
When can it be applied
when Kamil is available to review and approve it.
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
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?