Optionaloptions: Partial<TreeIterator.Options>tslint:disable-next-line:typedef
ProtectedchildrenProtecteddoProtectedfindProtectedfindProtectedisProtectedisProtectediteratorNOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
This tree iterator visits all nodes from top to bottom considering the following rules.
Let assume the following tree:
When selecting
1.2as the root, the normalDepthFirstTreeIteratorwould stop on1.2as it does not have children, but this iterator will visit the next sibling (1.3and1.4but not1.1) nodes. So the expected traversal order will be1.2,1.3,1.3.1,1.3.2, and1.4then jumps to2and continues with2.1.