I have a class in which individual methods can be called statically, but will return a new instance of the class for the chain, for example:
var builder = ns .setState('a', 'A') .setState('b', 'B');
Where Builder is defined as such:
function Builder() { this.state = { query: {} }; } Builder.prototype = { setState: function(k, v) { var that = (this instanceof Builder) ? this : new Builder(); that[k] = v; return that; }
The Builder constructor should never be explicitly called by user code, and therefore I would like it to not appear in documents. However, all the combinations that I tried to use with JSDoc tags (e.g. @constructs , @constructs , etc.) seem to be unable to suppress it from inline documents.
javascript private constructor jsdoc
Justin makeig
source share