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

Default parameter value constant is parsed as ellipsis in docs #1730

Closed
Sjeiti opened this issue Oct 5, 2021 · 1 comment
Closed

Default parameter value constant is parsed as ellipsis in docs #1730

Sjeiti opened this issue Oct 5, 2021 · 1 comment
Labels
bug Functionality does not match expectation

Comments

@Sjeiti
Copy link

Sjeiti commented Oct 5, 2021

Search terms

parameter, default, number constant, ellipsis

Expected Behavior

TypeDoc should describe the parameters correctly even when they are constants.
For instance:
"num: number = Number.MIN_SAFE_INTEGER"

Actual Behavior

TypeDoc generates the following parameter description for a constant:
"num: number = ..."

Steps to reproduce the bug

/**
 * A small number
 * @param {number} [num=Number.MIN_SAFE_INTEGER]
 */
export function smallNumber(num=Number.MIN_SAFE_INTEGER):number {
  return num
}

Environment

  • Typedoc version: 0.22.5
  • TypeScript version: 4.4.3
  • Node.js version: 14.15.1
  • OS: Windows
@Sjeiti Sjeiti added the bug Functionality does not match expectation label Oct 5, 2021
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Oct 5, 2021

See also #1552. Initializers are kind of annoying... property access might be simple enough in general that typedoc can include it.

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