1

Lets say I have a method on a class, foo, with a method, bar, that accepts all optional parameters, but if the parameters and order are changed, the method's return value changes significantly.

var foo = {

    bar: function (param1, param2) {
        if (typeof param1 === 'object' && param2) {
           //do something and return something
        }
        if (typeof param1 === 'boolean') {
           //do something a little different
        }
    }

}

How can I represent the different ways of calling this method in yuidoc?

optional params are ok, but the method description becomes a bit long if I just put it all in there.

Kelly Milligan
  • 578
  • 1
  • 4
  • 17
  • There was a [discussion with tips and links](http://stackoverflow.com/q/16959969/1169519) about this same subject just a while ago... – Teemu Jun 06 '13 at 14:25

0 Answers0