.
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "createPromiseWithResolvers", {
|
||||
enumerable: true,
|
||||
get: function() {
|
||||
return createPromiseWithResolvers;
|
||||
}
|
||||
});
|
||||
function createPromiseWithResolvers() {
|
||||
// Shim of Stage 4 Promise.withResolvers proposal
|
||||
let resolve;
|
||||
let reject;
|
||||
const promise = new Promise((res, rej)=>{
|
||||
resolve = res;
|
||||
reject = rej;
|
||||
});
|
||||
return {
|
||||
resolve: resolve,
|
||||
reject: reject,
|
||||
promise
|
||||
};
|
||||
}
|
||||
|
||||
//# sourceMappingURL=promise-with-resolvers.js.map
|
||||
Reference in New Issue
Block a user