DocumentStore
Defined in: index.ts:68
Type Parameters
Section titled “Type Parameters”Doc
Change
Section titled “Change”Change
PublicKey
Section titled “PublicKey”PublicKey = unknown
Methods
Section titled “Methods”change()
Section titled “change()”change(
change,message?):Promise<void>
Defined in: index.ts:83
Apply a change to the open document. Rejects with Document store is closed when it is not open: a change never opens the document.
Parameters
Section titled “Parameters”change
Section titled “change”Change
message?
Section titled “message?”string
Returns
Section titled “Returns”Promise<void>
connect()
Section titled “connect()”connect(): () =>
void
Defined in: index.ts:78
Retain the shared document until the returned, idempotent release runs.
Returns
Section titled “Returns”() => void
getServerSnapshot()
Section titled “getServerSnapshot()”getServerSnapshot():
DocumentSnapshot<Doc,PublicKey>
Defined in: index.ts:70
Returns
Section titled “Returns”DocumentSnapshot<Doc, PublicKey>
getSnapshot()
Section titled “getSnapshot()”getSnapshot():
DocumentSnapshot<Doc,PublicKey>
Defined in: index.ts:69
Returns
Section titled “Returns”DocumentSnapshot<Doc, PublicKey>
start()
Section titled “start()”start():
Promise<void>
Defined in: index.ts:74
Open the document and keep it open until stop(), whatever consumers release.
Returns
Section titled “Returns”Promise<void>
stop()
Section titled “stop()”stop():
Promise<void>
Defined in: index.ts:76
Close the document now, even when consumers or a delivery failure remain.
Returns
Section titled “Returns”Promise<void>
subscribe()
Section titled “subscribe()”subscribe(
listener): () =>void
Defined in: index.ts:72
Register a listener without opening a document or starting a node.
Parameters
Section titled “Parameters”listener
Section titled “listener”() => void
Returns
Section titled “Returns”() => void