enum by default should include values in the description
Author: DaveTorreyCreated Nov 7, 2022Updated Aug 1, 2026
Expected behavior
using the @enum tag implies an object where key values represent basic value types - number, string, boolean, or something of the sort. The value associated with the key should be listed out in the description by default to be more useful.
/**
* @enum {number}
* /
const myEnum = {
FIRST_ITEM: 2,
SECOND_ITEM: 4,
THIRD_ITEM: 6
}should automatically identify the value and result in documentation that lists out, in a table,
FIRST ITEM | number | 2 SECOND_ITEM | number | 4 THIRD_ITEM | number | 6
Current behavior
Presently, to get the above effect, you have to explicitly document each item which is redundant:
/**
* @enum {number}
* /
const myEnum = {
/** 2 */
FIRST_ITEM: 2,
/** 4 */
SECOND_ITEM: 4,
/** 6 */
THIRD_ITEM: 6
}Source: jsdoc/jsdoc