import React, { FC, ReactNode } from 'react';
type CtxVal = {
    notDefault?: boolean;
    map: Map<string, {
        version: number;
        value?: any;
        listeners: Set<(val: any) => void>;
    }>;
    onChange?: (key: string, t: any) => void;
};
export declare const StateContext: React.Context<CtxVal>;
export declare const StateProvider: FC<{
    children: ReactNode;
    onChange?: (key: string, t: any) => void;
    values?: {
        [key: string]: any;
    };
}>;
export declare const useContextState: <T extends unknown>(key: string, initialValue?: T) => [T, (value: T) => void];
export {};
