Skip to content

Instantly share code, notes, and snippets.

@amasad
Last active August 29, 2015 14:12
Show Gist options
  • Save amasad/d54e240dc4b336e5d471 to your computer and use it in GitHub Desktop.
Save amasad/d54e240dc4b336e5d471 to your computer and use it in GitHub Desktop.
/* @flow */
// This works:
class Foo {
test(n: ?number): boolean {
if (n == null) {
return false;
} else {
return n > 10;
}
}
}
// This doesn't work:
class Foo {
n: ?number;
test(): boolean {
if (this.n == null) {
return false;
} else {
return this.n > 10;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment