What is the correct JSDoc syntax for a local variable?
I usually use something like the code below in my projects.
function example() {
/**
* Need to explain the purpose of X here.
* @type {number}
*/
var X = 100;
...
/**
* Need to explain the purpose of Y here.
* @type {string}
*/
var Y = 'abc';
...
return Z;
}
one liner:
/** @type {string} */
let Y = 'abc';