🐛 Bug Report
When using currying, produce doesn't return the original type
Link to repro
https://codesandbox.io/s/immer-sandbox-forked-342jd?file=/src/index.ts
To Reproduce
Use produce function without data and check the return type.
Observed behavior
Curried produce returns:
const updatedCache2: (oldAssignments: Assignment[]) => <Base extends readonly {
readonly assignmentBk: string;
readonly contentBk: string;
readonly createdDate: Date;
readonly startDate: Date;
readonly dueDate: Date;
readonly done: boolean;
}[]>(base?: Base) => Base
Expected behavior
Curried produce returns the original type.
I need it, because it fails when using with Ramda's pipe function.
Environment
We only accept bug reports against the latest Immer version.
🐛 Bug Report
When using currying,
producedoesn't return the original typeLink to repro
https://codesandbox.io/s/immer-sandbox-forked-342jd?file=/src/index.ts
To Reproduce
Use
producefunction without data and check the return type.Observed behavior
Curried
producereturns:Expected behavior
Curried
producereturns the original type.I need it, because it fails when using with Ramda's
pipefunction.Environment
We only accept bug reports against the latest Immer version.
setUseProxies(true)setUseProxies(false)(ES5 only)