Typescript: How to type the Dispatch in Redux
问题 For example I want to remove the dispatch: any here: export const fetchAllAssets = () => (dispatch: any) => { dispatch(actionGetAllAssets); return fetchAll([getPrices(), getAvailableSupply()]).then((responses) => dispatch(actionSetAllAssets(formatAssets(responses)))); } There are 2 actions I dispatch above, actionsGetAllAssets and actionsSetAllassets . Here are the interfaces and actionCreators for both: // Interfaces interface IActions { GET_ALL_ASSETS: string; SET_ALL_ASSETS: string; GET