Is there a build-in way to describe function arguments and what it do for IDE, so when you hover on it in vscode, you will get tooltip?
Something like:
function foo(x //integer){
return x*2 //return square
}
Join Stack Overflow to learn, share knowledge, and build your career.
Is there a build-in way to describe function arguments and what it do for IDE, so when you hover on it in vscode, you will get tooltip?
Something like:
function foo(x //integer){
return x*2 //return square
}
VSCode supports JSDoc:
/**
*
* @param {number} x A value to be doubled
* @return {number} Twice x.
*
*/
function foo(x){
return x*2
}
const y = foo(2);
(Tested with the language set to Babel JavaScript)