/** * Use this to avoid react's immutable ref: * * ```ts * interface RefObject { * readonly current: T | null; * } * // Bivariance hack for consistent unsoundness with RefObject * type RefCallback = { bivarianceHack(instance: T | null): void }["bivarianceHack"]; * type Ref = RefCallback | RefObject | null; * type LegacyRef = string | Ref; // element ref * ``` */ export type ReactRef = React.RefCallback | React.MutableRefObject | null; /** * Support callback and ref.current */ export declare function setReactRef(ref: ReactRef | undefined, value: T): void;