(walker: TreeWalker)
| 466 | } |
| 467 | |
| 468 | function last(walker: TreeWalker) { |
| 469 | let next: FocusableElement | null = null; |
| 470 | let last: FocusableElement | null = null; |
| 471 | do { |
| 472 | last = walker.lastChild() as FocusableElement | null; |
| 473 | if (last) { |
| 474 | next = last; |
| 475 | } |
| 476 | } while (last); |
| 477 | return next; |
| 478 | } |
| 479 | |
| 480 | function getDirectChildren<T>(parent: RSNode<T>, collection: Collection<RSNode<T>>) { |
| 481 | // We can't assume that we can use firstChildKey because if a person builds a tree using hooks, they would not have access to that property (using type Node vs CollectionNode) |
no test coverage detected