How to use JSDoc to document an ES6 class property

Move the JSDoc for someProperty into the constructor where it is first defined:

/**
 * SomeClass is an example class for my question.
 * @class
 * @constructor
 * @public
 */
class SomeClass {
    constructor () {
        /**
         * someProperty is an example property that is set to `true`
         * @type {boolean}
         * @public
         */
        this.someProperty = true
    }
}

I'm unsure if there is a way of accomplishing it with the documentation package using an approach that doesn't involve inlining the JSDocs into the constructor.


Another way is to declare them in class documentation as follows:

/**
 * Class definition
 * @property {type} propName - propriety description
 * ...
 */
class ClassName {
  constructor () {...}
  ...
}