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

TypeDoc displays a superfluous type on number constants #2717

Closed
Zamiell opened this issue Sep 27, 2024 · 2 comments
Closed

TypeDoc displays a superfluous type on number constants #2717

Zamiell opened this issue Sep 27, 2024 · 2 comments
Labels
enhancement Improved functionality good first issue Easier issue for first time contributors
Milestone

Comments

@Zamiell
Copy link
Contributor

Zamiell commented Sep 27, 2024

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.

@Zamiell Zamiell added the bug Functionality does not match expectation label Sep 27, 2024
@Gerrit0 Gerrit0 added enhancement Improved functionality good first issue Easier issue for first time contributors and removed bug Functionality does not match expectation labels Sep 27, 2024
Corso02 added a commit to Corso02/typedoc that referenced this issue Sep 29, 2024
@Corso02
Copy link
Contributor

Corso02 commented Sep 29, 2024

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
Copy link
Collaborator

Gerrit0 commented Sep 29, 2024

Please do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality good first issue Easier issue for first time contributors
Projects
None yet
Development

No branches or pull requests

3 participants