(map: Y.Map<unknown>, value: Record<string, unknown>)
| 132 | } |
| 133 | |
| 134 | function setMapObject(map: Y.Map<unknown>, value: Record<string, unknown>): void { |
| 135 | for (const [key, nested] of Object.entries(value)) { |
| 136 | const converted = toYValue(nested) |
| 137 | if (converted !== undefined) map.set(key, converted) |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | function ensureYArray(map: Y.Map<unknown>, key: string): Y.Array<unknown> { |
| 142 | const existing = map.get(key) |
no test coverage detected