Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ts): reorder generic parameters of IProduce
This makes the different call signatures of `produce` have a similar order of generic parameters when possible. Before: produce<Base, [number, string]>((draft, num, str) => {}) // no default produce<Base, Draft<Base>, [number, string]>((draft, num, str) => {}, defaultValue) After: produce<Base, [number, string]>((draft, num, str) => {}) // no default produce<Base, [number, string]>((draft, num, str) => {}, defaultValue) As you can see, the draft type is no longer the 2nd generic parameter of curried producers with a default value, which is just like the call signature for curried producers without a default value. This also moves the `D` generic parameter of `produce(base, recipe)` to the end, so you can specify the `Return` parameter easier.
- Loading branch information