How to document return in JavaScript
问题 I'm writing my own library for the project at work for a browser application and I am having the same old problem deciding how to comment the code. I'm trying to follow the JsDoc syntax, but will probably continue the Google Closure Compiler way. I may end up using two @return and @returns tags in the documentation, just for portability sake (when I setup the auto-generation of the documentation). Now, the question, how do you document the return of a custom anonymous object from a function?