wait | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function wait

    Wait for a promise or function to resolve. For a function we'll wait for a truthy value (unless the truthy check is overriden by options,test)

    A function/promise that should resolve for the wait to finish

    Test compare options or annotation

    The value that the waitfor function/promise resolved to

    • Type Parameters

      • T

      Parameters

      • waitfor: () => T | Promise<T>
      • options: WaitOptions<T> & { test: unknown }

      Returns Promise<T>

    • Type Parameters

      • T

      Parameters

      • waitfor: () => T | Promise<T>
      • Optionaloptions: WaitOptions<T>

      Returns PositiveWaitRetVal<T>

    • Type Parameters

      • T

      Parameters

      • waitfor: Promise<T>
      • Optionaloptions: WaitOptions<T>

      Returns Promise<T>