-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
declaration emit uses absolute path when inferring type #54743
Comments
Both I'd recommend unsetting |
From
I can only second that. I had multiple terrible experiences with |
It's also pretty easy to fall into the trap of adding
Then why does TypeScript then complain that it can't find the module at |
If you take Project A under settings X, produce a .d.ts file, and try to consume it from Project B under settings Y, then it's entirely possible that differences between X and Y (or even file layout changes) mean that a module specifier that works in A doesn't work in B. |
It was emitted and consumed by the same project that used incremental builds. I reduced it to just highlight the incorrect emission. |
This issue has been marked as "Not a Defect" and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
`baseUrl` is not supposed to be used for catch-all resolutions. It's not recommended outside of AMD modules: https://www.typescriptlang.org/tsconfig#baseUrl microsoft/TypeScript#54743 has some more context.
`baseUrl` is not supposed to be used for catch-all resolutions. It's not recommended outside of AMD modules: https://www.typescriptlang.org/tsconfig#baseUrl microsoft/TypeScript#54743 has some more context.
Bug Report
🔎 Search Terms
emit declaration path
Similar to #38111 but #38111 uses the same source for
import
whereas the repro here uses differentimport
sources.🕗 Version & Regression Information
⏯ Playground Link
Repro: https://github.com/eps1lon/ts-proj-references-abs-path-repro
Spans multiple files which is not suitable for Playground
💻 Code
useDialogNavigation.ts
(emits expected package identifier import)// useNavigationEvents.ts (emits unexpected path import)
// tsconfig.json
// tsconfig.base.json
🙁 Actual behavior
One file uses
import("@klapp/navigation")
while another usesimport("packages/navigation")
🙂 Expected behavior
Both use
import("@klapp/navigation")
The text was updated successfully, but these errors were encountered: