Files
plainleaf/client/lib/polyfills.ts
T
Zef Hemel bb602dd9e8 Moved some more code around
Mostly just shuffling files to different folders, but also: renamed
PagePicker to AnythingPicker
2025-09-29 11:03:06 +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 };
});