Skip to content

Provide type information for Enum members #1942

Closed
@vladfrangu

Description

@vladfrangu

Search Terms

enum, enum members, missing type in enum members

Problem

While generating documentation for enums, they never include the type of the variable in the enum (for instance a literal type object, so we have more clues), which can cause problems if you want to render that in a custom way. You can see this in the JSON linked below.

https://github.com/vladfrangu/typedoc-number-enum-lacks-type-information/blob/674a128da9d715023ebfeaedef6a34f5655e0bf4/out/doc.json#L16-L29

Suggested Solution

Ideally, typedoc should either append type information for the enum members (otherwise we have to take a wild guess and just default it to literal which is less than ideal) or maybe it should add a flag instead. Would also help to know if the defaultValue is a number/string without having to check if defaultValue[0] === '"' or other detection methods

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions