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

@hidden implementation of non-hidden overloads result in documentation that marks the function as hidden #2634

Closed
xuhdev opened this issue Jul 9, 2024 · 3 comments
Labels
bug Functionality does not match expectation

Comments

@xuhdev
Copy link
Contributor

xuhdev commented Jul 9, 2024

Search terms

hidden, overload

Actual Behavior

When the implementation of overloads is marked with @hidden while the overloads aren't, the generated documentation of the function is also marked marked with Hidden.

Reproduction

Save the following file to a.ts.

/**
 * @param a - Number param.
 */
export function f(a: number): void;

/**
 * @param a - String param.
 */
export function f(a: string): void;

/** @hidden */
export function f(a: string | number): void {
  console.log(a);
}

Run typedoc a.ts. Check out the output.

image

Expected Behavior

Function f above shouldn't be marked as Hidden in the generated doc.

Environment

  • Typedoc version: 0.26.3
  • TypeScript version: 5.5.3
  • Node.js version: 22.4.1
@xuhdev xuhdev added the bug Functionality does not match expectation label Jul 9, 2024
@xuhdev xuhdev changed the title @hidden still shows for overloaded function @hidden implementation of non-hidden overloads result in documentation that mark the function as hidden Jul 9, 2024
@xuhdev xuhdev changed the title @hidden implementation of non-hidden overloads result in documentation that mark the function as hidden @hidden implementation of non-hidden overloads result in documentation that marks the function as hidden Jul 9, 2024
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jul 10, 2024

That should have entirely removed the function from the documentation... weird.

@xuhdev
Copy link
Contributor Author

xuhdev commented Jul 10, 2024

How should we exclude the implementation prototype from the doc then? They are often only used for implementation and not for users to read.

@xuhdev
Copy link
Contributor Author

xuhdev commented Jul 10, 2024

nvm, the implementation is undocumented by default.

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

2 participants