Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MessageEvent

UpdateEvent sub-type emitted for updates of type "message".

Hierarchy

  • MessageEvent

Index

Properties

caller: unknown

The caller who triggered this update.

Specifically, this is:

  • For a local message, undefined.
  • For a remote message, the caller passed to receive.
  • For a loaded state, the caller passed to load.
  • For a remote message delivered as part of a loaded state (due to unmet causal dependencies), the caller passed to load.
isLocalOp: boolean

Whether the update is from a local transaction, i.e., it results from calling Collab methods on this replica.

senderCounter: number

A 1-indexed counter for senderID's transactions.

The pair (senderID, senderCounter) uniquely identifies the message's transaction. It is sometimes called a causal dot.

senderID: string

The replicaID that sent the message.

update: Uint8Array

The serialized update.

Specifically, this is:

  • For a local message, its SendEvent.message.
  • For a remote message, the message passed to receive.
  • For a loaded state, the savedState passed to load.
updateType: "message"

The update's type.

Generated using TypeDoc