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

Class is omitted from generated docs if a function import exists #1731

Open
speller opened this issue Dec 24, 2019 · 2 comments
Open

Class is omitted from generated docs if a function import exists #1731

speller opened this issue Dec 24, 2019 · 2 comments

Comments

@speller
Copy link

speller commented Dec 24, 2019

In case if a js file has an exported class that extends other class and this file has a function import then this class is omitted from the generated docs on recursive generation.

Check the following test bug reproduction repository: https://github.com/speller/jsdoc-bug

  • Install dependencies.
  • Run command yarn jsdoc -c jsdoc.json. See the following console output:
$ /mnt/c/develop/projects/jsdoc-bug/node_modules/.bin/jsdoc -c jsdoc.json
Parsing /mnt/c/develop/projects/jsdoc-bug/src/Bar.js ...
Parsing /mnt/c/develop/projects/jsdoc-bug/src/Foo.js ...
Parsing /mnt/c/develop/projects/jsdoc-bug/src/functions.js ...
Generating output files...
Finished running in 0.52 seconds.
Done in 0.66s.

All the files are parsed (two classes - Foo and Bar, and a function).

  • Open the index.html document.

Expected result:

  • Two classes and the function are presented in the docs.

Actual result:

  • The Foo class is not presented in the docs.

Options to play:

  • Remove the function import in the Foo.js. Result: The Foo class appeared in the docs.
  • Remove the extends Bar line in the Foo.js. Result: The Foo class appeared in the docs.

Please fix that.

@speller
Copy link
Author

speller commented Dec 25, 2019

Related to #1718

@speller
Copy link
Author

speller commented Dec 25, 2019

import { test } from './functions';

Adding semicolon to the end of the import line solved the issue in this case.

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