Skip to content

Instantly share code, notes, and snippets.

@AprilArcus
Created January 24, 2016 21:00
Show Gist options
  • Save AprilArcus/e1deb5791c0b4fe46388 to your computer and use it in GitHub Desktop.
Save AprilArcus/e1deb5791c0b4fe46388 to your computer and use it in GitHub Desktop.
/* @flow */
export function foo(test: boolean, callback: () => Array<number>): Array<number|string> {
if (test) return [1, '1'];
return callback();
}
3: export function foo(test: boolean, callback: () => Array<number>): Array<number|string> {
^^^^^^ string. This type is incompatible with
3: export function foo(test: boolean, callback: () => Array<number>): Array<number|string> {
^^^^^^ number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment