MCPcopy Create free account
hub / github.com/editablejs/editable / writeSyncStep2

Function writeSyncStep2

packages/yjs-protocols/src/sync.ts:51–58  ·  view source on GitHub ↗
(
  encoder: encoding.Encoder,
  doc: Y.Doc,
  encodedStateVector?: Uint8Array,
)

Source from the content-addressed store, hash-verified

49 * @param [encodedStateVector]
50 */
51export const writeSyncStep2 = (
52 encoder: encoding.Encoder,
53 doc: Y.Doc,
54 encodedStateVector?: Uint8Array,
55) => {
56 encoding.writeVarUint(encoder, messageYjsSyncStep2)
57 encoding.writeVarUint8Array(encoder, Y.encodeStateAsUpdateV2(doc, encodedStateVector))
58}
59
60/**
61 * Read SyncStep1 message and reply with SyncStep2.

Callers 1

readSyncStep1Function · 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…