/// <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): 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>): import("react").JSX.Element;
export declare function createStore<T extends object>(initialState: T): Store<T>;
export declare function useStore<T extends object>(): [
    T,
    (update: Partial<T> | ((prevState: T) => Partial<T>), callback?: (state: T) => void) => void
];
export {};
