-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Exported types incompatible with ESM when using TypeScript@next #6801
Comments
This is mostly dupe of #4416. We don't offer native esm support in anywhere yet. |
@kwonoj Perhaps the title is misleading. This is more to do with the |
Related comment from the TS team.
(cc @andrewbranch) |
@benlesh thank you very much for merging the fix 🙂 Do you know when a new version may be released with it? |
@demurgos This was released just yesterday. |
Describe the bug
When importing
rxjs
in a project using TypeScript@next with the"module": "nodenext"
(experimental ESM support) it fails to locate the associated types. As seen in this TypeScript playground: Playground Link.Expected behavior
TypeScript@next is experimental so I suppose I don't expect it to work. But the API seems fairly stable, so I am raising this issue to track the change. The
exports
spec defines an optionaltypes
field, which if used in rxjs resolved the issue (I have tried this with a patch locally).Reproduction code
Reproduction URL
https://www.typescriptlang.org/play?target=99&moduleResolution=99&ts=4.6.0-dev.20220116#code/JYWwDg9gTgLgBAbzgeQEYGcCmUBuBDVAG0wBo4BlAV1QCtMBjeAXzgDMoIQ4ByKADxrpuAbiA
Version
7.4.0
Environment
Additional context
Related discussion in the TypeScript repo: microsoft/TypeScript#46452 (comment)
The text was updated successfully, but these errors were encountered: