-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 support #165
Comments
@mondaychen Do you know how we would do this? |
A neat trick is publishing the // @flow
export * from '../src/index.js`; Flow should pick that up and use the source directly. PS: Relay had this problem for years and they have been working on it recently. They might have some clues. |
Thanks @AlicanC for bringing this up! I'll chat with someone in Relay team about it. |
Is there any news on this. Using If there aren't plans to add this, happy to work on a PR to ship as part of flow-typed like what |
@aaronabramov or @mondaychen - Can @Brianzchen help with this? |
unless we figure out the way to generate types automatically |
Adding it through flow-typed means to manually build and maintain a flow type file, correct? |
Definitely agree if we want to ship types, doing within the project is more desirable. The other option is https://github.com/Macil/flow-copy-source which simply dumps source code back into |
If |
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
Recoil is written in Flow, but it's published without the types so the information is lost. Would be great if Flow types were published with the library.
The text was updated successfully, but these errors were encountered: