@mocanvas/sync · interface
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 | undefinedDefaults to a fresh random id; one per tab, not per user.
onError?: ((error: Error) => void) | undefinedCalled for protocol-level problems (a peer on another version, say).
presence?: {Turn on cursor/selection sharing for an editor.
presenceHeartbeatMs?: number | undefinedpresenceThrottleMs?: number | undefinedUpper bound on presence send rate. Default 34ms (~30 Hz).
presenceTimeoutMs?: number | undefinedDrop a collaborator after this long without a presence message. Default 10s.
roomId: stringIdentifies the document. The transport is expected to be scoped to it too.
store: Store<R, any>tombstoneLimit?: number | undefinedHow many tombstones for vanished records to keep. See crdt.ts.
tombstoneMaxAgeMs?: number | undefinedHow 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.