<!-- BUGS: Please use this template. --> **TypeScript Version:** 2.3.4 **Code** ```ts const foo = (bar?: { baz: number }) => { if (bar == null) { bar = { baz: 0 }; } const baz = () => { console.log(bar.baz); // Object is possibly undefined }; baz(); }; ``` [Playground link](https://www.typescriptlang.org/play/index.html#src=const%20foo%20%3D%20(bar%3F%3A%20%7B%20baz%3A%20number%20%7D)%20%3D%3E%20%7B%0A%20%20%20%20if%20(bar%20%3D%3D%20null)%20%7B%0A%20%20%20%20%20%20%20%20bar%20%3D%20%7B%20baz%3A%200%20%7D%3B%0A%20%20%20%20%7D%0A%20%20%20%20const%20baz%20%3D%20()%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20console.log(bar.baz)%3B%20%2F%2F%20Object%20is%20possibly%20undefined%0A%20%20%20%20%7D%3B%0A%20%20%20%20baz()%3B%0A%7D%3B%0A%0A) **Expected behavior:** No error **Actual behavior:** Error "Object is possibly undefined"