-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Declaration emit can't utilize exports map information and ends up reporting "this is likely not portable" #56107
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
Comments
The compiler architecture doesn’t allow for loading more files after program construction. We’d have to include all |
On closer inspection, I think this is not the same as the issue in #56174 |
This is quite hard to manage though. With inference on it's hard to know what we depend on and if any private modules are used. In this case, the declaration emit of the package itself was done just fine - the problem raised in the consuming project. I see how this might be hard to fix with the mentioned design limitation in mind but, damn, we lack some early errors
This sounds like something we could do. I wonder - should it be OK to reference an ESM path from a CJS declaration file? |
You need a |
🔎 Search Terms
declaration emit nodenext exports map package.json inferred type annotation necessary
🕗 Version & Regression Information
⏯ Playground Link
No response
💻 Code
🙁 Actual behavior
🙂 Expected behavior
Additional information about the issue
I think that it would be best if the listed
exports
entries (especially the ones not relying on wildcards but the wildcard support would also be nice) could be automatically loaded by the compiler at some stage of the declaration emit.In this case, this would allow the compiler to discover
effect/Types
andeffect/Equal
andgetAlternativeContainingModules
could return them.cc @andrewbranch as
package.json#exports
is your turf 😉The text was updated successfully, but these errors were encountered: