【发布时间】:2013-03-02 01:30:18
【问题描述】:
我正在尝试为使用 YUIDoc 的 JavaScript 方法编写一些文档。它看起来像:
/**
Returns an instance of className
@method getInstance
@param {string} className the of the class used to create the instance
@param {Object} options these are options used to create the instance
**/
function getInstance(className, options) { ..... }
现在,options 对象可以有多个参数,例如options.id、options.single 等。
如何将此信息添加到此@param 的文档中?
【问题讨论】:
-
Google Closure Compiler 会将其标记为 {{id:string,single:whatever}} 或 {Object.
} 如果它是通用字典,但我不知道是否这是常见的语法或它的扩展。见本页底部:developers.google.com/closure/compiler/docs/js-for-compiler
标签: javascript documentation yuidoc