Hierarchy

  • UndoService

Constructors

Properties

watchStateMap: {
    [key: string]: NgUndoStateActions;
} = {}

Represents a mapping of state watch settings.

Type declaration

  • [key: string]: NgUndoStateActions

Methods

  • Protected

    Detects changes in the state and inserts snapshots into the undo history when necessary.

    Parameters

    • action: any

      The dispatched action object.

    • state: any

      The current state object.

    • newState: any

      The updated state object.

    Returns any

    • The updated state with inserted snapshots.
  • Protected

    Watches the dispatched undo action and applies the corresponding undo operation on the state.

    Parameters

    • state: any

      The current state object.

    • action: NgUndoAction

      The dispatched undo action object.

    Returns any

    • The updated state after applying the undo action.
  • Middleware function for watching state changes and triggering undo actions.

    Parameters

    • state: any

      The current state object.

    • action: any

      The dispatched action object.

    • next: NextMiddleware<AnyAction>

      The next middleware function.

    Returns any

    • The updated state after applying undo actions.

Generated using TypeDoc