import { Store } from "../src/index"; import * as React from "react"; export interface StoreProviderProps { store: Store<{}>; } export declare class StoreProvider extends React.Component { render(): JSX.Element; } export declare const StoreConsumer: React.Consumer | undefined>; export interface StoreSliceProps { slice: (store: Store) => TKey; initialState?: TAppState[TKey]; cleanupState?: TAppState[TKey] | "delete" | "undefined"; } export declare class StoreSlice extends React.Component, {}> { slice?: Store; componentWillUnmount(): void; render(): JSX.Element; } export interface StoreProjectionProps { forwardProjection: (state: TState) => TProjected; backwardProjection: (projectedState: TProjected, parentState: TState) => TState; cleanup?: (state: TProjected, parentState: TState) => TState; initial?: (state: TState) => TProjected; } export declare const StoreProjection: { new (props: Readonly>): { slice?: Store | undefined; componentWillUnmount(): void; render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; }; new (props: StoreProjectionProps, context?: any): { slice?: Store | undefined; componentWillUnmount(): void; render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): boolean; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly>, prevState: Readonly<{}>): any; componentDidUpdate?(prevProps: Readonly>, prevState: Readonly<{}>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly>, nextState: Readonly<{}>, nextContext: any): void; }; contextType?: React.Context | undefined; }; export declare class WithStore extends React.Component<{}, {}> { render(): JSX.Element; } /** * A react hook to obtain the current store, depending on the context. */ export declare function useStore(): Store;