import { DependencyList } from 'react'; import { ElementOrRef } from '../../utils/element-refs'; export interface UseIntersectionObserverOptions> extends IntersectionObserverInit { ref: T; freezeOnceVisible?: boolean; handleEntry?: (entry: IntersectionObserverEntry) => void; } /** * Use an intersection observer to detect if * the given element `ref` is within the viewport. * * Based on `useIntersectionObserver` from `usehooks-ts` * * @see the LICENSE file at: * https://github.com/juliencrn/usehooks-ts/blob/master/LICENSE * * Modifications from original source: * - Add support for effect dependencies * - Skip the callback intersection callback if component is not mounted */ export declare function useIntersectionObserver>({ ref, threshold, root, rootMargin, freezeOnceVisible, handleEntry, }: UseIntersectionObserverOptions, deps?: DependencyList): IntersectionObserverEntry | undefined;