If I have some function like this:
const function = (param: string) => {
// ...
}
Now in VS Code if I start typing /** above so that it generates the docs, it gives this:
/**
*
* @param param
*/
const function = (param: string) => {
// ...
}
But I want it to also automatically generate the type from the typescript information, like this:
/**
*
* @param {string} param
*/
const function = (param: string) => {
// ...
}
Is this possible?
There is a VS-Code extension called Document This which will do the trick for you
It creates
/**
*
*
* @param {string} param
*/
const f = (param: string) => {
// ...
}
from
const f = (param: string) => {
// ...
}
by positioning the cursor above the function and executing Ctrl+Alt+D twice
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