Closed
Description
TypeScript Version: 2.4.0
Code
type A = {
[index: string]: [number, number] | null;
};
const value: A = {
foo: [42, 42]
};
const extractedValue = value.foo !== null ?
// Object is possibly 'null'.
value.foo[0] :
5;
Expected behavior:
Null check is correctly performed and the compiler allows for accessing
Actual behavior:
// Object is possibly 'null'.