Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Fix Best common type. #592

Merged
merged 3 commits into from
Aug 14, 2017
Merged

Fix Best common type. #592

merged 3 commits into from
Aug 14, 2017

Conversation

chul-hyun
Copy link
Contributor

Fixes #

reference : microsoft/TypeScript#805

The current Best Common Type algorithm (spec section 3.10) is only capable of producing a type that was among the candidates, or {}. For example, the array [1, 2, "hello"] is of type {}[]. With the ability to represent union types, we can change the Best Common Type algorithm to produce a union type when presented with a set of candidates with no supertype.

@msftclas
Copy link

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@mhegazy mhegazy merged commit 88a4afa into microsoft:master Aug 14, 2017
alipiry pushed a commit to alipiry/TypeScript-Handbook that referenced this pull request Jan 5, 2020
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants