Skip to content

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

@MartinMuzatko

Description

@MartinMuzatko

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions