bpms_site/.svn/pristine/b3/b36729df6b38d335b2ea39429e062b2da4760a78.svn-base
2025-11-02 16:38:49 +03:30

34 lines
1.0 KiB
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "createRecordFromThenable", {
enumerable: true,
get: function() {
return createRecordFromThenable;
}
});
function createRecordFromThenable(promise) {
const thenable = promise;
thenable.status = "pending";
thenable.then((value)=>{
if (thenable.status === "pending") {
thenable.status = "fulfilled";
thenable.value = value;
}
}, (err)=>{
if (thenable.status === "pending") {
thenable.status = "rejected";
thenable.reason = err;
}
});
return thenable;
}
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=create-record-from-thenable.js.map