Skip to content

CollaboratorOptions

Defined in: collab.ts:44

PropertyTypeDescriptionDefined in
autoStart?booleanStart the handshake immediately (default true). Set false to call start() yourself.collab.ts:64
editorCollabEditorThe editor to make collaborative. Its current document is taken as the shared origin.collab.ts:48
heartbeatMs?numberLiveness heartbeat interval in ms. When set (> 0), the client periodically re-announces its presence (so peers keep it alive) and prunes remote peers it has not heard from within ttlMs — reclaiming cursors left behind by an ungraceful disconnect (crash / closed tab) that never sent bye. Defaults to off; graceful destroy() always removes a peer instantly regardless.collab.ts:62
now?() => numberInjected clock for presence TTL (defaults to Date.now).collab.ts:52
peerPeerThis client’s stable identity.collab.ts:46
transportTransportThe channel to the authority/hub.collab.ts:50
ttlMs?numberPresence time-to-live in ms before a quiet peer is pruned.collab.ts:54