documentation
documentation copied to clipboard
Class not recognised if declared in module.exports assignment
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.