MCPcopy
hub / github.com/tldraw/tldraw / PresenceStore

Class PresenceStore

packages/sync-core/src/lib/TLSyncRoom.ts:1302–1320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1300
1301/** @internal */
1302export class PresenceStore<R extends UnknownRecord> implements MinimalDocStore<R> {
1303 private readonly presences = new AtomMap<string, R>('presences')
1304
1305 get(id: string): UnknownRecord | undefined {
1306 return this.presences.get(id)
1307 }
1308
1309 set(id: string, state: R): void {
1310 this.presences.set(id, state)
1311 }
1312
1313 delete(id: string): void {
1314 this.presences.delete(id)
1315 }
1316
1317 values() {
1318 return this.presences.values()
1319 }
1320}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…