JSDoc类建议布局
我是JSDoc的新手,我正在尝试找出标记代码的最佳方法。由于某种原因,在我将某个东西标记为@class之后,我无法将任何东西显示为@internal:JSDoc类建议布局,jsdoc,Jsdoc,我是JSDoc的新手,我正在尝试找出标记代码的最佳方法。由于某种原因,在我将某个东西标记为@class之后,我无法将任何东西显示为@internal: /** * The logger, to simply output logs to the console (or potentially a variable) * @class Logger * @requires 'config/globalConfig' */ define(["config/globalConfig"], fu
/**
* The logger, to simply output logs to the console (or potentially a variable)
* @class Logger
* @requires 'config/globalConfig'
*/
define(["config/globalConfig"], function (config) {
/**
* Instantiate a new copy of the logger for a class/object
* @constructor
* @param name {string} - The name of the class instantiating the logger
*/
return function (name) {
/**
* @memberOf Logger
* @type {string}
*/
this.name = name;
/**
* Place the message on the console, only for "DEV" level debugging
* @function
* @memberOf Logger
* @param message {string}
*/
this.debug = function (message) {
... some code ...
};
};
});
现在所有的成员都以同样的身份出现。如果我将@inner标记添加到任何属性/函数中,它们将从输出中完全消失
编辑:我也忘了提。@constructor标志似乎也不起作用。如果我删除整个部分,它在输出中显示相同。输出不包括我想在构造函数中提到的@param
请让我知道这是否是完全错误的,我只是在猜测,因为JSDoc3文档有点难读。所以我想出来了,但仍然不确定它是否绝对正确。我必须使用“Logger~name”使其作为内部函数正确显示。根据JSDoc文档,这是“很少使用的”。似乎是唯一对我有用的东西
define(["config/globalConfig"], function (config) {
/**
* The logger, to simply output logs to the console (or potentially a variable)
* @class Logger
* @param name {string} - The name of the class instantiating the logger
*/
return function (name) {
this.name = name;
/**
* Place the message on the console, only for "DEV" level debugging
* @function Logger~debug
* @param message {string}
*/
this.debug = function (message) {
... code ...
};
};
});