/** * Container to describe a single change to a cache */ import { ChangeReason } from './ChangeReason'; export declare class Change { /** * The unique key of the item which has changed */ readonly key: TKey; /** * The reason for the change */ readonly reason: ChangeReason; /** * The item which has changed */ readonly current: TObject; /** * The current index */ readonly currentIndex: number; /** * The previous change. * * This is only when Reason==ChangeReason.Replace. */ readonly previous?: TObject; /** * The previous change. * * This is only when Reason==ChangeReason.Update or ChangeReason.Move. */ readonly previousIndex?: number; /** * Initializes a new instance of the object. * @param reason The reason * @param key The key * @param current The current */ constructor(reason: ChangeReason, key: TKey, current: TObject); /** * Initializes a new instance of the object. * @param reason The reason * @param key The key * @param current The current * @param index The index */ constructor(reason: ChangeReason, key: TKey, current: TObject, index?: number); /** * Constructor for ChangeReason.Move * @param reason The reason * @param key The key * @param current The current * @param currentIndex The CurrentIndex * @param previousIndex CurrentIndex of the previous */ constructor(reason: 'moved', key: TKey, current: TObject, currentIndex: number, previousIndex: number); /** * Initializes a new instance of the object. * @param reason The reason * @param key The key * @param current The current * @param previous The previous * @param currentIndex Value of the current * @param previousIndex Value of the previous */ constructor(reason: ChangeReason, key: TKey, current: TObject, previous?: TObject, currentIndex?: number, previousIndex?: number); toString(): string; }