class A {
/**
* This method returns a number
* @param {number} x
* @return {number}
*/
foo(x) {
return x;
}
}
class B extends A {
/** @inheritdoc */
foo(x) {
return x+1;
}
}
When building jsdoc directly, this works as intended, but when building using sphinx-js it results in the following failure:
sphinx_js.doclets.PathsTaken: Your JS code contains multiple documented objects at each of these paths:
./jspath.B#foo
We won't know which one you're talking about. Using JSDoc tags like @class might help you differentiate them.
An annotation which includes the
@inheritdoc
tag should be ignored, with documentation derived from the parent class.https://jsdoc.app/tags-inheritdoc.html
Example
When building jsdoc directly, this works as intended, but when building using sphinx-js it results in the following failure:
Since this is a core jsdoc tag, it should be also supported by sphinx-js. Issue is related to https://github.com/mozilla/sphinx-js/issues/110