Skip to content

Adding Union Types and Type Guards to Language Specification #900

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

Merged
merged 4 commits into from
Oct 15, 2014

Conversation

ahejlsberg
Copy link
Member

No description provided.

@ahejlsberg ahejlsberg changed the title Union Types and Type Guards to Language Specification Adding Union Types and Type Guards to Language Specification Oct 15, 2014
ahejlsberg added a commit that referenced this pull request Oct 15, 2014
Adding Union Types and Type Guards to Language Specification
@ahejlsberg ahejlsberg merged commit 49e606a into master Oct 15, 2014
@mhegazy
Copy link
Contributor

mhegazy commented Oct 15, 2014

@sheetalkamat is up for this round of spec conformance.


***Union types*** represent values that may have one of several disjoint representations. A value of a union type *A* | *B* is a value that is *either* of type *A* or type *B*. Union types are written using union type literals (section [3.6.6](#3.6.6)).

A union type encompasses an unordered set of unrelated types (that is, types that aren�t subtypes of each other). The following rules govern union types:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we okay with these s in the markdown? Can we convert smartquotes to regular quotes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #905.

@ahejlsberg ahejlsberg deleted the langSpecUnionTypes branch October 16, 2014 21:05
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
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.

4 participants