jsdoc/jsdoc.github.io

Document more in detail how to use @returns with types vs values

MartinMuzatko opened this issue · 0 comments

Hello!

http://usejsdoc.org/tags-returns.html does not document if only types are allowed.
While the description explicitly says

The @returns tag documents the value that a function returns.

in all the example, types are used.
Are only types important for documentation?
If I know that my function will either return false or a string, how should I document that then?

{String|Boolean} ? {String|false}?

Thanks!