-
Notifications
You must be signed in to change notification settings - Fork 1
actionsDict
is not bound to this
#2
Comments
Having a look at it. (Somehow this project got unwatched on my github so i never saw your issues). |
While the binding issue has been fixed, I couldnt find a decent fix for the inference issues without changing |
I Might have found a solution for the inference issue. Here's a patch for it This builds on the PR #4. The idea is to explicitly add typing for I did not sent PR for this because this breaks the subdomain specs and currently I don't have time to look at it. |
I probably have tried something similar and ended up in a loophole where one of the inferred types got to I'll have a look on your gist, thanks! In the worst case, ts3.0 is promising partial inference which may fix things that require this curry workaround. |
Do you see this with TS 2.9? Seems to be working for me just fine. |
Seems it only happens when you return something from About your suggestion, that erases the I have also tried adding a generic So, ugly as it seems, |
Yeah, I misunderstood the typing situation. But I played with style of API from scratch and found out that it can be implemented using classes. So I ended up creating Immer Reducer based on it. |
Offtopic: I have put redux on soak for the moment. One big issue was the struggle to bring type inference to stateful (classy) connected components. |
Ie. cannot call another action via
this
.Example:
This gives weird type errors
and also errors in runtime because
this
is undefined.I managed to workaround this with following helper:
The text was updated successfully, but these errors were encountered: