You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 25, 2022. It is now read-only.
Right now I have to specify that the action is ReturnType<typeof completeSurvey> (TypeScript can't infer the type of the action) but in the other way, TypeScript will be able to do it.
The text was updated successfully, but these errors were encountered:
Additional Context
Hi Sergio,
I've been playing around with this library and I've been thinking about improving some types.
Right now, action types are not bound to their payload. Wouldn't be better if we can do something like?
so when I create an action I don't have to specify the payload type, but the benefit will be that in the reducer I could know the type of the action.
So for example in this code:
Right now I have to specify that the action is
ReturnType<typeof completeSurvey>
(TypeScript can't infer the type of the action) but in the other way, TypeScript will be able to do it.The text was updated successfully, but these errors were encountered: