Files
NapCatQQ/.pnpm-store/v3/files/cd/b9d6805cf7354e285dccb425f87cdc299e5804b5007d2a93c4e3bef4c097f5ea80227dc64ad47820a45d0fb6bd0cef61a5322a43b1a6e17738f76948d7c03d
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

28 lines
807 B
Plaintext

"use strict";
/**
* Copyright (c) 2019, Microsoft Corporation (MIT License).
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.pollUntil = void 0;
function pollUntil(cb, timeout, interval) {
return new Promise(function (resolve, reject) {
var intervalId = setInterval(function () {
if (cb()) {
clearInterval(intervalId);
clearTimeout(timeoutId);
resolve();
}
}, interval);
var timeoutId = setTimeout(function () {
clearInterval(intervalId);
if (cb()) {
resolve();
}
else {
reject();
}
}, timeout);
});
}
exports.pollUntil = pollUntil;
//# sourceMappingURL=testUtils.test.js.map