-
-
Notifications
You must be signed in to change notification settings - Fork 750
Closed
Description
With TypeScript 4.0 they have introduced Labeled Tuples:
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#labeled-tuple-elements
The current tuple types in the JSON output from TypeDocs provides the following information about a tuple type:
elements:(2) [{…}, {…}]
0:{
type: 'intrinsic',
name: 'number'
}
1:{
type: 'intrinsic',
name: 'number'
},
type:'tuple'
As you can see the elements in the tuple do not include their labels.
Before in 3.x your tuple might be:
export type PointAlias =
| Point
| { x: number, y: number }
| [ number, number ]
This tuple above does not indicate the order of "x,y" or "y,x"
But with 4.x and labeled tuples you can provide:
export type PointAlias =
| Point
| { x: number, y: number }
| [ x: number, y: number ]
However currently TypeDoc does not provide that extra meta-data about the tuple types.
Gerrit0
Metadata
Metadata
Assignees
Labels
No labels