@mocanvas/sync · interface

SyncClientOptions

interface SyncClientOptions<R extends UnknownRecord = UnknownRecord>

This one ships without a description. The signature above is read from the package, and the guides cover the area it belongs to.


Properties · 11

clientId?: string | undefined

Defaults to a fresh random id; one per tab, not per user.

onError?: ((error: Error) => void) | undefined

Called for protocol-level problems (a peer on another version, say).

presence?: {

Turn on cursor/selection sharing for an editor.

presenceHeartbeatMs?: number | undefined
presenceThrottleMs?: number | undefined

Upper bound on presence send rate. Default 34ms (~30 Hz).

presenceTimeoutMs?: number | undefined

Drop a collaborator after this long without a presence message. Default 10s.

roomId: string

Identifies the document. The transport is expected to be scoped to it too.

store: Store<R, any>
tombstoneLimit?: number | undefined

How many tombstones for vanished records to keep. See crdt.ts.

tombstoneMaxAgeMs?: number | undefined

How long such a tombstone lives, in ms.

transport: Transport<R>

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.