We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Typescript gets confused between tuples and arrays, e.g. it often infers number[] instead of [number, number].
number[]
[number, number]
You can fix this by explicitly casting the tuple e.g. [1,2] as [number, number]
[1,2] as [number, number]
Note that this also happens for mixed type tuples, e.g. [1, "abc"] is inferred as [number | string][] instead of [number, string].
[1, "abc"]
[number | string][]
[number, string]