Skip to main content

RunTransactionParams Interface

The parameters for the RunTransaction API.

This API is provided as an alpha preview and may change without notice.

To use, import via fluid-framework/alpha.

For more information about our API support guarantees, see here.

Input

This type is "input," meaning that code outside of the library defining it should not read from it. Future versions of this type may add optional members or make typing of members more general.

Signature

export interface RunTransactionParams

Properties

PropertyAlertsModifiersTypeDescription
labelAlphaoptional, readonlyunknownA label for this transaction that allows it to be correlated with later edits (e.g. for controlling undo/redo grouping).
preconditionsAlphaoptional, readonlyreadonly TransactionConstraintAlpha[]An optional list of constraints that are checked just before the transaction begins. If any of the constraints are not met when runTransaction is called, an error will be thrown. If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.

Property Details

label

A label for this transaction that allows it to be correlated with later edits (e.g. for controlling undo/redo grouping).

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

readonly label?: unknown;

Type: unknown

Remarks

This label is associated with the commit produced by this transaction, and is surfaced through the label property of ChangeMetadata in the commitApplied or changed event.

If there is a nested transaction, only the outermost transaction label will be used.

preconditions

An optional list of constraints that are checked just before the transaction begins. If any of the constraints are not met when runTransaction is called, an error will be thrown. If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

readonly preconditions?: readonly TransactionConstraintAlpha[];

Type: readonly TransactionConstraintAlpha[]