documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Class not recognised if declared in module.exports assignment

Open Malvineous opened this issue 7 years ago • 0 comments

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.

Malvineous avatar Nov 18 '18 03:11 Malvineous