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

readonly T[] is exported as keyof T[] #1336

Closed
yume-chan opened this issue Jul 7, 2020 · 3 comments · Fixed by #1356
Closed

readonly T[] is exported as keyof T[] #1336

yume-chan opened this issue Jul 7, 2020 · 3 comments · Fixed by #1356
Labels
bug Functionality does not match expectation

Comments

@yume-chan
Copy link

Search terms

readonly, keyof

Expected Behavior

For the following code:

export const a: readonly string[] = [];

typedoc should export:

a: readonly string[] = []

Actual Behavior

typedoc exports:

a: keyof string[] = []

image

Steps to reproduce the bug

Environment

  • Typedoc version: 0.17.8
  • TypeScript version: 3.9.6
  • Node.js version: 14.4.0
  • OS: macOS 10.15.4
@yume-chan yume-chan added the bug Functionality does not match expectation label Jul 7, 2020
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jul 8, 2020

This really confused me for a bit because I distinctly remember fixing exactly this bug... and thought I did it ~6 months ago. Turns out it is fixed on the wip library mode branch, but not on master... https://github.com/TypeStrong/typedoc/blob/library-mode/src/lib/converter/type-nodes.ts#L148-L160

It should be fairly simple to update the converter for type operator types on master to handle this properly, PR welcome if you want to give it a shot.

@yume-chan
Copy link
Author

@Gerrit0 Is there an ETA of the library mode branch? We are testing different documentation generation options, but we don't need it immediately.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jul 11, 2020

I wish! The checklist at #1184 (comment) is the closest thing I can point you towards there. I seem to be able to do 1-2 medium, or 1 large and 1 small tasks per weekend... which indicates it will be at least a month, probably closer to two.

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
2 participants