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).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.