CollaborationDocument
Confirmed ordering and optimistic text have independent engines and snapshot ownership.
Implements
Section titled “Implements”DocumentEngine<Envelope>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CollaborationDocument(
options,undo?):CollaborationDocument
Parameters
Section titled “Parameters”options
Section titled “options”UndoOptions
Returns
Section titled “Returns”CollaborationDocument
Properties
Section titled “Properties”engine
Section titled “engine”
readonlyengine:TextbufferEngine
genesis
Section titled “genesis”
readonlygenesis:Checkpoint
participant
Section titled “participant”
readonlyparticipant:Participant<TextbufferSnapshot>
Methods
Section titled “Methods”apply()
Section titled “apply()”apply(
record):boolean
Parameters
Section titled “Parameters”record
Section titled “record”Confirmation<Envelope>
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”applyBatch()
Section titled “applyBatch()”applyBatch(
records):boolean
Applies the valid prefix and publishes its projection once, including on failure.
Parameters
Section titled “Parameters”records
Section titled “records”readonly Confirmation<Envelope>[]
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”authoredEffects()
Section titled “authoredEffects()”authoredEffects(): readonly
object[]
Returns
Section titled “Returns”readonly object[]
checkpoint()
Section titled “checkpoint()”checkpoint():
Checkpoint
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”confirmedSnapshot()
Section titled “confirmedSnapshot()”confirmedSnapshot():
TextbufferSnapshot
Returns
Section titled “Returns”TextbufferSnapshot
exportHistory()
Section titled “exportHistory()”exportHistory(
from): readonlyConfirmation<Envelope>[] |undefined
Parameters
Section titled “Parameters”Returns
Section titled “Returns”readonly Confirmation<Envelope>[] | undefined
Implementation of
Section titled “Implementation of”historyIdentity()
Section titled “historyIdentity()”historyIdentity():
string
Bind local effect state and retain every already-known foreign identity.
Returns
Section titled “Returns”string
install()
Section titled “install()”install(
history,recovered?):void
Parameters
Section titled “Parameters”history
Section titled “history”readonly Confirmation<Envelope>[]
recovered?
Section titled “recovered?”readonly Envelope[]
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”matchesHistoryIdentity()
Section titled “matchesHistoryIdentity()”matchesHistoryIdentity(
saved):boolean
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
outcome()
Section titled “outcome()”outcome(
id):Outcome|undefined
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Outcome | undefined
Implementation of
Section titled “Implementation of”sequence()
Section titled “sequence()”sequence(
edit,rejection?):Confirmation<Envelope>
Parameters
Section titled “Parameters”Envelope
rejection?
Section titled “rejection?”string
Returns
Section titled “Returns”Confirmation<Envelope>
Implementation of
Section titled “Implementation of”sequenceBatch()
Section titled “sequenceBatch()”sequenceBatch(
edits): readonlyConfirmation<Envelope>[]
Parameters
Section titled “Parameters”readonly object[]
Returns
Section titled “Returns”readonly Confirmation<Envelope>[]
Implementation of
Section titled “Implementation of”subscribeConfirmed()
Section titled “subscribeConfirmed()”subscribeConfirmed(
observer): () =>void
Parameters
Section titled “Parameters”observer
Section titled “observer”(reset, remote) => void
Returns
Section titled “Returns”() => void
uniquePending()
Section titled “uniquePending()”uniquePending(
history): readonlyEnvelope[]
Parameters
Section titled “Parameters”history
Section titled “history”readonly Confirmation<Envelope>[]
Returns
Section titled “Returns”readonly Envelope[]
Implementation of
Section titled “Implementation of”verify()
Section titled “verify()”verify(
history,tip):boolean
Parameters
Section titled “Parameters”history
Section titled “history”readonly Confirmation<Envelope>[]
Returns
Section titled “Returns”boolean