export interface UseTimeoutReturn { start: () => void; clear: () => void; restart: () => void; isActive: () => boolean; } /** * A declarative `setTimeout` hook that safely handles cleanup. * * @param callback - The function to execute. * @param delay - The delay in milliseconds. * @returns Object containing methods to stop, start, restart, and check the active status of the timeout. * * @example * ```tsx * const [show, setShow] = useState(true); * useTimeout(() => setShow(false), 5000); * if (!show) return null; * return