Reputation: 1399
Any idea how to document a method parameter with YUIDoc, where the param is a vector, being a three-element array of numbers?
This is what I'm doing so far, describing the param as simply "Array(Number)":
/**
* Sets the color, which is a three-element array of double-precision numbers.
* @method setColor
* @param value {Array(Number)}
*/
this.setColor(value) {
//...
}
Upvotes: 0
Views: 147
Reputation: 221
You can specify default value like this.
/**
* @method setColor
* @param {Array} [value=[0.0, 0.0, 0.0]] `Array` of `Number`
*/
function setColor(value) {
}
Upvotes: 1