Closed zdila closed 2 years ago
Is there any fix for this? It renders createReducer
useless for me if handleAction
cannot understand its return type
This is typescript limitation, doesn't have anything to do with the library. Just provide an explicit return type and it will work as expected.
I am not sure if it is a bug or feature, but this compiles just OK:
If it is the feature, why
handleAction
allows returning object with properties not present in the state type? This way the compiler will not catch some errors.