0

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) {
    //...
}
xeolabs
  • 1,369
  • 1
  • 9
  • 16

1 Answers1

1

You can specify default value like this.

/**
 * @method setColor
 * @param {Array} [value=[0.0, 0.0, 0.0]] `Array` of `Number`
 */
function setColor(value) {
}
okuryu
  • 221
  • 1
  • 9
  • Yeah that seems a reasonable workaround, at least the info is there. Cheers! (PS. Note that I accidentally provided markup for a property and edited to show markup for a method, which was what I was after, but your solution still applies) – xeolabs Jan 09 '15 at 05:04