YUIDOC - Document params of returned callback

65 Views Asked by At

How can I properly document a returned callback that returns multiple parameters. Exe:

return callback(error, success);

1

There are 1 best solutions below

0
Dmitri Zagidulin On

I would document this return value as follows:

/**
 * @return {Function} Returns the callback in the form of `callback(error, success)`
 */

That is -- use the actual string description of the return statement. (YUIDoc doesn't really have the ability to document what you want explicitly, without describing in text.)