Created
October 18, 2016 18:24
-
-
Save jeffmo/2011c226a0a73b80ec3f097e42a1cada 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 | |
const K = require('./main'); | |
new K({errorHandler(err) { err.code; }}); |
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 | |
type Options = { | |
errorHandler?: (err: Error) => void, | |
}; | |
class K { | |
constructor(options: Options) { | |
} | |
} | |
module.exports = K; | |
/* | |
new K({ | |
errorHandler(err) { | |
err.code; | |
}, | |
}); | |
*/ |
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.33.0 | |
> flow check | |
dep.js:5 | |
5: new K({errorHandler(err) { err.code; }}); | |
^^^^ property `code`. Property not found in | |
5: new K({errorHandler(err) { err.code; }}); | |
^^^ Error | |
Found 1 error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment