-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
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
Flow considers React types to be any-typed values if they are imported in a flow-typed module #8570
Comments
One way to get around this - use the internal names. So rather than |
Something's really funky here, it's because of the
Note: react types are still part of Flow core, it's only react-dom that got moved to flow-typed for now. |
In library definitions, the imports must be inside a declaration block.
|
Regarding 1., I'm expecting I was unaware there were plans of moving out React types from Flow core. Thanks for the info. |
TIL: "By default, the flow-typed folder in your project root directory is included as a library directory. " |
https://github.com/facebook/flow/blob/master/Changelog.md#01430 |
This issue can be closed, because (as the last comment indicates) it was fixed in v0.143.0. This is the same issue as #6414 and some other issue threads linked to that one. See #6414 (comment) and the next comment for more detail on the fix. |
Flow version: 0.132.0 and above
Expected behavior
Now flow error
Actual behavior
Flow emits an error when I use a React type that has been imported in a flow-typed module.
Github repo: https://github.com/debel27/flow-issue_value-as-type
To reproduce : clone the project, run
yarn
, then runyarn run flow
The emitted error is the following
The text was updated successfully, but these errors were encountered: