跳转到内容

Transaction

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

Defined in: transaction.ts:33

new Transaction(label, id?): Transaction

Defined in: transaction.ts:39

string

string

Transaction

readonly id: string

Defined in: transaction.ts:34


readonly label: string

Defined in: transaction.ts:35


readonly timestamp: number

Defined in: transaction.ts:36

get opCount(): number

Defined in: transaction.ts:63

number

add(op): void

Defined in: transaction.ts:50

Appends an op to this transaction and runs its forward closure immediately. Use addDeferred if the caller has already applied the mutation and just wants to register a reverse.

TransactionOp

void


addDeferred(op): void

Defined in: transaction.ts:59

Registers the reverse/forward pair without calling forward — caller has already applied the mutation and just wants it undoable.

TransactionOp

void


redo(): void

Defined in: transaction.ts:79

void


undo(): void

Defined in: transaction.ts:67

void