-
Notifications
You must be signed in to change notification settings - Fork 9
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
bindThunkAction uses incorrect typings for dispatch #12
Comments
Hmm can you explain what was wrong with the examples for v2? |
Also, for the v1 error, can you try specifying types for the state and the error?, ie:
|
@jussikinnula I'm probably not going to backport a fix for 1.x at this point. I've updated the v2 branch (beta version) to support redux@4.x and redux-thunk@2.3.x. Please see here for more details: #11 (comment) |
This is for the old
typescript-fsa-redux-thunk
v1.0.1 (I did try already 2.0.0 beta.8, but the examples didn't work, and it might actually not be production ready yet).Example code:
Using
dispatch(foo(param)))
gives an error:Type '{ async: AsyncActionCreators<any, any, Error>; action: ThunkActionCreator<any, Promise<any>, stri...' is not assignable to type 'ActionCreator<any>'.
The workaround we're using at the moment is to define type for dispatch as plain
Function
.I know that typescript-fsa-redux-thunk v2 should fix also the issue, but it would be nice to try to fix v1 also before getting v2 production ready.
The text was updated successfully, but these errors were encountered: