(path: ReadonlyArray<PropertyKey>)
| 353 | readonly set: (a: any, s?: any) => any |
| 354 | |
| 355 | constructor(path: ReadonlyArray<PropertyKey>) { |
| 356 | this.path = path |
| 357 | this.get = (s) => { |
| 358 | let out = s |
| 359 | for (let i = 0; i < path.length; i++) { |
| 360 | out = out[path[i]] |
| 361 | } |
| 362 | return out |
| 363 | } |
| 364 | this.set = (a, s) => { |
| 365 | const out = cloneShallow(s) |
| 366 | let current = out |
| 367 | let i = 0 |
| 368 | for (; i < path.length - 1; i++) { |
| 369 | const key = path[i] |
| 370 | InternalRecord.assignProperty(current, key, cloneShallow(current[key])) |
| 371 | current = current[key] |
| 372 | } |
| 373 | InternalRecord.assignProperty(current, path[i], a) |
| 374 | return out |
| 375 | } |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | class CheckNode<T> { |
nothing calls this directly
no test coverage detected