classStaticPrivateFieldSpecSet.js 404 B

1234567891011121314
  1. function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {
  2. if (receiver !== classConstructor) {
  3. throw new TypeError("Private static access of wrong provenance");
  4. }
  5. if (!descriptor.writable) {
  6. throw new TypeError("attempted to set read only private field");
  7. }
  8. descriptor.value = value;
  9. return value;
  10. }
  11. module.exports = _classStaticPrivateFieldSpecSet;