(walker: TreeWalker)
| 522 | } |
| 523 | |
| 524 | function last(walker: TreeWalker) { |
| 525 | let next: FocusableElement | null = null; |
| 526 | let last: FocusableElement | null = null; |
| 527 | do { |
| 528 | last = walker.lastChild() as FocusableElement | null; |
| 529 | if (last) { |
| 530 | next = last; |
| 531 | } |
| 532 | } while (last); |
| 533 | return next; |
| 534 | } |
| 535 | |
| 536 | function getDirectChildren<T>(parent: RSNode<T>, collection: Collection<RSNode<T>>) { |
| 537 | // 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