pinterval
    Preparing search index...

    Function poll

    • Repeatedly evaluates a predicate function at a defined interval until it resolves to true or the timeout is reached.

      Parameters

      • predicate: PollPredicate | PollPredicateAsync

        The function to evaluate. Can be synchronous or asynchronous.

      • timeout: Duration

        The duration for which the polling continues.

      • Optionalstart: StartMode = 'immediate'

        Determines when the polling interval starts. Default is 'immediate'.

      Returns Promise<void>

      A promise that resolves when the predicate returns true or rejects if an error occurs in the process.