We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello!
Flow types works correctly with the code below:
/* @flow */ const movable = (Base): Class<*> => { return class extends Base { move() { console.log('move'); } } } class Person { firstName: string; constructor(firstName: string) { this.firstName = firstName; } } const MovablePerson = movable(Person); const p = new MovablePerson('John'); p.firstName = 1; // Flow => // 22: p.firstName = 1; // ^ number. This type is incompatible with // 12: firstName: string; // ^ string
But the same code splitted into multiple .js files don't:
.js
// Movable.js export const movable = (Base): Class<*> => { return class extends Base { move() { console.log('move'); } } } // Main.js import {movable} from './Movable.js'; class Person { firstName: string; constructor(firstName: string) { this.firstName = firstName; } } const MovablePerson = movable(Person); const p = new MovablePerson('John'); p.firstName = 1; // Flow doesn't complain anymore but should
Hope that will help
The text was updated successfully, but these errors were encountered:
These import related issues should be resolved a long time ago since types first
Sorry, something went wrong.
No branches or pull requests
Hello!
Flow types works correctly with the code below:
But the same code splitted into multiple
.js
files don't:Hope that will help
The text was updated successfully, but these errors were encountered: