2 ms·
Thanks, you can still trick it with this though (there's no type error): const x = [1, 2] as const; const r = 666 + 1; const y = x[r]; const z
by seanwilson 7y ago
Thanks, you can still trick it with this though (there's no type error):
const x = [1, 2] as const;
const r = 666 + 1;
const y = x[r];
const z = y + 3;
- nine_k 7y agoLet's wait until TS supports dependent types!