@samselikoff wrote:
Let’s say I have a class:
/** The Mirage server. @class Server @public */ export default class Server { constructor(options = {}) { this.namespace = options.namespace ''; } }
What would be the best way to use JSDoc to document the
namespace
property?One thought was to define a new getter:
export default class Server { constructor(options = {}) { this._namespace = options.namespace ''; } /** @property namespace @type String @public */ get namespace() { return this._namespace; } }
Are there any other project doing this? Any established best practices or conventions?
Posts: 1
Participants: 1