Closed cuttin-n-pastin closed 5 months ago
Reference directives are just another way to include a file in a project; they do not have the power to make ambient types only visible in a single file.
Thank you for your answer. The existing documentation does not make that clear.
What can I use to reference specific ambient types per .js file (that uses JSDoc syntax)?
There isn't a way to do that; you'd need separate tsconfigs
This issue has been marked as "Question" and has seen no recent activity. It has been automatically closed for house-keeping purposes.
🔎 Search Terms
ambient reference
🕗 Version & Regression Information
⏯ Playground Link
https://github.com/cuttin-n-pastin/tsjsdocref-repro
💻 Code
[package.json]
[tsconfig.json]
[types/index.d.ts]
[f1.js]
[f2.js]
🙁 Actual behavior
🙂 Expected behavior
Additional information about the issue
No response