until.js 334 B

123456789101112
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.until = void 0;
  4. const tick_1 = require("./tick");
  5. const until = async (check, pollInterval = 1) => {
  6. do {
  7. if (await check())
  8. return;
  9. await (0, tick_1.tick)(pollInterval);
  10. } while (true);
  11. };
  12. exports.until = until;