@desc

May 18, 2022 0 Comments

Synonyms

  • @description

Syntax

@desc <some description>

Overview

The @desc tag allows you to provide a general description of the symbol you are documenting. The description may include HTML markup. It may also include Markdown formatting if the Markdown plugin is enabled.

Examples

If you describe a symbol at the very beginning of a JSDoc comment, before using any block tags, you may omit the @desc tag.

Describing a symbol without the @desc tag
/**
 * Add two numbers.
 * @param {number} a
 * @param {number} b
 * @returns {number}
 */
function add(a, b) {
    return a + b;
}

By using the @desc tag, you can place the description anywhere in the JSDoc comment.

Describing a symbol with the @desc tag
/**
 * @param {number} a
 * @param {number} b
 * @returns {number}
 * @desc Add two numbers.
 */
function add(a, b) {
    return a + b;
}

See Also

  • @classdesc
  • @summary