UNPKG

606 BTypeScriptView Raw
1/// <reference types="react" />
2import type { Store } from 'redux';
3export declare const StoreContextFactory: <STORE extends Store<any, import("redux").AnyAction>>(store: STORE) => {
4 Context: import("react").Context<STORE>;
5 mapStoreState: <P extends {}, SP extends {}>(mapStateToProps: (state: ReturnType<STORE["getState"]>) => SP, stateKeysToWatch: (keyof ReturnType<STORE["getState"]>)[]) => (props: P) => import("tsfn").TExtend<P, SP>;
6 mapStoreDispatch: <K extends string>(dispatchName: K) => <P_1 extends {}>(props: P_1) => import("tsfn").TExtend<P_1, { [k in K]: STORE["dispatch"]; }>;
7};