Uh oh!
There was an error while loading. Please reload this page.
elaborate check before converting fresh literal type to regular - #12595
Merged
Conversation
Vladimir Matveev (vladima)
commented
Dec 1, 2016
ContributorAuthor
Mohamed Hegazy (@mhegazy) can you please take a look? Once this one is ok to go I'll port it into release-2.1. |
1 task
| // at this point we know that this is union or intersection type possibly with nullable constituents. | ||
| // check if we still will have compound type if we ignore nullable components. | ||
| let seenNonNullable = false; | ||
| for (const t of (<UnionOrIntersectionType>type).types) { |
Contributor
There was a problem hiding this comment.
is not this just maybeTypeOfKind(type, ~TypeFlags.Nullable)?
ContributorAuthor
There was a problem hiding this comment.
no, since AFAIR maybeTypeOfKind(type, ~TypeFlags.Nullable) will return true for union or intersection type that consist of non-nullable type and nullable type and this is not what we want.
Mohamed Hegazy (mhegazy)
approved these changes
Dec 12, 2016
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes#12584