import type * as React_2 from 'react'; /** * @internal */ export declare type Context = React_2.Context & { Provider: React_2.FC>; Consumer: never; }; export declare type ContextSelector = (value: Value) => SelectedValue; /** * @internal */ export declare type ContextValue = { /** Holds a set of subscribers from components. */ listeners: ((payload: Value) => void)[]; /** Holds an actual value of React's context that will be propagated down for computations. */ value: { current: Value; }; /** Indicates if a context holds default value. */ isDefault?: boolean; }; /** * @internal */ export declare const createContext: (defaultValue: Value) => Context; /** * This hook returns context selected value by selector. * It will only accept context created by `createContext`. * It will trigger re-render if only the selected value is referentially changed. * * @internal */ export declare const useContextSelector: (context: Context, selectorFn: ContextSelector) => SelectedValue; /** * Utility hook for contexts created by react-context-selector to determine if a parent context exists * WARNING: This hook will not work for native React contexts * * @internal * @param context - context created by react-context-selector * @returns whether the hook is wrapped by a parent context */ export declare function useHasParentContext(context: Context): boolean; export { }