Closed
Description
Bug Report
Package name / version
Description
I am trying to use a simple method from my store:
store.dispatch(ThunkAction);
It is working on run time, but I am receiving an error message on Typescript:
TS2345: Argument of type 'ThunkAction<Promise<AuthorizationDto | null>, State, unknown, SetAuthorizationAction>' is not assignable to parameter of type 'AnyAction'. Property 'type' is missing in type 'ThunkAction<Promise<AuthorizationDto | null>, State, unknown, SetAuthorizationAction>' but required in type 'AnyAction'.
I already tried to import the extend-redux like that:
import 'redux-thunk/extend-redux';
But the problem is the run time does not find file =S.
I already tried every single solution that's I found on the previous issues, but non of them worked for me.
Steps to reproduce
- Install the redux-thunk using "npm install"
- Create a ThunkAction
- Call the
store.dispatch(ThunkAction)
- See typescript Type error
Expected behavior
No error message from typescript when using store.dispatch(ThunkAction)
Environment
- OS: macOS Monterey 12.3.1
- Node/npm version: node v16.14.2 / npm 8.5
- Platform: React Native iOS/Android
Metadata
Metadata
Assignees
Labels
No labels