import * as React from "react"; export interface CreateContextOptions { /** * If `true`, React will throw if context is `null` or `undefined` * In some cases, you might want to support nested context, so you can set it to `false` */ strict?: boolean; /** * Error message to throw if the context is `undefined` */ errorMessage?: string; /** * The display name of the context */ name?: string; } declare type CreateContextReturn = [React.Provider, () => T, React.Context]; /** * Creates a named context, provider, and hook. * * @param options create context options */ export declare function createContext(options?: CreateContextOptions): CreateContextReturn; /** * Gets only the valid children of a component, * and ignores any nullish or falsy child. * * @param children the children */ export declare function getValidChildren(children: React.ReactNode): React.ReactElement React.ReactElement React.Component)> | null) | (new (props: any) => React.Component)>[]; declare type ReactRef = React.Ref | React.RefObject | React.MutableRefObject; /** * Assigns a value to a ref function or object * * @param ref the ref to assign to * @param value the value */ export declare function assignRef(ref: ReactRef | undefined, value: T): void; /** * Combine multiple React refs into a single ref function. * This is used mostly when you need to allow consumers forward refs to * internal components * * @param refs refs to assign to value to */ export declare function mergeRefs(...refs: (ReactRef | undefined)[]): (value: T) => void; export {};