How do you document anonymous functions ?
- by clutch
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