import type { Observable } from '../types/index.js'; /** * React hook that keeps a `ref` synchronised with the latest value from an * observable. The ref is updated via a layout-effect subscription so it is * always current during commit phase reads. * * If the observable is a `BehaviorSubject` (or any subject with a `.value` * property), the ref is initialised with that value. * * @template S - The value type. * @param subject - The observable to track. * @param initial - An optional initial value for the ref. * @returns A React ref whose `.current` mirrors the latest emitted value. * * @example * ```tsx * const countRef = useObservableRef(count$); * // countRef.current is always the latest emitted count * ``` */ export declare const useObservableRef: (subject: Observable, initial?: S) => React.RefObject; export default useObservableRef;