【问题标题】:Markup of function argument name in jsdoc?jsdoc中函数参数名称的标记?
【发布时间】:2014-09-15 07:14:29
【问题描述】:

如何在jsdoc/jsdoc3中标记或制作引用函数参数。

例如:

/** 
 * Build xxx.
 * cfg is optional.
 *
 * @param {Object} cfg  config
 * @function
 */
function build(engine, cfg) { ... }

用什么标记将cfg 包装在cfg is optional. 描述中?

【问题讨论】:

    标签: jsdoc


    【解决方案1】:

    我看到one possible way 包含在tt HTML 标记中:

    /**
     * Repeat <tt>str</tt> several times.
     * @param {string} str The string to repeat.
     * @param {number} [times=1] How many times to repeat the string.
     * @returns {string}
     */
    repeat: function(str, times) { ... }
    

    【讨论】:

      猜你喜欢
      • 2010-09-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-04-06
      • 2021-10-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多