/** * Class-instance-like timeout handle with `start` / `clear` methods. * * Mirrors Base UI React's `Timeout` * (`@base-ui/utils/useTimeout` — `packages/utils/src/useTimeout.ts`) so * component ports read 1:1 against the React source. */ export declare class Timeout { static create(): Timeout; private currentId; /** * Executes `fn` after `delay` ms, clearing any previously scheduled call * from this handle. Calling `start` again cancels the prior scheduling. */ start(delay: number, fn: () => void): void; isStarted(): boolean; clear: () => void; } /** * A `setTimeout` with automatic cleanup via `onCleanup`. * * Returns a {@link Timeout} handle whose `start(delay, fn)` schedules a * callback (cancelling any previously scheduled one) and whose `clear()` * cancels the pending callback. On disposal of the owning scope, `clear()` * fires automatically so outstanding timeouts don't leak. * * Solid 2 notes: * * - Must be called from an owned scope (component body, `createRoot`, etc.) * so `onCleanup` has somewhere to register. Calling this at module scope * would log `NO_OWNER_CLEANUP` and the cleanup would never fire. * - The returned object has stable identity for the scope's lifetime — safe * to capture in closures. */ export declare function useTimeout(): Timeout; //# sourceMappingURL=use-timeout.d.ts.map