Last active
October 2, 2016 23:05
-
-
Save JoeStanton/759f75bdb7fe61fbbe12c2ff50166ff6 to your computer and use it in GitHub Desktop.
Flow Runtime Types
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
type Suit = | |
| "Diamonds" | |
| "Clubs" | |
| "Hearts" | |
| "Spades"; | |
// Babel transformed into Flow AST: | |
export const SuitType = { | |
type: 'UnionTypeAnnotation', | |
types: | |
[ { type: 'StringLiteralTypeAnnotation', value: 'Diamonds' }, | |
{ type: 'StringLiteralTypeAnnotation', value: 'Clubs' }, | |
{ type: 'StringLiteralTypeAnnotation', value: 'Hearts' }, | |
{ type: 'StringLiteralTypeAnnotation', value: 'Spades' } ] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment