fix: correct curried produceWithPatches return type (#1249)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
The curried forms of produceWithPatches inferred the wrong type: - produceWithPatches(recipe) returned the draft type (WritableDraft<State>) in the result tuple instead of the original State - the explicit-generic form produceWithPatches<State, Args>(recipe) resolved to never and was not callable IProduceWithPatches was missing the <State, Args> curried overloads that IProduce already has. Mirror those overloads, wrapped in PatchesTuple, so the curried produceWithPatches infers the same state type as produce. Closes #1045
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+51 added−0 removed
- tests:+35 added−0 removed
- other:+16 added−0 removed