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

augments should include properties of super class #1923

Open
pschmolke opened this issue Jun 8, 2021 · 0 comments
Open

augments should include properties of super class #1923

pschmolke opened this issue Jun 8, 2021 · 0 comments

Comments

@pschmolke
Copy link

pschmolke commented Jun 8, 2021

When using the @Augments tag all methods of the inherited super class gets added to the specific class, but this is not the case for properties.

Imagine the following example:

class Section {
  /**
   * @prop {String} oneProp one
   * @prop {String} anotherProp two
   */
  constructor( x ) {
    this.oneProp = x + '-first-prop';
    this.anotherProp = x + '-second-prop';
  }

  foo() {
    return this.oneProp + this.anotherProp;
  }
}

/**
 * @augments Section
 */
class PersonalSection extends Section {
  /**
   * @prop {Number} someValue this is the answer
  constructor() {
    super( 'hi from implementation' );
    this.someValue = 42;
  }
}

Expected behavior

Methods and properties are inherited and displayed.

Current behavior

Only Methods will be shown inside the PersonalSection docs. It includes foo and someValue but not oneProp nor anotherProp

Your environment

Software Version
JSDoc 3.6.6
Node.js 14.15.4
npm 6.14.10
Operating system Debian 4.19.181-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant