This repository was archived by the owner on Mar 7, 2023. It is now read-only.
This repository was archived by the owner on Mar 7, 2023. It is now read-only.
All in one file works, separate files do not work #20
Closed as not planned
Description
Test repo: https://github.com/rosskevin/test-react-flow-types
[email protected]
. Same results with 0.58.0
, 0.57.3
[email protected]
All in one
The allInOne.js
works fine, which is the same in try flow
Considering that it might be a problem with the imported type Translate
, I have further simplified the repo (though left the more complicated case as a branch)
Separate files
Does not work.
See index.js
TL;DR
yarn flow
should work for all files in this repo.
yarn flow ✘ 1
yarn run v1.3.2
warning package.json: No license field
$ flow --show-all-errors
Error: src/index.js:8
8: <ClassTest />
^^^^^^^^^^^^^ props of React element `ClassTest`. This type is incompatible with
6: class ClassTest extends React.Component<{ t: Function }> {
^^^^^^^^^^^^^^^ object type. See: src/ClassTest.js:6
Property `t` is incompatible:
6: class ClassTest extends React.Component<{ t: Function }> {
^^^^^^^^^^^^^^^ property `t`. Property not found in. See: src/ClassTest.js:6
8: <ClassTest />
^^^^^^^^^^^^^ props of React element `ClassTest`
Found 1 error
@rsolomon - I'm baffled here. I modeled the translate
after withStyles
and kept running into a wall. Finally I created this test repo to isolate and still the same problem.
Thoughts?
Metadata
Metadata
Assignees
Labels
No labels