Last change
on this file since bdd6491 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
458 bytes
|
Line | |
---|
1 | export default function _classApplyDescriptorDestructureSet(receiver, descriptor) {
|
---|
2 | if (descriptor.set) {
|
---|
3 | if (!("__destrObj" in descriptor)) {
|
---|
4 | descriptor.__destrObj = {
|
---|
5 | set value(v) {
|
---|
6 | descriptor.set.call(receiver, v);
|
---|
7 | }
|
---|
8 |
|
---|
9 | };
|
---|
10 | }
|
---|
11 |
|
---|
12 | return descriptor.__destrObj;
|
---|
13 | } else {
|
---|
14 | if (!descriptor.writable) {
|
---|
15 | throw new TypeError("attempted to set read only private field");
|
---|
16 | }
|
---|
17 |
|
---|
18 | return descriptor;
|
---|
19 | }
|
---|
20 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.