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

[TS] Allow extraArgs for curried producer with initial state #274

Closed
wants to merge 1 commit into from

Conversation

geirsagberg
Copy link

After upgrading to TypeScript 3.2.2, I started getting errors when using immer for reducers with initial state:

image

It worked if I used the curried producer without initial state, but not with initial state. So I tried adding extraArgs to the curried producer with initial state, and it started working again.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 97.302% when pulling 19527cb on geirsagberg:master into fa5bf5d on mweststrate:master.

@aleclarson
Copy link
Member

Yeah, I caught this one yesterday, but haven't pushed the fix (which is slightly different than this). I'll have it released in v1.9.3. Thanks for contributing!

@aleclarson aleclarson closed this Dec 18, 2018
aleclarson added a commit that referenced this pull request Dec 18, 2018
- fix edge cases with inferred return value
- ensure `nothing` can be distinguished from `undefined`
- allow rest arguments for curried producer w/o initial state

Fixes #274
Fixes #275
aleclarson added a commit that referenced this pull request Dec 18, 2018
- infer the base type properly
- infer the return type properly
- ensure `nothing` can be distinguished from `undefined`
- allow rest arguments for curried producer w/o initial state

Fixes #273
Fixes #274
Fixes #275
aleclarson added a commit that referenced this pull request Dec 18, 2018
- infer the base type properly
- infer the return type properly
- ensure `nothing` can be distinguished from `undefined`
- allow rest arguments for curried producer w/o initial state

Fixes #273
Fixes #274
Fixes #275
@aleclarson
Copy link
Member

🎉 This issue has been resolved in version 1.9.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

3 participants