@ac-essentials/misc-util
    Preparing search index...

    Class Counter

    A simple counter that can be incremented or decremented, and allows waiting for it to reach a specific value.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Accessors

    Methods

    • Waits until the counter reaches the specified target value.

      Parameters

      • targetValue: number

        The value to wait for.

      • Optionalsignal: null | AbortSignal

        An optional AbortSignal to cancel the wait.

      Returns Promise<void>