-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instance of else clause #5092
Instance of else clause #5092
Conversation
@@ -5976,6 +5977,13 @@ namespace ts { | |||
} | |||
|
|||
if (targetType) { | |||
if (!assumeTrue) { | |||
if (type.flags & TypeFlags.Union) { | |||
return getUnionType(filter((<UnionType>type).types, t => !isTypeSubtypeOf(t, targetType))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RyanCavanaugh what happened with the idea that if the RHS type isn't a subtype of any types in the union, that we just discard the LHS type and take the RHS type? Is that something that we eventually went with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember what we decided on that.
@tinganho can you address the merge conflict? |
What happened to the |
c91c905
to
dd54b7a
Compare
@RyanCavanaugh I fixed the merge conflict. And |
@mhegazy good with this? |
👍 |
Sorry for the delay. 👍 |
thanks! |
👍 |
Fixes #1719.