-
-
Notifications
You must be signed in to change notification settings - Fork 310
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
d.ts imports contain invalid and redundant file extensions #222
Comments
Thanks @ErkoKnoll I'll be publishing a release shortly where all .d.ts files in the types folder contain no file extensions. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
d.ts imports contain file extensions that are redundant and invalid, which makes loading type definitions in some systems work incorrectly.
For example: https://unpkg.com/browse/[email protected]/dist/types/jwt/sign.d.ts type definition has 2 following imports:
When specified like this, with an extension, some systems may try to find these imports explicitly with these extensions, but files with such extensions don't exist in relative to the path. However there are files with
jwt_producer.d.ts
andtypes.d.ts
.It probably is better to simply remove these extensions as then it should still continue to work, whereas most systems will then try to find imports with several extensions, including
.d.ts
for type definitions,.ts
for sources and.js
for transpiled JS files. Change probably should be done at the source level, as the imports in type definitions are reflections of the source, and the source is written in TS, but uses explicit.js
or.d
import extensions.To Reproduce
This issue is present in AutoBlocks online editor (Monaco based). While we monkey patched it currently to work more or less correctly, then there are still some weird issues where types are not being loaded correctly by Monaco editor. I can provide additional steps to try it out in AutoBlocks environment if needed.
jose
too.The text was updated successfully, but these errors were encountered: