Add option to always inline .json type import #61614
Labels
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
Suggestion
An idea for TypeScript
π Search Terms
json type import inline library resolveJsonModule
β Viability Checklist
β Suggestion
Add a tsconfig.json option to force .json type imports to inline the inferred .json type, rather than preserve .json import inside emitted .d.ts
or always inline without introducing a new option
or enable #resolveJsonModule by default
π Motivating Example
JSON type imports are a very convenient feature for getting a type of localization strings to get intellisense when dealing with translation strings:
However, as a library author, that presents two issues because TypeScript may preserve the above type import in the .d.ts file:
π» Use Cases
related issues:
resolveJsonModule
doesn't copy source file when located withinnode_modules
subdirectoryΒ #43940The text was updated successfully, but these errors were encountered: