Skip to content

DocumentStore

Defined in: index.ts:68

Doc

Change

PublicKey = unknown

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.

Change

string

Promise<void>


connect(): () => void

Defined in: index.ts:78

Retain the shared document until the returned, idempotent release runs.

() => void


getServerSnapshot(): DocumentSnapshot<Doc, PublicKey>

Defined in: index.ts:70

DocumentSnapshot<Doc, PublicKey>


getSnapshot(): DocumentSnapshot<Doc, PublicKey>

Defined in: index.ts:69

DocumentSnapshot<Doc, PublicKey>


start(): Promise<void>

Defined in: index.ts:74

Open the document and keep it open until stop(), whatever consumers release.

Promise<void>


stop(): Promise<void>

Defined in: index.ts:76

Close the document now, even when consumers or a delivery failure remain.

Promise<void>


subscribe(listener): () => void

Defined in: index.ts:72

Register a listener without opening a document or starting a node.

() => void

() => void