Redux ^4.0.0 | Type 'S' does not satisfy the constraint 'Dispatch<AnyAction>'.
See original GitHub issueDo 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
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:16 (4 by maintainers)
Top Results From Across the Web
Type 'ActionTypes' does not satisfy the constraint 'Action<any ...
I am writing a TypeScript application using React and Redux and am having a problem. I need a second default ...
Read more >4.0.0 - redux - npm
Predictable state container for JavaScript apps. Latest version: 4.2.0, last published: 8 months ago. Start using redux in your project by ...
Read more >Getting a weird error using Typescript and Styled Components.
I'll post it here in a bit when I have access to my project. Edit: [ts]Type 'ButtonProps' does not satisfy the constraint 'ComponentType<any>'....
Read more >Redux Toolkit TypeScript Quick Start
Since these are actual variables, not types, it's important to define them in a separate file such as app/hooks.ts , not the store...
Read more >'"react-router-dom"' has no exported member 'switch' - You.com
You could try removing the @types/react-router-dom dependency, in v6 types were shipped ... error TS2344: Type 'S' does not satisfy the constraint 'State'....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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.