chore: type is updated for thunk

This commit is contained in:
Palash gupta 2022-05-06 11:27:23 +05:30
parent 75cdac376f
commit f149258de2
No known key found for this signature in database
GPG Key ID: 8FD05AE6F9150AD6

View File

@ -1,5 +1,6 @@
import { applyMiddleware, compose, createStore } from 'redux';
import thunk, { ThunkMiddleware } from 'redux-thunk';
import AppActions from 'types/actions';
import reducers, { AppState } from './reducers';
@ -8,8 +9,9 @@ const composeEnhancers =
const store = createStore(
reducers,
// @TODO Add Type for AppActions also
composeEnhancers(applyMiddleware(thunk as ThunkMiddleware<AppState>)),
composeEnhancers(
applyMiddleware(thunk as ThunkMiddleware<AppState, AppActions>),
),
);
export default store;