Skip to main content

Interface: WaitUntilOption<T>

Defined in: packages/core/src/utils/timingUtil.ts:14

Type Parameters​

T​

T

Properties​

debug?​

optional debug?: boolean

Defined in: packages/core/src/utils/timingUtil.ts:46

Whether it should log the conditional checks while waiting


probeCount?​

optional probeCount?: number

Defined in: packages/core/src/utils/timingUtil.ts:34

Probe on an even grid instead: probeCount probes spread across timeoutMs, plus a final probe on the timeout boundary. Supply this only when an even cadence is what you want — leaving it unset selects the escalating default described on WaitUntilOption.probeIntervals, which settles far sooner for the same timeout. Ignored when probeIntervals is provided.


probeFn​

probeFn: () => T | Promise<T>

Defined in: packages/core/src/utils/timingUtil.ts:18

A function that returns a value or promised value to be checked against the terminate condition

Returns​

T | Promise<T>


probeIntervals?​

optional probeIntervals?: readonly number[]

Defined in: packages/core/src/utils/timingUtil.ts:42

Escalating waits (in milliseconds) between probes; the last entry repeats until timeoutMs elapses. Suits "settle a re-render" waits where the condition usually flips within milliseconds but may occasionally take much longer — probe densely first, then back off. Takes precedence over probeCount, and applies by default when neither is supplied.


terminateCondition​

terminateCondition: T | ((currentValue) => boolean)

Defined in: packages/core/src/utils/timingUtil.ts:22

A value to check for equality or a function used for custom equality check


timeoutMs​

timeoutMs: number

Defined in: packages/core/src/utils/timingUtil.ts:26

A number of milliseconds to wait before returning the last value