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

Handle state objects which are Maps #50

Merged

Conversation

jamiedust
Copy link
Contributor

This solves the issue in #49 by checking whether the state object is a Map. What this PR does not cover is using Immutable JS without combineReducers, however I think this is a more specialised case and would be best handled as an extension of some kind, or a forked version of the project.

I am new to Flow so you may want to look at annotating the state argument, I had a look at defining a Map containing a LocaleState object however Flow didn't seem to like it. It does not however complain when not defining a Map type, probably because Map is in most respects just an object. I am happy to look further into this.

@ryandrewjohnson
Copy link
Owner

I have confirmed that for both TypeScript and Flow that type Object covers type Map as well. These changes will be going in with the next release - thanks for the contribution!

@ryandrewjohnson ryandrewjohnson merged commit cc4bca9 into ryandrewjohnson:master Feb 3, 2018
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