Closed
Description
TypeScript Version:
1.8 / 1.9
Code
type Foo = { a: string } | { b: string }
interface Bar {
c: string
}
type Baz = Foo & Bar
let baz: Baz
if (baz.a) {
}
Expected behavior: baz.a
should be accessible, at least in 1.9 with the null
checks.
Actual behavior: Property a
does not exist on type
Edit: To clarify, I suspected it would have let me use it in the if
condition in 1.9 since the introduction of strictNullChecks
and flow control sounds like it would allow this functionality to pass.