* A server diff that mirrors the store's current document records. Using this as the default * connect diff means a wipe_all hydration round-trips to no change, keeping the tldraw schema's * integrity checker quiet (it would otherwise recreate the document/page records as new local * changes).
()
| 202 | * changes). |
| 203 | */ |
| 204 | function documentScopeDiff(): NetworkDiff<TestRecord> { |
| 205 | const diff: NetworkDiff<TestRecord> = {} |
| 206 | for (const [id, record] of Object.entries(store.serialize('document'))) { |
| 207 | diff[id] = [RecordOpType.Put, record as TestRecord] |
| 208 | } |
| 209 | return diff |
| 210 | } |
| 211 | |
| 212 | function createConnectMessage( |
| 213 | overrides: Partial<Extract<TLSocketServerSentEvent<TestRecord>, { type: 'connect' }>> = {} |
no test coverage detected
searching dependent graphs…