@blinkk/degu
    Preparing search index...

    Function waitUntil

    • Wait until a condition becomes truthy. This under the hood implements polling to evaluate the condition so use wisely.


      let someValue = 0;
      func.waitUntil(()=> someValue === 5).then(()=> {
      console.log('some value is 5!!!');
      })

      setTimeout(()=> {
      someValue = 5;
      }, 1000);

      Parameters

      • condition: Function
      • timeout: number = 0
      • interval: number = 100

      Returns Promise<void>