Skip to content

TypeDoc displays a superfluous type on number constants #2717

Closed
@Zamiell

Description

@Zamiell
Contributor

Consider the following code:

const SECOND_IN_MILLISECONDS = 1000;

TypeDoc will generate a page with the following:

image

Here, the type of "1000" is superfluous/confusing/noisy/distracting. Thus, I propose that when TypeDoc determines that the type is exactly the same thing as the value, then it should omit printing out the type.

Activity

added a commit that references this issue on Sep 29, 2024

issue TypeStrong#2717 almost fixed, HTML rendering must be fixed

Corso02

Corso02 commented on Sep 29, 2024

@Corso02
Contributor

Hi @Zamiell and @Gerrit0.
I managed to fix this issue.
There were 2 tests that were failing right after I forked and cloned this repo. No other tests are failing after I implemented my solution.

I used the same code that is mentioned in the description of this issue, and here is how the docs are generated with my solution in place.
image

Can I submit Pull Request?

Gerrit0

Gerrit0 commented on Sep 29, 2024

@Gerrit0
Collaborator

Please do!

added a commit that references this issue on Oct 3, 2024
added this to the v0.26.7 milestone on Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueEasier issue for first time contributors

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Zamiell@Gerrit0@Corso02

        Issue actions

          TypeDoc displays a superfluous type on number constants · Issue #2717 · TypeStrong/typedoc