Skip to content

Commit

Permalink
Resolves #2078
Browse files Browse the repository at this point in the history
  • Loading branch information
David Fahlander committed Sep 30, 2024
1 parent d6a7387 commit f165658
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/helpers/promise.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,16 @@ props (DexiePromise, {
});
},

withResolvers () {
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers
let resolve, reject;
const promise = new this((res, rej) => {
resolve = res;
reject = rej;
});
return { promise, resolve, reject };
},

PSD: {
get: ()=>PSD,
set: value => PSD = value
Expand Down

0 comments on commit f165658

Please sign in to comment.