xeolabs
xeolabs

Reputation: 1399

How to document a vector param with YUIDoc?

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

Answers (1)

okuryu
okuryu

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

Related Questions