Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docstrings of enum-like object members are missing #1880

Closed
ejuda opened this issue Mar 10, 2022 · 3 comments
Closed

Docstrings of enum-like object members are missing #1880

ejuda opened this issue Mar 10, 2022 · 3 comments
Labels
bug Functionality does not match expectation

Comments

@ejuda
Copy link
Contributor

ejuda commented Mar 10, 2022

Search terms

enum, enum-like object

Expected Behavior

Consider the following code:

// index.d.ts

/**
 * This enumeration defines some values.
 *
 * @enum
 */
export declare const SomeEnum: {
    /**
     * This is the auto property.
     */
    readonly AUTO: "auto";
    /**
     * This is the manual property.
     */
    readonly MANUAL: "manual";
};

Thanks to the PR closing issue #1740, TypeDoc correctly recognises this object as an enum. Both the docstring of the enum-like object and the docstrings of its members should also be preserved.

Actual Behavior

While the docstring of the enum-like object are preserved, those of its members are not:

image

The docstrings for AUTO and MANUAL members (This is the auto property and This is the manual property respectively) are missing from the page.

Steps to reproduce the bug

  1. Clone the reproduction repository.
  2. npm ci
  3. npm run docs
  4. This will generate documentation into docs directory.

Environment

  • Typedoc version: 0.22.13
  • TypeScript version: 4.6.2
  • Node.js version: 16.14.0
  • OS: Windows 10
@ejuda ejuda added the bug Functionality does not match expectation label Mar 10, 2022
@ejuda
Copy link
Contributor Author

ejuda commented Mar 10, 2022

I think this has been mentioned in a comment on #1740, but I have not seen any issue with the follow-up on this.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 14, 2022

I think this should be an easy fix, just needs an update to https://github.com/TypeStrong/typedoc/blob/master/src/lib/converter/converter.ts#L187

@michkot
Copy link

michkot commented Apr 5, 2022

Thanks a lot @ejuda, I ultimately didn't make the time to report it properly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation
Projects
None yet
Development

No branches or pull requests

3 participants