documentationjs / documentationjs/documentation
option to group by type
- Dominant language
- JavaScript
- Stars
- 5.8k
- Forks
- 481
- PR merge metrics
- No merged PRs in 30d
Description
Most of my project works with classes with static and instance members. I do, however, have functions that are used to create `@typedef` types. It would be great if I could group them under the type name without them being tagged "static" or "instance".
Input:
```javascript
/**
* Option provided to the constructor
* @typedef ClientOption
*/
const ClientOption = undefined;
/**
* withTokenAuth allows for using the API access token.
*
* @param {string} email - The account email address.
* @param {string} token - The account API token.
* @return {ClientOption} - The opaque representation of this option
*/
function withTokenAuth(email, token) {
return function() {};
}
/**
* withUserServiceKey allows for using the newer User Service Key API access tokens.
*
* @param {string} email - The account email address.
* @param {string} key - The scoped API access key.
* @return {ClientOption} - The opaque representation of this option
*/
function withUserServiceKey(email, token) {
return function() {};
}
```
Output:
```markdown
### Table of Contents
- [ClientOption](#clientoption)
- [withTokenAuth](#withtokenauth)
- [withUserServiceKey](#withuserservicekey)
## ClientOption
Option provided to the constructor
## withTokenAuth
withTokenAuth allows for using the API access token.
**Parameters**
- `email` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The account email address.
- `token` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The account API token.
Returns **[ClientOption](#clientoption)** The opaque representation of this option
## withUserServiceKey
withUserServiceKey allows for using the newer User Service Key API access tokens.
**Parameters**
- `email` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The account email address.
- `token`
- `key` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The scoped API access key.
Returns **[ClientOption](#clientoption)** The opaque representation of this option
```

While only two are shown for example, my project has a bunch of these type creators. It would be great to group them under the type they create.
* What version of documentation.js are you using?:
v5.3.5
* How are you running documentation.js (on the CLI, Node.js API, Grunt, other?):
`documentation build index.js --format html --output documentation`
Contributor guide
Assessment
This issue has not been assessed yet.