You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The @return {{x:Number, y:Number}} syntax is fine for such simple example, with self-explaining key names. But it fails if the object is complex, and if we need to indicate optional properties, to document them, etc. @typedef can be another solution, although perhaps a bit to much for a one-time object (not reused elsewhere).
I have seen indented @param to document properties of an object (instead of obj.prop), but I don't know if it is official. If so, perhaps it can be a solution after @return.
http://usejsdoc.org/tags-returns.html doesn't specify how returned objects with constant keys can be documented, and there has been speculation about this on StackOverflow for 4+ years.
(moved here from jsdoc/jsdoc#1045)
The text was updated successfully, but these errors were encountered: