class Config {
/**
* @memberof Config
* @public
* @member {String} name
*/
static get name() {}
/**
* @memberof Config
* @public
* @member {String} name
*/
get name() {return this._name;}
/**
* @memberof Config
* @public
* @param {string} name
*/
set name(name) {this._name = name;}
}
Is it right?
I have not find differents between static getter and getter.
You should only document one of the getters/setters, or the same member will show up multiple times in your docs. Here's the correct way to do it:
/** Config class. */
class Config {
/**
* @type {string}
*/
static get name() {}
get name() {return this._name;}
set name(name) {this._name = name;}
}
If you comment the static getter, the docs will show that the member is static.
(In the future, please send questions to the jsdoc-users mailing list. The issue tracker is for bug reports and feature requests. Thanks!)
Most helpful comment
You should only document one of the getters/setters, or the same member will show up multiple times in your docs. Here's the correct way to do it:
If you comment the static getter, the docs will show that the member is static.
(In the future, please send questions to the jsdoc-users mailing list. The issue tracker is for bug reports and feature requests. Thanks!)