Closed
Description
TypeScript Version: 2.1.? / as shipped with VS 2017 RC
Code
let x: { id: number } | undefined;
let y: { id: number };
x = Object.assign(y, x);
x.id;
Expected behavior: x.id
was fine in TS 2.0, and should be as it is guaranteed to be x === y
.
Actual behavior: x.id
triggers x
is possibly undefined.