JSDoc and JavaScript singleton documentation

為{幸葍}努か 提交于 2019-12-04 06:58:33

I solved! :)

  /**
 * A description here
 * @class
 */
com.mydomain.ClassName = (function(){

/**
 * @constructor
 * @name com.mydomain.ClassName
 */ 
var ClassName = function(){};

/**
 * method description
 * @public
 * @name com.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
 */
com.mydomain.ClassName = (function(){

var ClassName = function(){};

/**
 * method description
 * @memberOf com.mydomain.ClassName
*/
ClassName.prototype.method1 = function(){};

return new ClassName();

})();
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!