@description (synonyms: @desc)

.. @description::
同义词

@desc

语法

@description <some description>

概述

The @description 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插件 is enabled.

示例

如果在JSDoc注释的最开头描述符号, 则在使用任何块标记之前, 可以省略@description标记.

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

通过使用@description标记, 您可以将描述放在JSDoc注释中的任何位置.

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

如果JSDoc注释开头的描述和@description标记提供的描述, 则使用@description指定的描述将覆盖注释开头的描述.

.. @desc::
同义词

@description