Skip to content

Instantly share code, notes, and snippets.

@jeffmo
Created May 4, 2016 17:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffmo/0682a06fc212378bd8d46f2ae159b4ef to your computer and use it in GitHub Desktop.
Save jeffmo/0682a06fc212378bd8d46f2ae159b4ef to your computer and use it in GitHub Desktop.
// @flow
const a: number = 'asdf';
const b: string = 2;
> flow version
Flow, a static type checker for JavaScript, version 0.24.0
> flow check
main.js:3
3: const a: number = 'asdf';
^^^^^^ string. This type is incompatible with
3: const a: number = 'asdf';
^^^^^^ number
main.js:4
4: const b: string = 2;
^ number. This type is incompatible with
4: const b: string = 2;
^^^^^^ string
Found 2 errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment