Files
plainleaf/client/polyfills.ts
T
Zef HemelandGitHub a524c64884 Go backend (#1555)
* Replaces old Deno server with a Go implementation
* Restructured the code base accordingly
2025-09-19 13:23:20 +02:00

11 lines
327 B
TypeScript

// Source: https://github.com/ungap/with-resolvers/blob/main/index.js
// @ts-ignore This is fine
Promise.withResolvers || (Promise.withResolvers = function withResolvers() {
let a, b;
const c = new this(function (resolve, reject) {
a = resolve;
b = reject;
});
return { resolve: a, reject: b, promise: c };
});