-
-
Notifications
You must be signed in to change notification settings - Fork 750
Closed
Description
Search terms
tuple, optional, convertType
Expected Behavior
Docs should be generated for valid code.
Actual Behavior
Extending a tuple type that includes an optional member causes TypeDoc to exit with an unexpected error. This might be related to #1439.
Steps to reproduce the bug
Try to generate docs for this:
export function fails<T extends [foo: any, bar?: any]>(a: T): T {
return a;
}This causes an error Cannot read property 'name' of undefined to be thrown from here
typedoc/src/lib/converter/types.ts
Line 819 in 0c3b1a0
| namedMembers[i].name.text, |
due to
elements having a length that's one greater than the length of namedMembers.
Minimal reproduction: https://gist.github.com/eemeli/a860c474d8a8a221985aa3fc883baed0
Environment
- Typedoc version: 0.20.10
- TypeScript version: 4.1.3
- Node.js version: 14.9.0
- OS: macOS Mojave 10.14.3
Metadata
Metadata
Assignees
Labels
No labels