export interface UseIntervalReturn { start: () => void; stop: () => void; restart: () => void; isRunning: () => boolean; } /** * A declarative `setInterval` hook that safely handles cleanup and React's closure staleness issues. * * @param callback - The function to execute. * @param delay - The delay in milliseconds. * @returns Object containing methods to stop, start, restart, and check the running status of the interval. * * @example * ```tsx * const [time, setTime] = useState(0); * const interval = useInterval(() => setTime(t => t + 1), 1000); * return ; * ``` */ export declare function useInterval(callback: () => void, delay: number): UseIntervalReturn;