Microsoft/TypeScript

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

Open

#18.013 aperta il 24 ago 2017

Vedi su GitHub
 (1 commento) (1 reazione) (0 assegnatari)TypeScript (6726 fork)batch import
Domain: APIHelp WantedSuggestion

Metriche repository

Star
 (48.455 star)
Metriche merge PR
 (Merge medio 6g 17h) (9 PR mergiate in 30 g)

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