'use strict';

class Deferred {
  #resolve;
  #reject;
  get resolve() {
    return this.#resolve;
  }
  get reject() {
    return this.#reject;
  }
  then;
  catch;
  finally;
  constructor() {
    const promise = new Promise((resolve, reject) => {
      this.#resolve = resolve;
      this.#reject = reject;
    });
    this.then = promise.then.bind(promise);
    this.catch = promise.catch.bind(promise);
    this.finally = promise.finally.bind(promise);
  }
  [Symbol.toStringTag] = "DeferredPromise";
}
function createDeferred() {
  return new Deferred();
}

exports.createDeferred = createDeferred;
//# sourceMappingURL=deferred.cjs.js.map
