import { Dispatch, SetStateAction } from 'react'; import { ContextStoreInitializer, Thunk, ActionCreatorWithPayload, PayloadActionCreator, PayloadAction } from '../types'; /** * Augments React's useReducer() hook * so that the action dispatcher supports thunks. */ declare const useReducerWithThunk: , I extends Record = S, A extends object = ActionCreatorWithPayload>(reducer: (state: S, action: A | Partial | SetStateAction | PayloadAction) => S, initialState: I extends S ? S : I, initializer?: ContextStoreInitializer, derivedStateFromProps?: Partial) => [S, Dispatch | Thunk | ActionCreatorWithPayload | PayloadActionCreator | A | SetStateAction | Partial>, boolean]; export default useReducerWithThunk;