"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defineWithResolversPolyfill = void 0;
const defineWithResolversPolyfill = () => {
    // @ts-expect-error This does not exist outside of polyfill which this is doing
    if (typeof Promise.withResolvers === 'undefined') {
        // @ts-expect-error This does not exist outside of polyfill which this is doing
        Promise.withResolvers = () => {
            // biome-ignore lint/suspicious/noEvolvingTypes: <>
            let resolve;
            // biome-ignore lint/suspicious/noEvolvingTypes: <>
            let reject;
            const promise = new Promise((res, rej) => {
                resolve = res;
                reject = rej;
            });
            return { promise, resolve, reject };
        };
    }
};
exports.defineWithResolversPolyfill = defineWithResolversPolyfill;
