How to display Javascript methods in a "group" in JSDOC?

Is it possible to "group" functions inside a class (AMD / RequireJS module)? My classes sometimes have more than 20+ functions that actually belong to a certain "interface implementation", and sometimes they just need to be grouped for better readability.

I checked the available jsDoc tags, but none of them seemed to provide this, there are several tags in Doxygen ...

Any ideas?

+7
javascript jsdoc
source share
1 answer

This is one way to do this, your module form can do a lot, but it works with classes and modules:

/** * @module foobar * * @memberof module:foobar * @param {string} arg an argument **/ function one (arg) { console.log(arg) } module.exports = { one: one } 

the key is to use @memberof described here .

you can use it with the @class documentation or with the @module document, so it can work with any various forms of a class or module of ES5, ES6 or TypeScript if you document a container object (class or module) with @class or @module.

Result: enter image description here

+1
source share

All Articles