JSDoc: Common doc block for multiple elements (variables, functions etc)

Viewed 54

Is it possible to relate a single jsdoc docblock for multiple variables/functions/etc? Something like this:

/**
 * These constants allow writing PIXI library's .anchor values
 * in a nicely readable manner.
 * ???BEGIN
 */
const ANCHOR_TOP = 0;
const ANCHOR_CENTER = 0.5;
const ANCHOR_BOTTOM = 1;
/** ???END (I made up this BEGIN/END syntax just to explain my idea) */

When I write a doc comment like this, it is obviously related only to the first const ANCHOR_TOP.

I know I can do it another way like this, but I still wonder if it is possible to write a common doc comment for the consts shown above.

/** doc goes here */
const AnchorAlign = {
  TOP: 0,
  CENTER: 0.5,
  BOTTOM: 1,
};
0 Answers
Related