I'm not a big fan of generated documentation personally (I'm more of a "read the source Luke" kinda guy), but I can see how such documentation might be useful to others. Now, normally their generating of documentation wouldn't impact me, except for one thing: @method.
Most JSDoc annotations (eg. @param
) are still perfectly useful to someone reading the source, but @method
is 100% redundant:
/*
* @param num number to add five to
* @method addFive
*/
function addFive(num) { ...
So, I'd really like to avoid having hundreds of @method
lines cluttering up our code. However, my co-worker believes that @method
is necessary for the JSDoc generators (he's using the YUI one) to be able to generate the method lists of classes.
So, my question (to the JSDoc experts out there) is: is there any way to generate useful documentation (ie. with the methods of a class listed) without @method
? Or if @method
is truly required, is there any JSDoc generator that can infer the method name from the function name, so that I can get away with @method
instead of @method addFive
?
P.S. If there's a "you're doing it wrong"-type answer that doesn't directly answer the question but suggests a way of avoiding the problem entirely, I'd love to hear it; I'm certainly no JSDoc expert.