2 ms·
> i don’t know if TypeScript asserts that x[i] is T | undefined if x is T[] and the length is non-trivial There's a flag for that: https://www.typescriptlang.o
by matt_kantor 5y ago
> i don’t know if TypeScript asserts that x[i] is T | undefined if x is T[] and the length is non-trivial
There's a flag for that: https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAc...