/** * @module History * @author Pablo E. --Fidel-- Martínez López */ /** * A {@link Compactable} is a data structure that changes over time, and incorporates the possibility * to compact all changes, leaving the structure as if the current value was used at creation. * * The operation {@link compact} can be used to set the current value as the initial one, * forgetting all registered changes -- this is useful, for example, for memory saving. * Also, information about all changes made since creation or the last compactation can be accessed using * {@link numAllChanges} and {@link allChanges}. * @group History */ export interface Compactable { /** * Commit all changes, leaving only the last one as the current one, deleting all registered changes. * @group API */ compact(): void; /** * Describe the number of all changes made to the value since the initial one was given * (either at creation or after a save). * @group API */ numAllChanges(): number; /** * Returns the list of all changes. * The first value is the initial one and the last one is the previous to the current one. * @group API */ allChanges(): A[]; } //# sourceMappingURL=Compactable.d.ts.map