documentationjs / documentationjs/documentation

How to handle @typedef with @memberof

Open
#465 4 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

```
/**
* Type representing abc
*
* @typedef AbcType
* @property {number} a
* @property {string} b
* @property {string} c
* @memberof MyClass
*/
type AbcType = {
a: number;
b: string;
c: string;
};

/**
* Description
*
* @returns {AbcType} result
* @memberof MyClass
*/
function myfunc(): AbcType {
}
```

The output of above shows AbcType as a static member of class `MyClass` and `myfunc` doesn't have a link to `AbcType`. If I omit the `@memberof MyClass` in the type definition of `AbcType` then `myfunc` shows the link to `AbcType` as expected but then the type `AbcType` is not more associated with the class `MyClass` and show as a separate line item in the index on the left side.

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.