Microsoft/TypeScript

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

Open

#18,013 创建于 2017年8月24日

在 GitHub 查看
 (1 评论) (1 反应) (0 负责人)TypeScript (48,455 star) (6,726 fork)batch import
Domain: APIHelp WantedSuggestion

描述

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.

贡献者指南