import type { MutableRefObject } from 'react'; import type { ElementOrRef } from '../types'; /** * When a component needs to track intersection via a ref, useIntersectionRef * will return a ref object containing the results from IntersectionObserver * for the current intersection entry. * * @example * const elementRef = useRef() * const intersectionRef = useIntersectionRef(elementRef) * return ... */ export default function useIntersectionRef(elementOrRef: ElementOrRef, intersectionObserverOptions?: IntersectionObserverInit): MutableRefObject;