You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
458 B

4 years ago
  1. export default function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {
  2. if (receiver !== classConstructor) {
  3. throw new TypeError("Private static access of wrong provenance");
  4. }
  5. if (descriptor.set) {
  6. descriptor.set.call(receiver, value);
  7. } else {
  8. if (!descriptor.writable) {
  9. throw new TypeError("attempted to set read only private field");
  10. }
  11. descriptor.value = value;
  12. }
  13. return value;
  14. }