documentationjs / documentationjs/documentation
Class not recognised if declared in module.exports assignment
Open
- Dominant language
- JavaScript
- Stars
- 5.8k
- Forks
- 481
- PR merge metrics
- No merged PRs in 30d
Description
The following code works:
```
/**
* This is an example.
*/
class Example { };
module.exports = Example;
```
The following code does not:
```
/**
* This is an example.
*/
module.exports = class Example { };
```
The second syntax is not recognised as a class declaration, so even using `@name Example` results in the class functions appearing at the root level instead of appearing inside the class. It would be nice if the second syntax was recognised as a class declaration as well!
Using documentation v8.1.2 through the CLI.
Contributor guide
Assessment
This issue has not been assessed yet.