Skip to content

Special case for return tag #144

@maxless

Description

@maxless
/**
 * This is an example function 2.
 * You may use it as you like.
 * @param {number} arg1 First argument.
 * @param {number} arg2 Second argument.
 * @return {number} Error code.
**/

is currently parsed into the following tags:

[
...,
  {
    tag: 'param',
    name: 'arg2',
    type: 'number',
    optional: false,
    description: 'Second argument.',
    problems: [],
    source: [ [Object] ]
  },
  {
    tag: 'return',
    name: 'Error',
    type: 'number',
    optional: false,
    description: 'code.',
    problems: [],
    source: [ [Object], [Object] ]
  }
]

Is there a simple way to make the return tag behave properly with description resulting in "Error code"? This is a part of JSDoc spec: https://jsdoc.app/tags-returns.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions