MCPcopy
hub / github.com/yjs/yjs / typeMapGet

Function typeMapGet

src/ytype.js:1799–1803  ·  view source on GitHub ↗
(parent, key)

Source from the content-addressed store, hash-verified

1797 * @function
1798 */
1799export const typeMapGet = (parent, key) => {
1800 parent.doc ?? warnPrematureAccess()
1801 const val = parent._map.get(key)
1802 return val !== undefined && !val.deleted ? val.content.getContent()[val.length - 1] : undefined
1803}
1804
1805/**
1806 * @param {YType<any>} parent

Callers 2

applyDeltaMethod · 0.85
getAttrMethod · 0.85

Calls 3

warnPrematureAccessFunction · 0.85
getMethod · 0.45
getContentMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…