I don't really get what you're saying. JS doesn't throw on out-of-bounds array access and instead returns undefined, even in Strict mode. Obviously TypeScript needs to match the actual behavior with the typing.
const arr = [];
arr[5]; // undefined
I don't really get what you're saying. JS doesn't throw on out-of-bounds array access and instead returns undefined, even in Strict mode. Obviously TypeScript needs to match the actual behavior with the typing.
const arr = [];
arr[5]; // undefined