Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide metadata about TypeScript's available refactorings and quick fixes #34859

Open
mjbvz opened this issue Oct 31, 2019 · 4 comments
Open
Assignees
Labels
Committed The team has roadmapped this issue Rescheduled This issue was previously scheduled to an earlier milestone Suggestion An idea for TypeScript

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Oct 31, 2019

Problem

We are working on improving discoverability of JS/TS refactorings and quick fixes in VS Code. As part of this, we'd like to put together documentation and a new contribution points that lists out the code actions provided by TypeScript

At the moment, the only way I know to determine this list is to look through the TypeScript codebase.

Proposal

We'd like a way to get metadata about all the current TS quick fixes and code actions. The main information we are interested in:

  • Identifier for the quick fix
  • Human readable name / description for the quick fix
  • (possibly) A way to map this description to the localized description that TS ships with

Two ideas on how this could be exposed:

  • In the TS repo, check in a generated CodeActions.json file. This file would be updated whenever the refactorings or quick fixes change. VS Code would not need this to be published as part of the TypeScript package

  • Expose a command line option or tool to dump out all known refactorings and quick fixes.

/cc @orta Ryan mentioned you may also find this useful for the website

@mjbvz
Copy link
Contributor Author

mjbvz commented Nov 6, 2019

Here's how we plan on using this information on the VS Code side: microsoft/vscode#82718

@orta
Copy link
Contributor

orta commented Nov 7, 2019

Ah! Great - linking to microsoft/TypeScript-Website#48 - I can grab you this in a structured way so that I can use it for the site

@orta orta self-assigned this Nov 7, 2019
@orta
Copy link
Contributor

orta commented Nov 7, 2019

OK cool, looks like I can extract most of the things you want https://gist.github.com/orta/3f56c1aec87a419d2b4a2a542f1f0d5b - WIP branch

@RyanCavanaugh RyanCavanaugh added Committed The team has roadmapped this issue Suggestion An idea for TypeScript labels Nov 8, 2019
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 3.8.0 milestone Nov 8, 2019
@orta
Copy link
Contributor

orta commented Apr 14, 2020

Looks like there's no changes on VSCode side yet, punting to 4.x - will also try think about whether this info could get into the website now it's close to wrapping

@orta orta modified the milestones: TypeScript 3.9.1, TypeScript 4.0 Apr 14, 2020
@RyanCavanaugh RyanCavanaugh added the Rescheduled This issue was previously scheduled to an earlier milestone label Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Committed The team has roadmapped this issue Rescheduled This issue was previously scheduled to an earlier milestone Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

5 participants