How do you document anonymous functions ?
Posted
by clutch
on Stack Overflow
See other posts from Stack Overflow
or by clutch
Published on 2010-04-06T16:57:13Z
Indexed on
2010/04/06
17:03 UTC
Read the original article
Hit count: 349
I'm specifically referring to JavaScript anonymous function but this could be relevant to other languages. I like to use JSDoc notations in my scripts because I know other people will be hacking at it sooner or later. When i have pretty complex anonymous function how do people document it so that it gets picked up by Eclipse and other IDE's that understand JSDoc or JavaDoc notations?
/**
* Blah Blah blah
*
* @param Object Blah blah blah
* @return Blah Blah Blah
* @type Object
*/
function foo(this) {
......
this.bar = function () { ... complex code .....};
......
return obj;
}
Thanks
© Stack Overflow or respective owner