redux-observable: Redux ^4.0.0 | Type 'S' does not satisfy the constraint 'Dispatch'.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When upgrading to redux@next (^4.0.0) I get
ERROR in [at-loader] ./node_modules/redux-observable/index.d.ts:32:56
TS2344: Type 'S' does not satisfy the constraint 'Dispatch<AnyAction>'.
index.d.ts
export declare interface Epic<T extends Action, S, D = any, O extends T = T> {
(action$: ActionsObservable<T>, store: MiddlewareAPI<S>, dependencies: D): Observable<O>;
}
[ts] Type 'S' does not satisfy the constraint 'Dispatch<AnyAction>'.
If the current behavior is a bug, please provide the steps to reproduce and a minimal demo of the problem using JSBin, StackBlitz, or similar.
Example repo: https://github.com/tompuric/example-app
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 9
- Comments: 16 (4 by maintainers)
@danielfigueiredo redux-observable indeed needs to be updated but not just typings there were behavior breaking changes as well that impact us. One of the changes involves no longer passing the root epic to createEpicMiddleware, which is part of #493
redux4 support is coming I promise!
Iām running beta1 and redux 4 with no issues.
I have the same issue. It is the main issue that prevents us from upgrading to Redux 4
Not sure, I was actually about to ask that. I saw https://github.com/redux-observable/redux-observable/pull/501/files got merged in, which is awesome š š I just linked the actual Redux v4 support issue I found to this one, since they are related. I will try it out and come back here later!