I want to have a Quick Fix action (cmd + .
) that adds the explicit type to a field, parameter, or function return (where it is otherwise inferred).
To turn
const specificQuesiton = await Question.query().findById(1)
into
const specificQuesiton: Question = await Question.query().findById(1)
Found one!
https://marketplace.visualstudio.com/items?itemName=nick-lvov-dev.typescript-explicit-types
Here's an example of it in action:
I also found this one which just does return type (the one above does everything).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With