"Add explicit type" refactoring #865
Labels
🙅 Require better TypeChecker
This refactoring would need Abracadabra to determine types faster and better than it can do
✨ Feature
New refactoring or feature
Is this request related to a problem? Please describe.
In short, this is to go from
const foo = {...}
toconst foo: Thinginator<Thing | string> = {...}
.Pretty often I find myself seeing what type is inferred for my variables. The type inference usually works great, but here are some use cases where I like to type out the explicit type:
For functions it's already possible to add the return type with another refactoring.
Describe the solution you'd like
I would like to have a refactoring for this, such as "Add explicit type" or "Add type"
Additional context
Currently I do this by hovering the variable name with my mouse in order to bring up this popup (can also do it with with
⌘K ⌘I
), and then selecting the contents with the mouse to copy them with⌘C
😄Here's a picture:
To be clear, here's what I would like to see after applying a refactoring for this:
The text was updated successfully, but these errors were encountered: