-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type declaration doesn't allow for none default action types #33
Comments
Yes, the definitions really need to be updated:
But not sure, if the Reducer type from the npm package typesafe-actions is the most most generic Reducer type. |
This was referenced Feb 17, 2020
Closed
This is really needed 😅 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if the reducer uses a type for action that isn't the base redux
Action
typescript can't resolve what overload to usegiven the reducer
typescript reports on initialState
Argument of type 'State' is not assignable to parameter of type 'Reducer<State>'. Type 'State' provides no match for the signature '(state: State, action: Action): State'.ts(2345)
even changing the
AddAction
&MulAction
interface toresults in the same error
i haven't found a solution to the types but a workaround is to cast the reducers to the default reducer
this was tested in typescript 3.5.0 3.5.2 & 3.5.3
typescript doesn't report the error with
"strict"=false
The text was updated successfully, but these errors were encountered: