@constant
Syntax
@constant
@constant {type}
@constant {type} name
Overview
@constant marks a symbol as a constant. An optional type and name can follow. When placed on a const declaration, JSDoc infers the name from the source; the tag is still useful for providing a type and description.
Examples
/**
* The maximum number of retry attempts.
* @constant {number}
*/
const MAX_RETRIES = 3;
/**
* The default API base URL.
* @const {string}
*/
const API_BASE = 'https://api.example.com/v1';
With explicit name (for non-const variables)
/**
* @constant {number} MAX_SIZE
*/
var MAX_SIZE = 100;
See also
Official reference: jsdoc.app/tags-constant