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 to index.js #1108

Closed
wants to merge 1 commit into from
Closed

Add @flow to index.js #1108

wants to merge 1 commit into from

Conversation

NachoCasta
Copy link

Hi!
I just started using react-map-gl for a project I'm doing, where I'm also using flow. In order to do so, I had to create a stub for react-map-gl declaring all types to be any.
However, I just realized that the library is already flow typed, which is awesome, but flow still complains that I'm exporting from an untyped module.
Looking into #681, it seems I'm not the only one who noticed this. I'm not sure if this would solve the issue or what is the proper way to expose these types to the consumers but if it is not I would be happy to help if someone points me in the right direction.

Hi!
I just started using react-map-gl for a project I'm doing, where I'm also using flow. In order to do so, I had to create a stub for react-map-gl declaring all types to be any.
However, I just realized that the library is already flow typed, which is awesome, but flow still complains that I'm exporting from an untyped module.
Looking into visgl#681, it seems I'm not the only one who noticed this. I'm not sure if this would solve the issue or what is the proper way to expose these types to the consumers but if it is not I would be happy to help if someone points me in the right direction.
@Pessimistress
Copy link
Collaborator

I don't believe this will work. We may need to do something like https://www.jackfranklin.co.uk/blog/npm-flowjs-javascript/

@Pessimistress
Copy link
Collaborator

Looks like we just need to create an additional index.js.flow file: facebook/flow#1996 (comment)

@NachoCasta
Copy link
Author

Awesome! I'll give it a try.

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.

2 participants