JSDoc中的文档集合(类型数组)返回值和参数 [英] Document collection (array of type) return value and parameter in JSDoc
本文介绍了JSDoc中的文档集合(类型数组)返回值和参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当数组元素可以是以下任一项时,如何在JSDoc中记录数组
返回值(和参数):
How to document Array
return value (and parameters) in JSDoc when array elements can be either of the following:
- 一种类型(例如
字符串
,数组
)。 - 对象文字。
- A type (e.g.
String
,Array
). - An object literal.
推荐答案
如果您正在寻找要记录数组中对象的类型,你需要这样的东西:
If you're looking for how to document the type of objects in an array, you want something like this:
/**
* @param {String[]} aliases
*/
http://code.google.com/p/jsdoc-toolkit/wiki/TagParam#Parameter_Type_Information
这篇关于JSDoc中的文档集合(类型数组)返回值和参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文