Skip to content
Myr

refactor(ts): curriedProduce function

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Alec Larson · committed by Alec Larson · parent 8925080 · Browse files · 1 file+2 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−3 removed

  • other:+2 added−3 removed

1 file+2 added−3 removed

modified:src/immer.js+2 added-3 removed
37 unmodified lines
38 // curried invocation39 if (typeof base === "function" && typeof recipe !== "function") {40 const defaultBase = recipe41 recipe = base42 const self = this4244 // prettier-ignore43 const self = this44 return function curriedProduce(base = defaultBase, ...args) {46 return self.produce(base, draft => recipe.call(this, draft, ...args))45 return self.produce(base, draft => recipe.call(this, draft, ...args)) // prettier-ignore46 }47 }4849 // prettier-ignore
239 unmodified lines