import { promiseWithResolvers } from "./promise-with-resolvers.js";
export class DeferredPromise {
    promise = promiseWithResolvers();
    status = "pending";
    get value() {
        return this.promise.promise;
    }
    resolve(value) {
        this.status = "fulfilled";
        this.promise.resolve(value);
    }
    reject(reason) {
        this.status = "rejected";
        this.promise.reject(reason);
    }
}
//# sourceMappingURL=deferred-promise.js.map