import { RefObject } from "react";
/**
 * Check if an element is in viewport

 * @param {number} offset - Number of pixels up to the observable element from the top
 * @param {number} throttleMilliseconds - Throttle observable listener, in ms
 */
export default function useVisibility<Element extends HTMLElement>(offset?: number, throttleMilliseconds?: number, initialState?: boolean): [Boolean, RefObject<Element>];
