next
Version:
The React Framework
29 lines (27 loc) • 899 B
JavaScript
/**
* Read record value or throw Promise if it's not resolved yet.
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "readRecordValue", {
enumerable: true,
get: function() {
return readRecordValue;
}
});
function readRecordValue(thenable) {
// @ts-expect-error TODO: fix type
if (thenable.status === "fulfilled") {
// @ts-expect-error TODO: fix type
return thenable.value;
} else {
throw 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=read-record-value.js.map