MCPcopy
hub / github.com/yjs/yjs / writeStateAsUpdate

Function writeStateAsUpdate

src/utils/encoding.js:483–486  ·  view source on GitHub ↗
(encoder, doc, targetStateVector = new Map())

Source from the content-addressed store, hash-verified

481 * @function
482 */
483export const writeStateAsUpdate = (encoder, doc, targetStateVector = new Map()) => {
484 writeClientsStructs(encoder, doc.store, targetStateVector)
485 writeIdSet(encoder, doc.store.ds)
486}
487
488/**
489 * Write all the document as a single update message that can be applied on the remote document. If you specify the state of the remote client (`targetState`) it will

Callers 1

encodeStateAsUpdateV2Function · 0.85

Calls 2

writeIdSetFunction · 0.90
writeClientsStructsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…