Javascript 如何在YUIDoc中注释对象文字

Javascript 如何在YUIDoc中注释对象文字,javascript,yui,javadoc,Javascript,Yui,Javadoc,在YUIDoc中,我想注释作为参数传递的对象文本。请参阅以下代码片段: @param {Array} colDefs Array of object literal column definitions for the grid<ul> <li>title - Column header display</li> <li>key - The key of the column from the JSON data array&l

在YUIDoc中,我想注释作为参数传递的对象文本。请参阅以下代码片段:

@param {Array} colDefs Array of object literal column definitions for the grid<ul>
    <li>title -  Column header display</li>
    <li>key -  The key of the column from the JSON data array</li>
    <li>type - The data type of the column.  </li></ul>
网格的对象文字列定义的数组
@param{Array}
  • 标题-列标题显示
  • key—JSON数据数组中列的键
  • 类型-列的数据类型
我应该向列表项添加哪些标记,以便指定属性的类型(字符串、对象等)?如果我添加{String},它只会显示为文本,而不是@param标记的良好格式


也许这甚至是不可能的?

您可以通过先指定配置对象,然后将所有属性指定为
对象。属性
参数来记录配置对象。看起来是这样的:

 /**
 @param {Object}  config          Object literal containing configuration parameters
 @param {Boolean} config.useFoo   Whether to use Foo or not
 @param {String}  [config.option] An optional string parameter
 */

找到了解决方法,但使用起来有点单调:
  • 标题字符串
    列标题显示
  • 谢谢,解决了我的问题!我应该更仔细地阅读文档,这只是一个示例,但解释得不够清楚。