CollaboratorOptions
Defined in: collab.ts:44
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
autoStart? | boolean | Start the handshake immediately (default true). Set false to call start() yourself. | collab.ts:64 |
editor | CollabEditor | The editor to make collaborative. Its current document is taken as the shared origin. | collab.ts:48 |
heartbeatMs? | number | Liveness 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? | () => number | Injected clock for presence TTL (defaults to Date.now). | collab.ts:52 |
peer | Peer | This client’s stable identity. | collab.ts:46 |
transport | Transport | The channel to the authority/hub. | collab.ts:50 |
ttlMs? | number | Presence time-to-live in ms before a quiet peer is pruned. | collab.ts:54 |