Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including documentation for methods inherited via extends #256

Open
djipco opened this issue Oct 5, 2021 · 2 comments
Open

Including documentation for methods inherited via extends #256

djipco opened this issue Oct 5, 2021 · 2 comments

Comments

@djipco
Copy link

djipco commented Oct 5, 2021

I have a class that extends another one. Is it possible for the child class to include documentation for inherited methods? I'm only getting documentation for the actual methods in the class and not the inherited ones.

I can see that my @extends keyword is picked up because it shows up in the generated docs. This is basically my setup:

/**
 * Vehicle Class
 */
class Vehicle {
  start() {
    // Vroom!
  }
}
import {Vehicle} from "./Vehicle.js";
/**
 * Tank Class
 * @extends Vehicle
 */
class Tank extends Vehicle {
  fire() {
    // fire!
  }
}

In the documentation for the Tank class, I see the fire() method but not the start() method. Is that normal?

@75lb
Copy link
Member

75lb commented Oct 6, 2021

Hi, does your inherited method document as expected using jsdoc directly? If not, it's likely an issue with jsdoc (which jsdoc2md uses internally).. Check their issue log..

@djipco
Copy link
Author

djipco commented Oct 7, 2021

I am exporting the same documentation to HTML with foodoc (a template for jsdoc) and the inherited methods are all there.

There is an issue with jsdoc that mentions that inherited properties are not documented but that also confirms that inherited methods are indeed documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants