@openscd/oscd-api
    Preparing search index...

    Interface Transactor<Change>

    Transactor is an interface that defines a transaction manager for managing changes in a system. It provides methods to commit changes, undo and redo changes, and subscribe to transaction events.

    interface Transactor<Change> {
        future: Commit<Change>[];
        past: Commit<Change>[];
        commit(change: Change, options?: CommitOptions): Commit<Change>;
        redo(): undefined | Commit<Change>;
        subscribe(
            txCallback: TransactedCallback<Change>,
        ): () => TransactedCallback<Change>;
        undo(): undefined | Commit<Change>;
    }

    Type Parameters

    • Change

      The type of changes that can be committed.

    Index

    Properties

    Methods

    Properties

    future: Commit<Change>[]

    All changes that have been undone and can be redone.

    past: Commit<Change>[]

    All changes that have been committed and not yet undone.

    Methods