Open
Description
🙋♂ Question
I am unable to pass generic parameter type to my produce function in order to propagate that generic to type of draft itself like so:
SearchContextProvider:
Reducer:
State for the draft to be applied:
Error:
This only occures with generic, if I use concrete type I won't get such error (namely If I replace generic with ResultDummy
- error vanishes.
How do I go about it since this Provider supposed to be used in different part of the code and should receive different type depends on part of the code where it is used. Thank you!
Here is playground where I reproduced the issue:
https://codesandbox.io/s/produce-with-generic-vchkj4
Environment
We only accept questions against the latest Immer version.
- Immer version: "^10.1.1"
Activity