MCPcopy
hub / github.com/tldraw/tldraw / makeLegacySnapshot

Function makeLegacySnapshot

packages/sync-core/src/test/TLSyncRoom.test.ts:96–103  ·  view source on GitHub ↗
(
	records: TLRecord[],
	others: Partial<Omit<RoomSnapshot, 'documentClock'>> = {}
)

Source from the content-addressed store, hash-verified

94
95// Helper to create legacy snapshots without a documentClock field
96const makeLegacySnapshot = (
97 records: TLRecord[],
98 others: Partial<Omit<RoomSnapshot, 'documentClock'>> = {}
99) => ({
100 documents: records.map((r) => ({ state: r, lastChangedClock: 0 })),
101 clock: 0,
102 ...others,
103})
104
105const oldArrow: TLBaseShape<'arrow', Omit<TLArrowShapeProps, 'labelColor'>> = {
106 typeName: 'shape',

Callers 1

TLSyncRoom.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…