-
Notifications
You must be signed in to change notification settings - Fork 21
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
Imports in .d.ts file lack .js extension making them fail to typecheck #35
Comments
You most likely have some TS configuration that requires it, best to set |
I do have I believe the rule in TypeScript with regards to |
I don't have this issue in any of my projects, using it right now. This issue also hasn't been reported by anyone up until now, so there must be something in your config or setup. Happy to have a quick look if your provide me a minimal repro in StackBlitz or wherever you prefer. |
It has to do with my use of It also mentions this when I hover "NodeNext" in my tsconfig:
I finally found it needing
And:
And also:
Meaning The minimal way to reproduce this issue ( {
"compilerOptions": {
"skipLibCheck": true,
"module": "NodeNext",
"moduleResolution": "NodeNext"
}
} BTW here is another project for which a similar problem has been reported: lingui/js-lingui#1363 |
Thanks for the details, appreciate it. I'll get it fixed tomorrow! |
Awesome! This seems to be an interesting library to be able to use signals like those of Solid, on the server side as well, without having to patch Solid into believing it should be using the web build on the server, which feels like a hack. The key difference between In that sense, my use of the more strict And given what I am building is a library too, I really want to keep with |
None of the examples pass the TypeScript (5.5.2 in my case) checker due to package.json having set
"type": "module"
yet referencing imports without extensions. This causes TypeScript to fail to resolve the files, and causes core functions likesignal
(a re-export from./signals
) to fail. If I patch the.d.ts
files to include the.js
extension to the imports, TypeScript is able to resolve them again and properly typechecks.The text was updated successfully, but these errors were encountered: