UNPKG

@typescript-package/history

Version:

A TypeScript package for tracking the history of values.

36 lines (35 loc) 825 B
import { History } from '../history.abstract'; /** * @description The class * @export * @class UndoHistoryPeek * @template Type */ export declare class UndoHistoryPeek<Type> { private readonly history; /** * Creates an instance of `UndoHistoryPeek` child class. * @constructor * @param {History<Type>} history */ constructor(history: History<Type>); /** * @description * @public * @param {number} [index=this.history.undoHistory.length - 1] * @returns {(Type | undefined)} */ index(index?: number): Type | undefined; /** * @description * @public * @returns {(Type | undefined)} */ last(): Type | undefined; /** * @description * @public * @returns {(Type | undefined)} */ next(): Type | undefined; }