Files
ETB/ETB-FrontEnd/node_modules/fork-ts-checker-webpack-plugin/lib/utils/async/isPending.js
Iliyan Angelov 306b20e24a Frontend start
2025-09-14 00:54:48 +03:00

10 lines
317 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function isPending(promise, timeout = 100) {
return Promise.race([
promise.then(() => false).catch(() => false),
new Promise((resolve) => setTimeout(() => resolve(true), timeout)),
]);
}
exports.default = isPending;