Clash Blueprint Engine API
    Preparing search index...

    Class CommandStack

    Undo/redo history over Commands. Executing a command pushes it onto the undo stack and clears the redo stack (standard editor semantics — a new action after undo forks history). A command whose execute fails is not recorded, so history only ever contains successfully applied changes.

    Index
    • get entries(): { redo: readonly string[]; undo: readonly string[] }

      A read-only projection of the history for a history/timeline UI: undo is the applied commands oldest→newest, redo the undone commands next→last. Labels only — the commands themselves stay encapsulated.

      Returns { redo: readonly string[]; undo: readonly string[] }

    • Parameters

      • listener: (state: { canRedo: boolean; canUndo: boolean }) => void

      Returns () => void