Skip to content
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

Add flow annotation to index & hooks #429

Merged
merged 1 commit into from
Aug 28, 2020

Conversation

tcirstea
Copy link
Contributor

Summary:

Including react-native-community/async-storage in a new project with flow doesn't actually work due to the index file not having the flow annotation. (Blank project with [declarations] node_modules/** in the flowconfig, flow version 0.132.0)

This change adds flow annotations. Runtime wise this is only a comment and thus can't break anything other than flow itself (which still works).

Screen Shot 2020-08-26 at 6 27 14 PM

Test Plan:

yarn test still works.
I'm not completely familiar with how the build process works, but my understanding is that the .flow files in lib will be copied over as is. Thus, the output would look like this, and flow typing would now work:
Screen Shot 2020-08-27 at 11 36 37 AM

If this looks good, I can also bump the version before merging if you'd like.

Copy link
Member

@krizzu krizzu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coolio, thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants