跳转到内容

TransactionHistory

此内容尚不支持你的语言。

Defined in: transaction/src/history.ts:77

Bounded undo/redo history for local semantic transactions.

The manager intentionally detects edits made directly through the wrapped engine. Applying an inverse across an unknown revision would be unsafe; a collaboration adapter must instead create a fresh compensating command.

new TransactionHistory(engine, options): TransactionHistory

Defined in: transaction/src/history.ts:86

TransactionEngine

TransactionHistoryOptions = {}

TransactionHistory

get revision(): bigint

Defined in: transaction/src/history.ts:96

bigint

TransactionHost.revision


get state(): HistoryState

Defined in: transaction/src/history.ts:100

HistoryState

cancelGroup(group): TransactionCommit | null

Defined in: transaction/src/history.ts:175

Reverts the active group without creating redo history.

string

TransactionCommit | null


clear(): void

Defined in: transaction/src/history.ts:236

void


edit(options, callback): TransactionCommit

Defined in: transaction/src/history.ts:122

EditOptions

(transaction) => void

TransactionCommit

TransactionHost.edit


finishGroup(group): void

Defined in: transaction/src/history.ts:162

Ends a coalescing group so a later edit with the same key starts a new undo entry.

string

void


getSnapshot(): Readonly<AelionProject>

Defined in: transaction/src/history.ts:113

Readonly<AelionProject>

TransactionHost.getSnapshot


redo(): TransactionCommit

Defined in: transaction/src/history.ts:216

TransactionCommit


subscribe(listener): () => void

Defined in: transaction/src/history.ts:117

ProjectChangeListener

(): void

void

TransactionHost.subscribe


undo(): TransactionCommit

Defined in: transaction/src/history.ts:196

TransactionCommit