[Jsdoc-user] Hiding constructor details
Status: Inactive
Brought to you by:
mmathews
|
From: Bruce B. <br...@br...> - 2007-03-24 16:07:32
|
Hi,
I'm using JSDoc to document a public API I am creating. Some of the
objects I am documenting will not be instantiable by the user. These
objects may be obtained via other public methods, so it is important to
document their methods. I would like to hide their constructor details
though. If I add the @ignore or @private tags to the constructor
documentation block (which contains the class documentation), the entire
class is omitted. If I omit the constructor documentation entirely, I
cannot add class documentation.
What should I be doing to hide only my constructors? I show sample code
below:
/**
* @class A TestInstance object is...
*/
TEST.TestInstance = function(identifier) {
this.init(identifier);
};
TEST.TestInstance.prototype = {
init: function(identifier) {
var id = identifier;
this._foo = function() {
alert(id);
};
},
/**
* Alert the identifier.
* @method Foo
*/
foo: function() {
return this._foo();
}
};
Bruce
|