/// <reference types="react" />
declare class Store<T extends object> {
    private state;
    private listeners;
    constructor(initialState: T);
    getState(): T;
    setState(partialState: Partial<T> | ((prevState: T) => Partial<T>), callback?: (state: T) => void, key?: string): void;
    subscribe(listener: () => void): () => void;
    private notify;
    getLatestState(): T;
}
interface ProviderProps<T extends object> {
    store: Store<T>;
    children: React.ReactNode;
}
export declare function Provider<T extends object>({ store, children, }: ProviderProps<T>): JSX.Element;
export declare function createStore<T extends object>(initialState: T): Store<T>;
export type { Store };
export declare function useStore<T extends object>(): [
    T,
    (update: Partial<T> | ((prevState: T) => Partial<T>), callback?: (state: T) => void) => void
];
