Projekt

Obecné

Profil

Stáhnout (494 Bajtů) Statistiky
| Větev: | Revize:
1
function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {
2
  if (receiver !== classConstructor) {
3
    throw new TypeError("Private static access of wrong provenance");
4
  }
5

    
6
  if (descriptor.set) {
7
    descriptor.set.call(receiver, value);
8
  } else {
9
    if (!descriptor.writable) {
10
      throw new TypeError("attempted to set read only private field");
11
    }
12

    
13
    descriptor.value = value;
14
  }
15

    
16
  return value;
17
}
18

    
19
module.exports = _classStaticPrivateFieldSpecSet;
(22-22/80)