main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
572 bytes
|
Line | |
---|
1 | 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 | return descriptor.__destrObj;
|
---|
11 | } else {
|
---|
12 | if (!descriptor.writable) {
|
---|
13 | throw new TypeError("attempted to set read only private field");
|
---|
14 | }
|
---|
15 | return descriptor;
|
---|
16 | }
|
---|
17 | }
|
---|
18 | module.exports = _classApplyDescriptorDestructureSet, module.exports.__esModule = true, module.exports["default"] = module.exports; |
---|
Note:
See
TracBrowser
for help on using the repository browser.