Skip to content

Instantly share code, notes, and snippets.

@vramdal
Created March 30, 2018 12:44
Show Gist options
  • Save vramdal/462db673c22e56e4c5546990b9820cd2 to your computer and use it in GitHub Desktop.
Save vramdal/462db673c22e56e4c5546990b9820cd2 to your computer and use it in GitHub Desktop.
Flow issue: Referencing this class as exported
// @flow
import ClassB from "./ClassB";
export default class ClassA {
constructor(objB : ClassB) {
}
}
// @flow
import ClassA from "./ClassA";
export default class ClassB {
func(objB : ClassB) : void {
let classA = new ClassA(objB); // Flow: Cannot call `ClassA` with `objB` bound to `objB` because `ClassB` [1] is incompatible with `ClassB` [2].
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment