Microsoft/TypeScript

Suggestion: Change `Diagnostic.file` to be `SourceFileLike` instead of `SourceFile`.

Aperta

#18.013 aperta il 24 ago 2017

 (1 commento) (1 reazione) (0 assegnatari)TypeScript (13.395 fork)batch import
Domain: APIHelp WantedSuggestion

Metriche repository

Star
 (108.860 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Diagnostic.file is of type SourceFile which forces plugins to cast a non-SourceFile to a SourceFile to report diagnostic messages and guess which parts of SourceFile are not used by tsserver.

Consider changing file to be something like SourceFileLIke or SourceMapSource that specifies the exact requirements that must be supplied by plugins for this field.

Guida contributor