import { SnapshotTaker } from './snapshot-taker.js'; /** * A utility class for managing and navigating through a history of snapshots. */ export declare class TimeCapsule { private q; private maxsize; private pos; private _snapshot_taker; /** * Creates an instance of TimeCapsule. * @param {number} maxsize - The maximum number of snapshots to store. * @param {any} [start_state] - The initial state to be stored as the first snapshot (optional). */ constructor(maxsize: number, start_state?: any); /** * Disposes of the TimeCapsule and clears all stored snapshots. */ dispose(): void; /** * Captures a snapshot of the current state and stores it. * @param {any} state - The state to be captured as a snapshot. */ snapshot(state: any): void; /** * Moves forward to the next snapshot in the history. * @returns {any} The next state snapshot if available, or logs a warning if not. */ forward(): any; /** * Moves backward to the previous snapshot in the history. * @returns {any} The previous state snapshot if available, or logs a warning if not. */ backward(): any; /** * Gets the current state snapshot. * @returns {any} The current state snapshot if available, or logs a warning if not. */ get current(): any; /** * Gets the number of snapshots stored in the TimeCapsule. * @returns {number} The count of stored snapshots. */ get length(): number; /** * Checks if there is a snapshot available to move forward. * @returns {boolean} True if moving forward is possible, otherwise false. */ get forwardable(): boolean; /** * Checks if there is a snapshot available to move backward. * @returns {boolean} True if moving backward is possible, otherwise false. */ get backwardable(): boolean; /** * Gets the SnapshotTaker associated with this TimeCapsule. * @returns {SnapshotTaker | null} The associated SnapshotTaker, or null if not set. */ get snapshot_taker(): SnapshotTaker | null; /** * Sets the SnapshotTaker for this TimeCapsule. * @param {SnapshotTaker | null} snapshot_taker - The SnapshotTaker instance to associate with this TimeCapsule. */ set snapshot_taker(snapshot_taker: SnapshotTaker | null); /** * Resets the TimeCapsule, clearing all stored snapshots and resetting the position. */ reset(): void; }