Skip to content

Type Editor


Type Editor / @type-editor/collab / receive-transaction

receive-transaction

Functions

FunctionDescription

receiveTransaction

Creates a transaction that represents a set of new steps received from the central authority. Applying this transaction moves the state forward to adjust to the authority's view of the document.

This function handles three scenarios:

  1. Steps that originated from this client are confirmed and removed from unconfirmed.
  2. Steps from other clients are applied directly if there are no local changes.
  3. If there are local unconfirmed changes, they are rebased over the remote steps.