Skip to main content

@description

Syntax

@description text

Overview

When the description text appears at the very beginning of a JSDoc block (before any tags), @description is not needed — JSDoc treats it as the description automatically.

Use @description explicitly when you need to place a description after other tags, or when you want to be explicit in your comment style.

Examples

Implicit description (most common)

/**
* Calculates the area of a circle.
* @param {number} radius - The radius of the circle.
* @returns {number} The area.
*/
function circleArea(radius) {}

Explicit @description tag

/**
* @param {number} radius - The radius.
* @description Calculates the area of a circle.
* @returns {number} The area.
*/
function circleArea(radius) {}
note

The implicit style is preferred — it keeps your comments clean and readable.

See also

Official reference: jsdoc.app/tags-description