We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
produceWithPatches returns Immutable while produce is not.
produceWithPatches
produce
That makes really hard to share the results between those two without forceful typecasting.
https://codesandbox.io/s/immer-immutabe-type-mismatch-wvlid
newData can't be reassigned when using produceWithPatches because of the Immutability
The type 'readonly { readonly name: string; }[]' is 'readonly' and cannot be assigned to the mutable type 'DataObject[]'
results from produce can be reassigned to results from produceWithPatches
The text was updated successfully, but these errors were encountered:
d8f2636
🎉 This issue has been resolved in version 9.0.12 🎉
The release is available on:
Your semantic-release bot 📦🚀
Sorry, something went wrong.
No branches or pull requests
🐛 Bug Report
produceWithPatches
returns Immutable whileproduce
is not.That makes really hard to share the results between those two without forceful typecasting.
Link to repro
https://codesandbox.io/s/immer-immutabe-type-mismatch-wvlid
Observed behavior
newData can't be reassigned when using
produceWithPatches
because of the ImmutabilityExpected behavior
results from
produce
can be reassigned to results fromproduceWithPatches
Environment
The text was updated successfully, but these errors were encountered: