* Define a shared data type. * * Multiple calls of `ydoc.get(name)` yield the same result * and do not overwrite each other. I.e. * `ydoc.get(name) === ydoc.get(name)` * * After this method is called, the type is also available on `ydoc.share.get(name)`. * * @param {string} k
(key = '', name = null)
| 202 | * @return {YType} |
| 203 | */ |
| 204 | get (key = '', name = null) { |
| 205 | return map.setIfUndefined(this.share, key, () => { |
| 206 | const t = new YType(name) |
| 207 | t._integrate(this, null) |
| 208 | return t |
| 209 | }) |
| 210 | } |
| 211 | |
| 212 | /** |
| 213 | * Converts the entire document into a js object, recursively traversing each yjs type |
no test coverage detected