Is the following a correct usage of JSDoc on a class? The code is trivial but I'm more interested in if this is an idiomatic usage of it or I'm missing somethings:
class Person {
/**
* Create a Person
* @param {string} name
*
*/
constructor(name) {
this.name = name;
}
/**
* Print a salutation for that person
* @returns {number} The number 1 if successfully invoked
*/
say_hello() {
console.log(`Hello ${this.name}`);
return 1;
}
}
Additionally, I'm using VSCode, are there extensions that help with creating this boilerplate?