I am writing documentation for some classes written using the ES6 class syntax. I have some classes which inherit their constructor from their parent class, as below:
/**
* @class
*/
class Parent {
/**
* the inherited constructor
* @param {*} someAttribute - an attribute of the parent class
*/
constructor(someAttribute) {
this.someAttribute = someAttribute
}
/**
* does nothing
* @method
*/
someMethod() {
return;
}
}
/**
* @class
* @extends Parent
*/
class Child extends Parent {
}
This mostly does exactly what I need, documenting Parent
exactly as I expect in the generated website, and showing that Child
extends Parent
. It also documents someMethod
within both Parent
and Child
as I expected. Additionally, I see the documentation exactly as expected in the popups that show on VSCode when typing, for example, new Child(
However, in the generated website, the constructor documentation is displayed only for Parent
and not for Child
, even though the constructor is also inherited.
Is there any way to inherit the constructor documentation from Parent
in Child
. As well as the above, I have also tried using @augments
in place of @extends
, @constructor
or @method
above the constructor function, and @inheritdoc
in the Child
class