Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tmkn13
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
by
tmkn13
7y ago
Yes there is, you can either use as const or define the type as a tuple: const x = [1,2] as const; //const x: [number, number] = [1,2]; const y = x[666];//Tuple type 'readonly [1, 2]' of length &#