import { DependencyList } from 'react'; /** * Custom hook that manages a timeout with automatic cleanup. * Provides a reliable way to handle timeouts that are properly cleaned up * on component unmount or when dependencies change. * * @param callback - The function to execute after the delay * @param delay - The delay in milliseconds (null to clear the timeout) * @param deps - Optional dependency array. If provided, timeout restarts when deps change. * If not provided, callback updates via ref without restarting timeout. * * @example * ```tsx * // Runs once, callback updates via ref * useTimeout(() => { * console.log('This runs after 1 second') * }, 1000) * * // Restarts timeout when count changes * useTimeout(() => { * console.log('Count:', count) * }, 1000, [count]) * ``` */ export declare const useTimeout: (callback: VoidFunction, delay?: number | null, deps?: DependencyList) => void;