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

Wrong membership infering for es6 classes' methods #1121

Closed
NumminorihSF opened this issue Aug 17, 2018 · 0 comments · Fixed by #1122
Closed

Wrong membership infering for es6 classes' methods #1121

NumminorihSF opened this issue Aug 17, 2018 · 0 comments · Fixed by #1122

Comments

@NumminorihSF
Copy link
Contributor

Currently there is an issue with inferring membership from es6 class for its method.
Method become a part of globally defined class instead of class that is defined inside own module.
So method the method that is BigFeature.MyClass#method become MyClass#method and documentation is not readable for such cases. To resolve it I should manually write @memberof BigFeature.MyClass for every method.
Expected behavior is proper inferring for such cases to prevent writing extra comments.

  • What version of documentation.js are you using?: 8.1.0
  • How are you running documentation.js (on the CLI, Node.js API, Grunt, other?): npx documentation build example.js -f md

Input:

/**
 * My big feature.
 *
 * @module BigFeature
 */

/**
 * My class.
 *
 * @memberof BigFeature
 */
class MyClass {
  /** My method */
  method() {
    return {};
  }
}

Current output (for md):

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

-   [BigFeature][1]
    -   [MyClass][2]
-   [method][3]

## BigFeature

My big feature.

### MyClass

My class.

## method

My method

[1]: #bigfeature

[2]: #myclass

[3]: #method

Expected output:

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

-   [BigFeature][1]
    -   [MyClass][2]
        -   [method][3]

## BigFeature

My big feature.

### MyClass

My class.

#### method

My method

[1]: #bigfeature

[2]: #myclass

[3]: #method
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

Successfully merging a pull request may close this issue.

1 participant