pbomb / flow-immutable-models

Generates model classes from Flow types using Immutable.js
42 stars 8 forks source link

Added getIn and setIn to ImmutableModel, modified fromJS to call cons… #11

Closed Heedster closed 7 years ago

Heedster commented 7 years ago

…tructor with this() for compatibility for extending classes.

pbomb commented 7 years ago

Thanks, @Heedster! I'll try to get to this merged today. I'll need to add / update the tests for it. As the first outside contribution, this shows that I need to add some more docs about contributing to this project. If you'd like to update this pull request with tests, that'd be great, too.

pbomb commented 7 years ago

Also note that I'm hesitant to add these functions as they cannot be type-checked, but will add them to be used as escape hatches when performance is needed or some similar situation.

Heedster commented 7 years ago

These functions will help adoption of the lib. I am using this for an already existing project, where Map is used directly in a lot of places and has usages of getIn and setIn at multiple places. I want to slowly migrate everything to use getters and setters, but do not want to break anything existing for now.

pbomb commented 7 years ago

That's reasonable. I'll get this in and add some tests.

pbomb commented 7 years ago

I've released version 0.6.0 with these changes. Thanks!

Heedster commented 7 years ago

Awesome!