This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/@babel/runtime-corejs2/helpers/classPrivateFieldDestructureSet.js

28 lines
653 B
JavaScript
Raw Normal View History

2019-08-11 18:48:02 +00:00
function _classPrivateFieldDestructureSet(receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
var descriptor = privateMap.get(receiver);
if (descriptor.set) {
if (!("__destrObj" in descriptor)) {
descriptor.__destrObj = {
set value(v) {
descriptor.set.call(receiver, v);
}
};
}
return descriptor.__destrObj;
} else {
if (!descriptor.writable) {
throw new TypeError("attempted to set read only private field");
}
return descriptor;
}
}
module.exports = _classPrivateFieldDestructureSet;