documentationjs / documentationjs/documentation

classes with a description containing the @global tag will be ignored

Open
#1,042 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.8k
Forks
481
PR merge metrics
No merged PRs in 30d

Description

in the following example, two classes are declared, the second one extending the first one. The second one uses @global and this make documentation to ignore it. Its inner method appears in the output as a global function.

Expected behavior: there should be a class BaseComponent in the output with a method extend

```js
/**
* blabalbal
*/
class EventEmitter {
/**
* @param {String} eventName
* @param {Function} listener
*/
on(eventName, listener){}
}

/**
* Base abstract class for front-end components. Use method {@link BaseComponent.extend} to build concrete components.
* @class
* @extends EventEmitter
* @hideconstructor
* @global
*/
class BaseComponent extends EventEmitter {
constructor() {
super()
}

/**
* Extends the current component to generate a child one
* @param {{}} componentDefinition Any object with properties/methods that will be used to generate the Component that will be returned
* @return {BaseComponent}
*/
extend(componentDefinition) {
return new BaseComponent();
}
}

```
* What version of documentation.js are you using?: 6.1.0
* How are you running documentation.js (on the CLI, Node.js API, Grunt, other?): node.js

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.