PrivatecurrentThe level of the currently-running Phase in the Tree.
PrivatedeferredTrue if a "deferred" level exists
PrivatelevelsStorage for all levels in the tree. This is a simple array because only one Phase may run and have "children" at a time.
PrivateaddAdd a Phase after the first occurence of a given Phase in the Tree,
or to the top of the Tree if no such phase exists.
The Phase to be added
The name of the Phase to search for
Clear all levels (and their constituent Phases) from the Tree.
Whether to leave the top level of the tree intact; default false
Check whether a particular Phase exists in the Tree.
The name of the Phase to search for
An optional PhaseConditionFunc to specify conditions for the phase
Whether a matching phase exists
Find and return the first Phase in the Tree matching the given conditions.
The name of the Phase to search for
OptionalphaseFilter: PhaseConditionFunc<P>An optional PhaseConditionFunc to add conditions to the search
The first Phase that matches the criteria, or undefined if none exists
Find and return all Phases in the Tree matching the given conditions.
The name of the Phase to search for
OptionalphaseFilter: PhaseConditionFunc<P>An optional PhaseConditionFunc to add conditions to the search
An array containing all Phases matching the criteria.
Find and remove a single Phase from the Tree.
The name of the Phase to search for
OptionalphaseFilter: PhaseConditionFunc<P>An optional PhaseConditionFunc to add conditions to the search
Whether a removal occurred
Remove all Phases of the given type from the Tree.
The name of the Phase to remove
The PhaseTree is the central storage location for
Phases by thePhaseManager.It has a tiered structure, where unshifted phases are added one level above the currently running Phase.
Phases are generally popped from the Tree in FIFO order.
Dynamically ordered phases are queued into the Tree only as
Markers and are not guaranteed to run FIFO (otherwise, they would not be dynamic)