YUIDoc似乎没有为我的命名空间生成任何文档。此项目使用显示模块设计模式。
/*
* Example namespace.
*
* @namespace MY_NAMESPACE
*/
var MY_NAMESPACE = (function() {
/**
* @property privateProperty1
* @type {Number}
* @private
*/
var privateProperty1 = 1;
/**
* Logs the method name to the console.
* @method privateMethod1
* @private
*/
var privateMethod1 = function() {
console.log('In privateMethod1');
};
return {
/**
* @property publicProperty1
* @type {Number}
*/
publicProperty1: 2,
/**
* Logs a simple message to the console.
*
* @method publicMethod1
* @param {String} aString A string to log.
*/
publicMethod1: function(aString) {
console.log('In publicMethod1 and was passed: ' + aString);
}
}
})();发布于 2015-01-09 15:35:55
如果您想按下面的方式使用@namespace,那么@class需要包含一个@class,但是您可能希望使用@class而不是@namespace。
/**
* Example namespace.
* @namespace MY_NAMESPACE
*/
/**
* Example class.
* @class MyClass
*/https://stackoverflow.com/questions/27810301
复制相似问题