0

YUIDoc似乎没有为我的命名空间生成任何文档。该项目使用Revealing Module设计模式

/*
 * 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);
    }
  }
})();
4

1 回答 1

0

@namespace@class如果您想@namespace按如下方式使用,则需要包含 a ,但您可能希望使用 a@class而不是@namespace.

/**
* Example namespace.
* @namespace MY_NAMESPACE
*/

/**
* Example class.
* @class MyClass
*/
于 2015-01-09T15:35:55.517 回答