MCPcopy
hub / github.com/tldraw/tldraw / createConnectMessage

Function createConnectMessage

packages/sync-core/src/lib/TLSyncClient.test.ts:212–226  ·  view source on GitHub ↗
(
		overrides: Partial<Extract<TLSocketServerSentEvent<TestRecord>, { type: 'connect' }>> = {}
	)

Source from the content-addressed store, hash-verified

210 }
211
212 function createConnectMessage(
213 overrides: Partial<Extract<TLSocketServerSentEvent<TestRecord>, { type: 'connect' }>> = {}
214 ): Extract<TLSocketServerSentEvent<TestRecord>, { type: 'connect' }> {
215 return {
216 type: 'connect',
217 connectRequestId: client.latestConnectRequestId!,
218 hydrationType: 'wipe_all',
219 protocolVersion,
220 schema: schema.serialize(),
221 isReadonly: false,
222 serverClock: 1,
223 diff: documentScopeDiff(),
224 ...overrides,
225 }
226 }
227
228 function createClient(
229 overrides: Partial<{

Callers 2

connectClientFunction · 0.85

Calls 2

documentScopeDiffFunction · 0.85
serializeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…