Optional
options: Partial<TreeIterator.Options>tslint:disable-next-line:typedef
Protected
childrenProtected
doProtected
findProtected
findProtected
isProtected
isProtected
iteratorNOTE: '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.2
as the root, the normalDepthFirstTreeIterator
would stop on1.2
as it does not have children, but this iterator will visit the next sibling (1.3
and1.4
but not1.1
) nodes. So the expected traversal order will be1.2
,1.3
,1.3.1
,1.3.2
, and1.4
then jumps to2
and continues with2.1
.