-
Notifications
You must be signed in to change notification settings - Fork 373
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
TS1479, helmet typings issue in combination with fastify #389
Comments
This looks like an issue with |
@EvanHahn |
Do you experience this problem with Helmet directly, or just fastify-helmet?
|
Yes.
|
Thanks. I'm able to reproduce the problem, but I think this working as expected. I don't think you should be able to Does that help? |
No, it is the problem of mis-match of types.
|
If you add Thus, the problem is not solved at all. But bring to a runtime error. |
Are there libraries that do a better job here? I have had trouble making things work seamlessly with CommonJS + ESM + TypeScript. |
Not the best example, but it is how I do in So, the easiest way should be emit proper |
Maybe this should be reopened, since issue still exists, and requires a solution? |
Done! I won't have time to investigate this in 2022. If anyone would like to submit a pull request, I'm happy to take a look! |
Still a problem, for anyone who comes across this issue. TS5 + Nodejs 19 |
I believe I have fixed this in #405. Please try that to see if it fixes your issue. |
@EvanHahn sorry, but I'm still getting the error:
|
Thanks for testing this. What does your |
{ |
Thanks. I am working on a fix for this. |
This should be fixed in |
@EvanHahn - yes, it's working now, thank you! |
In combination with fastify, I get this error.
fastify/fastify-helmet#210
Prerequisites
Fastify version
4.10.2
Plugin version
10.1.0
Node.js version
16.17.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
22.04
Description
It seems that we get typescript errors, because the typings from helmet are ecmascript and not commonjs
Steps to Reproduce
clone https://github.com/Uzlopak/nodenext-mvce/tree/helmet-issue
npm run build
Expected Behavior
Should not throw
The text was updated successfully, but these errors were encountered: