How do I document functions inside of a return? In this example, I need then() documented. I have tried adding @memberOf and @name to get it to generate. Nothing seems to work for me.
/**
* The description for the outer function
* @param {string} test Example argument
* @return {Object}
*/
example.func = function(test) {
return {
/**
* The description for the inner "then" function
* @param {Function} cb The callback function
*/
then: function(cb) { }
}
}
Update Added JSDoc comments to the top to prevent confusion.