Last active
January 9, 2017 10:30
-
-
Save kuy/f8dbcb6f1dec087287170d3177c8313f to your computer and use it in GitHub Desktop.
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
/* @flow */ | |
type FN = (x: string) => number; | |
type FS = (x: number) => string; | |
type F = FN | FS; // Union types | |
declare var toS: FS; | |
declare var toN: FN; | |
declare var toF: F; | |
toF(1); // Error! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment