import { Reducer } from 'react'; type AsyncDispatch = (action: TAction) => Promise; type StorageableReducer = [TState, AsyncDispatch]; declare function usePersistedReducer(reducer: Reducer, /** * Used when initial state has not been loaded yet */ initialState: TState, /** * Called once when the component is mounted */ loadInitialState: () => Promise, /** * Called each time the dispatch is called */ saveState: (state: TState) => Promise): StorageableReducer; export { usePersistedReducer };