Member Junction
    Preparing search index...
    interface WaitUntilOptions {
        PollMs?: number;
        StableForMs?: number;
        StableReads?: number;
        TimeoutMs?: number;
    }
    Index

    Properties

    PollMs?: number

    Gap between attempts. Small by default: the point is to notice promptly.

    StableForMs?: number

    Minimum wall-clock the condition must hold across those reads. Use when convergence is genuinely time-based rather than read-count-based; leave unset when it is not. Separating this from PollMs is deliberate: tying stability to the poll interval means making the poll slower to get a longer stability window, which is how a 5s poll with 3 required reads became a hard 10s floor on every call.

    StableReads?: number

    Consecutive satisfying observations required before returning. Above 1 this guards against one lucky read of a value that is still converging (several provider instances, a cache that briefly flaps). It is a stability requirement, not a delay — see StableForMs for the part that is about elapsed time.

    TimeoutMs?: number

    Upper bound on the whole wait. A timeout throws with What and the last problem seen.