[transpileDeclaration API] What to do about "has or is using private name" diagnostics #58496
Closed
6 tasks done
Labels
Domain: ts.transpileDeclaration
Issues regarding the transpileDeclaration API, which do not reproduce without it
Help Wanted
You can do this
Possible Improvement
The current behavior isn't wrong, but it's possible to see that it might be better in some cases
Milestone
π Search Terms
isolated declarations transpile transpiledeclaration diagnostic private name
β Viability Checklist
β Suggestion
Either make
ts.transpileDeclaration
not report "has or is using private name" diagnostics, or provide a method to easily check whether a diagnostic is related to private names.π Motivating Example
Usage of ts.transpileDeclaration for any project with isolatedDeclarations
π» Use Cases
ts.transpileDeclaration
will report usage of global types such asPick
,Omit
,Promise
, or project-specific ones, as using private names. These are not really actionable, so I wonder if these diagnostics should just not be reported at all. What I've been doing is to just filter them out. The structured way of doing that is checking the diagnostic code, but there are so many codes to check that I decided to take a more unstructured approach by just checkingdiagnostic.messageText.includes('private name')
. So at the very least, if these diagnostics will continue to be reported, it would be nice if there was some boolean method that says whether or not a given diagnostic is related to private names.The text was updated successfully, but these errors were encountered: