collectype

collectype v0.11.0


collectype / utils/step/StepManager / StepManager

Class: StepManager

Defined in: utils/step/StepManager.ts:5

Manages step tracking with support for nested steps using a stack-based approach. Only top-level steps (level 0) are tracked in the filterSteps array.

Constructors

Constructor

new StepManager(): StepManager

Returns

StepManager

Accessors

isInStep

Get Signature

get isInStep(): boolean

Defined in: utils/step/StepManager.ts:46

Checks if we’re currently inside any step (any level).

Returns

boolean

True if any step is in progress, false otherwise


level

Get Signature

get level(): number

Defined in: utils/step/StepManager.ts:55

Gets the current step depth level.

Returns

number

The current nesting level (0 = no steps, 1 = one level, etc.)


steps

Get Signature

get steps(): string[]

Defined in: utils/step/StepManager.ts:64

Gets a copy of the current filter steps (only top-level steps).

Returns

string[]

Array of step names that should be tracked

Methods

begin()

begin(name): void

Defined in: utils/step/StepManager.ts:15

Starts a new step and pushes it onto the stack. Only level 0 steps are added to steps for tracking.

Parameters

name

string

The name of the step to start

Returns

void


end()

end(): string

Defined in: utils/step/StepManager.ts:31

Ends the current step by popping it from the stack.

Returns

string

The name of the ended step

Throws

Error if no step is currently in progress


addUnknownStep()

addUnknownStep(): void

Defined in: utils/step/StepManager.ts:72

Adds an unknown step marker to the steps. This should be called when operations occur outside of named steps.

Returns

void


reset()

reset(): void

Defined in: utils/step/StepManager.ts:80

Resets the step manager to its initial state. Clears both the step stack and filter steps.

Returns

void