import type { TickerInterface } from "./interfaces"; import type { TickerFactory } from "./types"; import type { TickerConfig } from "./configs"; /** * Ticker based on requestAnimationFrame with a configurable interval. * Optimized for browser environments. Falls back to setTimeout when RAF is unavailable. * * Key features: * - Leading edge: the first callback is invoked in the first frame (via _startTime offset) * - Safe stop() inside callback: _startTime is recalculated BEFORE calling callback * - If callback calls stop() synchronously, the frame is not rescheduled * * @category Tickers */ export declare class RAFTicker implements TickerInterface { private readonly _callback; private _interval; private _rafId; private _startTime; static get factory(): TickerFactory; constructor(config: TickerConfig); start(): void; stop(): void; restart(): void; toggle(): boolean; get active(): boolean; get interval(): number; updateInterval(delay: number): void; private static _getRAF; private static _getCAF; private static readonly _raf; private static readonly _caf; } /** * Ticker based on setInterval with a configurable interval. * Optimized for Node.js and tests with fake timers. * * Key features: * - Leading edge: callback is invoked via setTimeout(fn, 0) when interval > 0 * - When interval === 0: setInterval(fn, 0) starts immediately (built-in leading-edge for 0) * - _timeoutId stores the setTimeout ID for leading-edge and is cleared in stop() * - active checks both timers: _timerId || _timeoutId * * @category Tickers */ export declare class IntervalTicker implements TickerInterface { private readonly _callback; private _interval; private _timerId; private _timeoutId; static get factory(): TickerFactory; constructor(config: TickerConfig); start(): void; stop(): void; restart(): void; toggle(): boolean; get active(): boolean; get interval(): number; updateInterval(delay: number): void; } //# sourceMappingURL=tickers.d.ts.map