Options
All
  • Public
  • Public/Protected
  • All
Menu

The HistoryManager interface allows for state manipulation and the rewinding of a program.

Type parameters

Hierarchy

  • IHistory

Index

Properties

currentState

currentState: Readonly<S & I>

initialState

initialState: Readonly<S>

limit

limit: number

Limit the maximum number of past history states kept on record.

nextState

nextState: Readonly<Partial<S> & I>

records

records: ReadonlyArray<S & Readonly<I>>

tick

tick: number

Methods

clear

  • clear(): void
  • Clears the state history. Rewinds to the beginning, and the rest of the current tick will be aborted.

    Returns void

rewind

  • rewind(t: number, mutate?: Partial<S>): void
  • Rewind time to t, the rest of the currently executing tick will be ignored. A partial state can be passed as the second argument to mutate the rewound state and take back information to the past state.

    Parameters

    • t: number

      The discrete tick in time to rewind to.

    • Optional mutate: Partial<S>

      Any mutations to apply to the state after rewinding.

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc