Skip to main content
Version: v1

SharedTreeEvent Enum

An event emitted by a SharedTree to indicate a state change. See ISharedTreeEvents for event argument information.

Signature

export declare enum SharedTreeEvent

Flags

Flag Description
EditCommitted An edit has been committed to the log. This happens when either: 1. A locally generated edit is added to the log. 2. A remotely generated edit is added to the log. Note that, for locally generated edits, this event will not be emitted again when that edit is sequenced. Passed the EditId of the committed edit, i.e. supports callbacks of type EditCommittedHandler.
SequencedEditApplied A sequenced edit has been applied. This includes local edits though the callback is only invoked once the sequenced version is received. For edits that were local (see wasLocal, this callback will only be called once. For non-local edits, it may be called multiple times: the number of calls and when they occur depends on caching and is an implementation detail. Supports callbacks of type SequencedEditAppliedHandler.

EditCommitted

An edit has been committed to the log. This happens when either: 1. A locally generated edit is added to the log. 2. A remotely generated edit is added to the log. Note that, for locally generated edits, this event will not be emitted again when that edit is sequenced. Passed the EditId of the committed edit, i.e. supports callbacks of type EditCommittedHandler.

Signature

EditCommitted = "committedEdit"

SequencedEditApplied

A sequenced edit has been applied. This includes local edits though the callback is only invoked once the sequenced version is received. For edits that were local (see wasLocal, this callback will only be called once. For non-local edits, it may be called multiple times: the number of calls and when they occur depends on caching and is an implementation detail. Supports callbacks of type SequencedEditAppliedHandler.

Signature

SequencedEditApplied = "sequencedEditApplied"