@instantdb/core
Version:
Instant's core local abstraction
18 lines • 384 B
JavaScript
export class Deferred {
promise;
_resolve;
_reject;
constructor() {
this.promise = new Promise((resolve, reject) => {
this._resolve = resolve;
this._reject = reject;
});
}
resolve(value) {
this._resolve(value);
}
reject(reason) {
this._reject(reason);
}
}
//# sourceMappingURL=Deferred.js.map