Closed
Description
TypeScript Version: 2.4.1
Code
const tuple: [string, number] = ["", 0];
const value = tuple[2];
Expected behavior:
Not compiling. You cant define a type based on what is currently define in the array.
This behavior broke the strict null check validation because this value should be undefined or the accessor non legit.
Actual behavior:
Compile and value
as the type of all types defined in the tuple, in this case string | number
.