MCPcopy
hub / github.com/yjs/yjs / from

Method from

src/ytype.js:661–665  ·  view source on GitHub ↗

* @template {delta.DeltaConf} DC * @param {delta.Delta } d * @return {YType }

(d)

Source from the content-addressed store, hash-verified

659 * @return {YType<DC>}
660 */
661 static from (d) {
662 const yt = new YType(d.name)
663 yt.applyDelta(d)
664 return yt
665 }
666
667 get length () {
668 this.doc ?? warnPrematureAccess()

Callers 15

insertContentHelperFunction · 0.80
getSubdocGuidsMethod · 0.80
destroyMethod · 0.80
writeIdSetFunction · 0.80
writeIdMapFunction · 0.80
writeClientsStructsFunction · 0.80
writeStructsFromIdSetFunction · 0.80
integrateStructsFunction · 0.80
writeStateVectorFunction · 0.80
testArrayFromFunction · 0.80
flushRandomMessageMethod · 0.80
disconnectRandomMethod · 0.80

Calls 1

applyDeltaMethod · 0.95

Tested by

no test coverage detected