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.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TransactionHistory(
engine,options):TransactionHistory
Defined in: transaction/src/history.ts:86
Parameters
Section titled “Parameters”engine
Section titled “engine”options
Section titled “options”TransactionHistoryOptions = {}
Returns
Section titled “Returns”TransactionHistory
Accessors
Section titled “Accessors”revision
Section titled “revision”Get Signature
Section titled “Get Signature”get revision():
bigint
Defined in: transaction/src/history.ts:96
Returns
Section titled “Returns”bigint
Implementation of
Section titled “Implementation of”Get Signature
Section titled “Get Signature”get state():
HistoryState
Defined in: transaction/src/history.ts:100
Returns
Section titled “Returns”Methods
Section titled “Methods”cancelGroup()
Section titled “cancelGroup()”cancelGroup(
group):TransactionCommit|null
Defined in: transaction/src/history.ts:175
Reverts the active group without creating redo history.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”TransactionCommit | null
clear()
Section titled “clear()”clear():
void
Defined in: transaction/src/history.ts:236
Returns
Section titled “Returns”void
edit()
Section titled “edit()”edit(
options,callback):TransactionCommit
Defined in: transaction/src/history.ts:122
Parameters
Section titled “Parameters”options
Section titled “options”callback
Section titled “callback”(transaction) => void
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”finishGroup()
Section titled “finishGroup()”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.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
getSnapshot()
Section titled “getSnapshot()”getSnapshot():
Readonly<AelionProject>
Defined in: transaction/src/history.ts:113
Returns
Section titled “Returns”Readonly<AelionProject>
Implementation of
Section titled “Implementation of”redo()
Section titled “redo()”redo():
TransactionCommit
Defined in: transaction/src/history.ts:216
Returns
Section titled “Returns”subscribe()
Section titled “subscribe()”subscribe(
listener): () =>void
Defined in: transaction/src/history.ts:117
Parameters
Section titled “Parameters”listener
Section titled “listener”Returns
Section titled “Returns”():
void
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”undo()
Section titled “undo()”undo():
TransactionCommit
Defined in: transaction/src/history.ts:196