Skip to content

Packages  ›  trotsky  ›  StepWait

StepWait class

Represents step that introduces a delay before proceeding to the next step.

Signature:

typescript
export declare class StepWait<P = StepBuilder, C = null, O = null> extends Step<P, C, O>

Extends: Step<P, C, O>

Constructors

Constructor

Modifiers

Description

(constructor)(agent, parent, duration)

Initializes the StepWait instance with the given duration.

Properties

Property

Modifiers

Type

Description

_duration

protected

number

The duration of the delay in milliseconds.

Methods

Method

Modifiers

Description

apply()

Applies the step logic to introduce a delay. The process is paused for the duration specified in _duration.

clone(rest)

Clones the current step and returns a new instance with the same parameters.