microsoft / microsoft/TypeScript
Suggestion: Change `Diagnostic.file` to be `SourceFileLike` instead of `SourceFile`.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the definition and consumers of Diagnostic.file, then compare the requirements imposed by tsserver with SourceFileLike and SourceMapSource. Done means the minimal plugin-facing contract is agreed and the public type change is validated across diagnostic consumers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, compilers
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100