Debian Codegraph @

packages/babel-plugin-transform-modules-commonjs/test/fixtures/misc/import-const-throw/output.js

raw
1 "use strict";
2
3 var _foo = _interopRequireDefault(require("foo"));
4 var Bar = _interopRequireWildcard(require("bar"));
5 var _baz = require("baz");
6 function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
7 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
8 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9 _foo.default = (42, function () {
10 throw new Error('"' + "Foo" + '" is read-only.');
11 }());
12 Bar = (43, function () {
13 throw new Error('"' + "Bar" + '" is read-only.');
14 }());
15 _baz.Baz = (44, function () {
16 throw new Error('"' + "Baz" + '" is read-only.');
17 }());
18 ({
19 Foo
20 } = ({}, function () {
21 throw new Error('"' + "Foo" + '" is read-only.');
22 }()));
23 ({
24 Bar
25 } = ({}, function () {
26 throw new Error('"' + "Bar" + '" is read-only.');
27 }()));
28 ({
29 Baz
30 } = ({}, function () {
31 throw new Error('"' + "Baz" + '" is read-only.');
32 }()));
33 ({
34 prop: Foo
35 } = ({}, function () {
36 throw new Error('"' + "Foo" + '" is read-only.');
37 }()));
38 ({
39 prop: Bar
40 } = ({}, function () {
41 throw new Error('"' + "Bar" + '" is read-only.');
42 }()));
43 ({
44 prop: Baz
45 } = ({}, function () {
46 throw new Error('"' + "Baz" + '" is read-only.');
47 }()));
48 _foo.default = (_foo.default + 2, function () {
49 throw new Error('"' + "Foo" + '" is read-only.');
50 }());
51 Bar = (Bar + 2, function () {
52 throw new Error('"' + "Bar" + '" is read-only.');
53 }());
54 _baz.Baz = (_baz.Baz + 2, function () {
55 throw new Error('"' + "Baz" + '" is read-only.');
56 }());
57 _foo.default = (_foo.default >>> 3, function () {
58 throw new Error('"' + "Foo" + '" is read-only.');
59 }());
60 Bar = (Bar >>> 3, function () {
61 throw new Error('"' + "Bar" + '" is read-only.');
62 }());
63 _baz.Baz = (_baz.Baz >>> 3, function () {
64 throw new Error('"' + "Baz" + '" is read-only.');
65 }());
66 _foo.default && (_foo.default = (4, function () {
67 throw new Error('"' + "Foo" + '" is read-only.');
68 }()));
69 Bar && (Bar = (4, function () {
70 throw new Error('"' + "Bar" + '" is read-only.');
71 }()));
72 _baz.Baz && (_baz.Baz = (4, function () {
73 throw new Error('"' + "Baz" + '" is read-only.');
74 }()));
75 _foo.default -= function () {
76 throw new Error('"' + "Foo" + '" is read-only.');
77 }();
78 Bar -= function () {
79 throw new Error('"' + "Bar" + '" is read-only.');
80 }();
81 _baz.Baz -= function () {
82 throw new Error('"' + "Baz" + '" is read-only.');
83 }();
84 _foo.default += function () {
85 throw new Error('"' + "Foo" + '" is read-only.');
86 }();
87 Bar += function () {
88 throw new Error('"' + "Bar" + '" is read-only.');
89 }();
90 _baz.Baz += function () {
91 throw new Error('"' + "Baz" + '" is read-only.');
92 }();
93 for (let _Foo in {}) {
94 (function () {
95 throw new Error('"' + "Foo" + '" is read-only.');
96 })();
97 ;
98 }
99 for (let _Bar in {}) {
100 (function () {
101 throw new Error('"' + "Bar" + '" is read-only.');
102 })();
103 }
104 for (let _Baz of []) {
105 (function () {
106 throw new Error('"' + "Baz" + '" is read-only.');
107 })();
108 let Baz;
109 }
110 for (let _Foo2 in {}) {
111 (function () {
112 throw new Error('"' + "Foo" + '" is read-only.');
113 })();
114 }
115 for (let _ref in {}) {
116 (function () {
117 throw new Error('"' + "Bar" + '" is read-only.');
118 })();
119 }
120 for (let _ref2 in {}) {
121 (function () {
122 throw new Error('"' + "Baz" + '" is read-only.');
123 })();
124 }