( node: ReplayNode, parentKeyPath: Root | KeyNode, trackedPostpones: PostponedHoles, )
| 6338 | } |
| 6339 | |
| 6340 | function addToReplayParent( |
| 6341 | node: ReplayNode, |
| 6342 | parentKeyPath: Root | KeyNode, |
| 6343 | trackedPostpones: PostponedHoles, |
| 6344 | ): void { |
| 6345 | if (parentKeyPath === null) { |
| 6346 | trackedPostpones.rootNodes.push(node); |
| 6347 | } else { |
| 6348 | const workingMap = trackedPostpones.workingMap; |
| 6349 | let parentNode = workingMap.get(parentKeyPath); |
| 6350 | if (parentNode === undefined) { |
| 6351 | parentNode = ([ |
| 6352 | parentKeyPath[1], |
| 6353 | parentKeyPath[2], |
| 6354 | ([]: Array<ReplayNode>), |
| 6355 | null, |
| 6356 | ]: ReplayNode); |
| 6357 | workingMap.set(parentKeyPath, parentNode); |
| 6358 | addToReplayParent(parentNode, parentKeyPath[0], trackedPostpones); |
| 6359 | } |
| 6360 | parentNode[2].push(node); |
| 6361 | } |
| 6362 | } |
| 6363 | |
| 6364 | export type PostponedState = { |
| 6365 | nextSegmentId: number, |
no test coverage detected