Skip to content

jsdoc/require-returns-description Pedantic

What it does

Requires that the @returns tag has a description value. The error will not be reported if the return value is void or undefined or if it is Promise<void> or Promise<undefined>.

Why is this bad?

A @returns tag should have a description value.

Examples

Examples of incorrect code for this rule:

javascript
/** @returns */
function quux(foo) {}

Examples of correct code for this rule:

javascript
/** @returns Foo. */
function quux(foo) {}

References

Released under the MIT License.