vapor-chamber API reference - v1.3.0
    Preparing search index...

    Function history

    • Parameters

      • options: {
            maxSize?: number;
            filter?: (cmd: Command) => boolean;
            bus?: CommandBus<CommandMap>;
        } = {}
        • OptionalmaxSize?: number
        • Optionalfilter?: (cmd: Command) => boolean
        • Optionalbus?: CommandBus<CommandMap>

          Reference to the command bus — enables undo() to execute inverse handlers

      Returns Plugin & {
          getState: () => HistoryState;
          undo: () => Command | undefined;
          redo: () => Command | undefined;
          clear: () => void;
      }