jsdoc icon indicating copy to clipboard operation
jsdoc copied to clipboard

@inheritdoc doesn't inherit constructor documentation

Open darrylring opened this issue 10 years ago • 9 comments

In the documentation generated by the following code, B's constructor does not inherit A's constructor documentation.

A is documented correctly but B's documentation is empty.

/**
 * Does something with a number.
 *
 * @class
 * @param {number} a - The number.
 */
function A(a) {
    this.a = a;
}

/**
 * @class
 * @augments A
 * @inheritdoc
 */
function B() {
    A.apply(this, arguments);
}

darrylring avatar May 21 '15 23:05 darrylring

Confirmed. I agree that this ought to work.

hegemonic avatar May 27 '15 23:05 hegemonic

This is a similar case that fails, using the ES2015 class syntax:

class Parent {

  /**
   * Some docs go here!
   */
  constructor() {
    // Some stuff
  }
}

/**
 * @extends Parent
 */
class Child extends Parent {

  /**
   * @inheritdoc
   */
  constructor() {
    super();
    // Some more stuff
  }
}

eloquence avatar Nov 09 '17 02:11 eloquence

Any update on this? I just incurred in the same problem as @eloquence :\

le0m avatar Sep 20 '18 21:09 le0m

Same problem with inheritdoc

sedyshev avatar Oct 03 '18 11:10 sedyshev

About 5 years after this issue was created it remains unsolved...

nVentis avatar Mar 20 '20 02:03 nVentis

Any updates about this bug?

CemDemirkartal avatar Oct 12 '20 08:10 CemDemirkartal

Any update by 2022? This is basic "must-have" functionality by now.

grepson avatar Aug 26 '22 12:08 grepson

It's 2023, any update? It seems like a very reasonable, common request.

tasdflkjweio avatar Jan 24 '23 19:01 tasdflkjweio