Skip to content

Instantly share code, notes, and snippets.

@kuy
Last active January 9, 2017 10:30
Show Gist options
  • Save kuy/f8dbcb6f1dec087287170d3177c8313f to your computer and use it in GitHub Desktop.
Save kuy/f8dbcb6f1dec087287170d3177c8313f to your computer and use it in GitHub Desktop.
/* @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