microsoft / microsoft/TypeScript

tsserver: deprecate getSupportedCodeFixes, add fixable property to Diagnostic

Open
#29,051 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Domain: API Domain: LS: Quick Fixes In Discussion Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

This proposes an alternative to #29010. Making getSupportedCodeFixes proxy-able by plugins means the client has to request the list of fixable error codes for each file - and theoretically everytime the program is updated (because the configuration of a plugin could have changed).

Could we instead just add a new property fixable to Diagnostic?
That makes getSupportedCodeFixes obsolete. Fixable error codes no longer need to be known in advance, which would also resolve #28990.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the alternatives in #29010 and the problem described in #28990, then review the tsserver Diagnostic and getSupportedCodeFixes API context. Done means reaching agreement on whether a fixable Diagnostic property should replace getSupportedCodeFixes and documenting the resulting API changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.