Skip to content

Participant

Snapshot = unknown

new Participant<Snapshot>(options): Participant<Snapshot>

ParticipantOptions<Snapshot>

Participant<Snapshot>

readonly actor: string


readonly undoManager: UndoManager

install(base, messages, recovered?, allocated?): void

Installs a verified branch while retaining authored pending work and local undo.

Snapshot

readonly HostMessage[]

readonly Envelope[]

readonly Envelope[]

void


local(edit, capture?): Envelope

OffsetEdit

CaptureOptions

Envelope


localBatch(edits, capture?): readonly Envelope[]

Author the entire offset batch before recording history or publishing it.

readonly OffsetEdit[]

CaptureOptions

readonly Envelope[]


receive(messages, allocated?): void

readonly HostMessage[]

readonly Envelope[]

void


setEffects(effects): Envelope

readonly Effect[]

Envelope


state(): ParticipantState

ParticipantState


subscribe(listener): () => void

(change) => void

() => void


text(): string

string