[ID-Prep] Preserve all triple slash directives in declarations files #57439
Labels
Breaking Change
Would introduce errors in existing code
Bug
A bug in TypeScript
Fix Available
A PR has been opened for this issue
Help Wanted
You can do this
Suggestion
An idea for TypeScript
Milestone
The [ID-prep] set of issues aligns Declaration Emit with the forthcoming Isolated Declarations feature.
π Search Terms
preserve triple slash directives
β Viability Checklist
β Suggestion
Right now TypeScript will remove unused
/// <reference types="..." />
directives.π Motivating Example
Playground
π» Use Cases
Preserving all references would make it easier for other tools to create the same output as typescript for declaration files
Other tools don't have enough type information to determine if the reference is used or not if they only look at one file.
What workarounds are you using in the meantime?
Currently other tools can't emit declaration files.
The text was updated successfully, but these errors were encountered: