/// import { Reducer } from "./types"; export interface Store { useState(nextObserveState?: (keyof S)[]): S; useDispatch(): (action: any, callback?: () => void) => void; persist(state: S, action: { type: any; }): void; setToState(): Promise; dispatch: (action: any, callback?: () => void) => void; state: S; } export interface PrivateStore extends Store { stateContext: React.Context; dispatchContext: React.Context<(action: any, callback?: () => void) => void>; reducer: Reducer; initialState: S; persistKey?: string; } /** * This function give you an store, use that in your components which want to * connect to store and provider */ export declare const createStore: ({ reducer, initialState, mapStateToPersist, storage, persistKey, }: { reducer: Reducer>; initialState: T; /** window.localStorage, window.sessionStorage, AsyncStorage supported */ storage?: any; persistKey?: string | undefined; mapStateToPersist?: ((state: T) => Partial) | undefined; }) => Store; //# sourceMappingURL=createStore.d.ts.map