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
Expose flow typings with gen-flow-files #468
Conversation
@mondaychen This uses gen-flow-files as you recommended. Tested and it works but I also have types-first enabled so not sure what I should do when I export my
Edit: Realised I can import type with |
Thanks! I should be able to get back to you on Tuesday |
OK I think we are good with this approach. You mentioned "This generates tons of flow errors that can't be resolved though so users have to add the dependency to their |
@mondaychen anymore work needs to go into this? |
@drarmstr I think this PR is complete, don't think there's any more work needed, can you advise? |
Sorry @Brianzchen for being slow on this. I will create a flow-based application later this week and see how well it works. Then I'll get back to you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mondaychen has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@mondaychen merged this pull request in 4a25ce6. |
Hello, I'm trying to get flow types working for React but I still encounter Any guidance on how to actually get flow to pick up these types? Do I need to do anything else with .flowconfig? |
Looks like recoil still ships with flow types. What does your flowconfig look like? Best to make sure you're not excluding recoil in your ignore group. |
Summary: Fixes facebookexperimental/Recoil#165 Use https://github.com/lessmess-dev/gen-flow-files to generate flow type definitions for consuming applications This generates tons of flow errors that can't be resolved though so users have to add the dependency to their `[declarations]` ``` [declarations] .*node_modules/recoil/.* ``` Otherwise you get errors such as: <img width="908" alt="Screen Shot 2020-07-11 at 7 47 03 pm" src="https://user-images.githubusercontent.com/12436524/87221437-53bfe700-c3af-11ea-9ab5-31a1c7c82d40.png"> Pull Request resolved: facebookexperimental/Recoil#468 Reviewed By: drarmstr Differential Revision: D23144185 Pulled By: mondaychen fbshipit-source-id: 7359ac1e75b29cfa24ef516f1a3d7ed0221d3a29
Summary: Fixes facebookexperimental/Recoil#165 Use https://github.com/lessmess-dev/gen-flow-files to generate flow type definitions for consuming applications This generates tons of flow errors that can't be resolved though so users have to add the dependency to their `[declarations]` ``` [declarations] .*node_modules/recoil/.* ``` Otherwise you get errors such as: <img width="908" alt="Screen Shot 2020-07-11 at 7 47 03 pm" src="https://user-images.githubusercontent.com/12436524/87221437-53bfe700-c3af-11ea-9ab5-31a1c7c82d40.png"> Pull Request resolved: facebookexperimental/Recoil#468 Reviewed By: drarmstr Differential Revision: D23144185 Pulled By: mondaychen fbshipit-source-id: 7359ac1e75b29cfa24ef516f1a3d7ed0221d3a29
Fixes #165
Use https://github.com/lessmess-dev/gen-flow-files to generate flow type definitions for consuming applications
This generates tons of flow errors that can't be resolved though so users have to add the dependency to their
[declarations]
Otherwise you get errors such as: