2026-03-04 12:59:40 +01:00

8 lines
220 B
JavaScript

Promise.withResolvers || (Promise.withResolvers = function withResolvers() {
var a, b, c = new this(function (resolve, reject) {
a = resolve;
b = reject;
});
return {resolve: a, reject: b, promise: c};
});