import { Dispatch } from "redux"; import { Action } from "redux-actions"; interface AsyncPayload { loading: boolean; item?: Payload | Error; parameters: any[]; } type AvailableType = Action | ActionDispatcher; type AsyncAction = Action>; type ActionDispatcher = (dispatch: Dispatch>) => void; type AsyncActionDispatcher = ( dispatch: Dispatch> ) => Promise; type PromiseCreator = (...args: any[]) => Promise; type AvailableCreator = (...args: any[]) => AvailableType[]; type AsyncActionCreator = (...args: any[]) => AsyncActionDispatcher[]; type ActionCallback = () => Action | void;