我正在尝试使用jsdoc-toolkit以以下格式记录代码。看起来我使用的标签应该会产生期望的结果,但实际上没有。它警告说Class没有文档(因为它仅在闭包内定义),并且不在命名空间成员列表中包括Class。
如果可能的话,我想避免使用@name标签来记录。有人能帮忙吗?
/**
* @namespace The original namespace
*/
var namespace = function () {
// private
/**
* @private
*/
function _privateMethod () {
};
/**
* This is the detail about the constructor
* @class This is the detail about the class
* @param {Object} argone The first argument
* @param {Object} argtwo The second argument
*/
var Class = function (argone, argtwo) {
/**
* A public member variable
*/
this.member = "a member";
};
/**
* A public method
* @param {Object} argone The first argument
*/
Class.prototype.publicMethod = function (argone) {
};
return /** @lends namespace */ {
Class: Class
}
}();