Files
discord-decomp/_bundle/Module4346.js
T
2026-11-01 12:12:55 +02:00

32 lines
858 B
JavaScript

// Metro module 4346 (f4347).
let c2573_0;
module.exports.timeout = function(a0, c14137_0) {
let c14137_1;
const r12 = Object.create(c2573_0.prototype);
Error.call(r12);
r12.stack = Error().stack;
r12.message = "Timeout";
let c14137_2 = r12;
return Promise.race([a0, new Promise(function(resolve, c25049_0) {
c14137_1 = setTimeout(function() {
c25049_0(c14137_2);
}, c14137_0);
})]).then(function(result) {
clearTimeout(c14137_1);
return result;
}, function(a0) {
clearTimeout(c14137_1);
throw a0;
});
};
const exports2 = module.exports;
const TimeoutError = function() {
Error.call(this);
this.stack = Error().stack;
this.message = "Timeout";
};
exports2.TimeoutError = TimeoutError;
c2573_0 = TimeoutError;
c2573_0.prototype = Object.create(Error.prototype);
c2573_0.prototype.name = "TimeoutError";