I have a JavaScript singleton defined as:
/**
* A description here
* @class
*/
.mydomain.ClassName = (function(){
/**
* @constructor
* @lends .mydomain.ClassName
*/
var ClassName = function(){};
/**
* method description
* @public
* @lends .mydomain.ClassName
*/
ClassName.prototype.method1 = function(){};
return new ClassName();
})();
No warnings are printed in verbose mode (-v), but the documentation reports only ".mydomain.ClassName()" with "A description here" as description... how can I generate documentation for ClassName's methods too?
I have a JavaScript singleton defined as:
/**
* A description here
* @class
*/
.mydomain.ClassName = (function(){
/**
* @constructor
* @lends .mydomain.ClassName
*/
var ClassName = function(){};
/**
* method description
* @public
* @lends .mydomain.ClassName
*/
ClassName.prototype.method1 = function(){};
return new ClassName();
})();
No warnings are printed in verbose mode (-v), but the documentation reports only ".mydomain.ClassName()" with "A description here" as description... how can I generate documentation for ClassName's methods too?
Share Improve this question asked Sep 7, 2012 at 10:05 daveoncodedaveoncode 19.6k19 gold badges108 silver badges162 bronze badges1 Answer
Reset to default 7I solved! :)
/**
* A description here
* @class
*/
.mydomain.ClassName = (function(){
/**
* @constructor
* @name .mydomain.ClassName
*/
var ClassName = function(){};
/**
* method description
* @public
* @name .mydomain.ClassName.method1
*/
ClassName.prototype.method1 = function(){};
return new ClassName();
})();
I just replaced @lends with @name!
UPDATE: the right approach in order to have the full documentation is the following:
/**
* A description here
* @class
*/
.mydomain.ClassName = (function(){
var ClassName = function(){};
/**
* method description
* @memberOf .mydomain.ClassName
*/
ClassName.prototype.method1 = function(){};
return new ClassName();
})();