(path: ReadonlyArray<PropertyKey>)
| 344 | readonly set: (a: any, s?: any) => any |
| 345 | |
| 346 | constructor(path: ReadonlyArray<PropertyKey>) { |
| 347 | this.path = path |
| 348 | this.get = (s) => { |
| 349 | let out = s |
| 350 | for (let i = 0; i < path.length; i++) { |
| 351 | out = out[path[i]] |
| 352 | } |
| 353 | return out |
| 354 | } |
| 355 | this.set = (a, s) => { |
| 356 | const out = cloneShallow(s) |
| 357 | let current = out |
| 358 | let i = 0 |
| 359 | for (; i < path.length - 1; i++) { |
| 360 | const key = path[i] |
| 361 | InternalRecord.assignProperty(current, key, cloneShallow(current[key])) |
| 362 | current = current[key] |
| 363 | } |
| 364 | InternalRecord.assignProperty(current, path[i], a) |
| 365 | return out |
| 366 | } |
| 367 | } |
| 368 | } |
| 369 | |
| 370 | class CheckNode<T> { |
nothing calls this directly
no test coverage detected