Created
March 16, 2016 15:28
-
-
Save jeffmo/46781c4a830624121486 to your computer and use it in GitHub Desktop.
This file contains 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 | |
import EventEmitter from 'eventemitter3'; | |
class foo extends EventEmitter { | |
} | |
const x = new foo(); | |
x.bar(); //Should error as bar is not a method of foo. - does not. Changing |
This file contains 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 version | |
Flow, a static type checker for JavaScript, version 0.22.0 | |
> flow check | |
main.js:9 | |
9: x.bar(); //Should error as bar is not a method of foo. - does not. Changing | |
^^^ property `bar`. Property not found in | |
9: x.bar(); //Should error as bar is not a method of foo. - does not. Changing | |
^ foo | |
Found 1 error |
This file contains 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
declare module 'eventemitter3' { | |
declare class EventEmitter {} | |
declare var exports: Class<EventEmitter>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment