-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
In DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript
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.
reinisriekstins
Metadata
Metadata
Assignees
Labels
In DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript