PrivatecurrentThe level of the currently-running Phase in the Tree.
PrivatedeferredTrue if a "deferred" level exists
PrivatelevelsStorage for all levels in the tree. The first level (index 0) represents the "bottom" of the tree, with each successive level running before all higher levels can run.
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.
Generally speaking, Phases are removed from the tree and ran in FIFO order.
Remarks
Since dynamically ordered phases are queued into the Tree only as
Markers, they are not strictly guaranteed to run FIFO (otherwise, they would not be dynamic)