import { Injector, Signal, WritableSignal } from '@angular/core'; interface SignalHistoryRecord { value: T; timestamp: number; } /** * Enhances a writable signal with undo/redo history functionality. * * @param source The writable signal to track. * @param options Configuration options for the history. * @returns An object with `history`, `undo`, `redo`, `canUndo`, and `canRedo` properties. */ export declare function signalHistory(source: WritableSignal, options?: { /** * The maximum number of history records to store. * @default 100 */ capacity?: number; /** * A function that determines whether a value should be recorded in the history. * By default, all values are recorded. */ shouldRecord?: (value: T, oldValue: T) => boolean; /** * The injector to use for the effect. * @default undefined */ injector?: Injector; }): { /** * The history of changes to the source signal. */ history: Signal[]>; /** * Undo the last change to the source signal. */ undo: () => void; /** * Redo the last undone change to the source signal. */ redo: () => void; /** * Reset the history to the current state. */ reset: () => void; /** * Clear the history. This will remove all history records. */ clear: () => void; /** * A signal indicating if undo is possible. */ canUndo: Signal; /** * A signal indicating if redo is possible. */ canRedo: Signal; }; export {};