Skip to content

Commit a9da450

Browse files
committed
Update test refs
1 parent cc950d6 commit a9da450

File tree

437 files changed

+7806
-6844
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

437 files changed

+7806
-6844
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
function c(r, n) {
2-
let e = void 0;
2+
let e = new Uint8Array(4 * r * r), o = -.5;
33
return {
4-
e: new Uint8Array(4 * r * r),
5-
s: Math.sqrt(1.25),
4+
e,
5+
s: Math.sqrt(+1 + o * o),
66
c: (r - n) / 2
77
};
88
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
true;
1+
typeof __dirname != void 0;

crates/swc/tests/fixture/issues-8xxx/8880/output/1.js

+54-48
Original file line numberDiff line numberDiff line change
@@ -8,53 +8,59 @@ function a(module, exports, farmRequire, farmDynamicRequire) {
88
const _dep734fea04 = farmRequire("92648bed");
99
const _dayjs = _interop_require_default._(farmRequire("d0dc4dad"));
1010
farmRequire("15d5169f");
11-
(0, _dep734fea04.c)(function(module, exports) {
12-
var e__1, e__3, t, d;
13-
e__1 = _dep734fea04.a, void (module.exports = (t = (e__3 = _dayjs.default) && "object" == (0, _typeof.default)(e__3) && "default" in e__3 ? e__3 : {
14-
default: e__3
15-
}, d = {
16-
name: "zh-cn",
17-
weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
18-
weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
19-
weekdaysMin: "日_一_二_三_四_五_六".split("_"),
20-
months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
21-
monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
22-
ordinal: function ordinal(e, _) {
23-
return "W" === _ ? e + "周" : e + "日";
24-
},
25-
weekStart: 1,
26-
yearStart: 4,
27-
formats: {
28-
LT: "HH:mm",
29-
LTS: "HH:mm:ss",
30-
L: "YYYY/MM/DD",
31-
LL: "YYYY年M月D日",
32-
LLL: "YYYY年M月D日Ah点mm分",
33-
LLLL: "YYYY年M月D日ddddAh点mm分",
34-
l: "YYYY/M/D",
35-
ll: "YYYY年M月D日",
36-
lll: "YYYY年M月D日 HH:mm",
37-
llll: "YYYY年M月D日dddd HH:mm"
38-
},
39-
relativeTime: {
40-
future: "%s内",
41-
past: "%s前",
42-
s: "几秒",
43-
m: "1 分钟",
44-
mm: "%d 分钟",
45-
h: "1 小时",
46-
hh: "%d 小时",
47-
d: "1 天",
48-
dd: "%d 天",
49-
M: "1 个月",
50-
MM: "%d 个月",
51-
y: "1 年",
52-
yy: "%d 年"
53-
},
54-
meridiem: function meridiem(e, _) {
55-
var t = 100 * e + _;
56-
return t < 600 ? "凌晨" : t < 900 ? "早上" : t < 1100 ? "上午" : t < 1300 ? "中午" : t < 1800 ? "下午" : "晚上";
57-
}
58-
}, t["default"].locale(d, null, !0), d));
11+
_dep734fea04.c(function(module, exports) {
12+
var e__1, _;
13+
e__1 = _dep734fea04.a, _ = function(e__2) {
14+
var e__3;
15+
var t = e__2 && "object" == _typeof.default(e__2) && "default" in e__2 ? e__2 : {
16+
default: e__2
17+
}, d = {
18+
name: "zh-cn",
19+
weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
20+
weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
21+
weekdaysMin: "日_一_二_三_四_五_六".split("_"),
22+
months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
23+
monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
24+
ordinal: function ordinal(e, _) {
25+
return "W" === _ ? e + "周" : e + "日";
26+
},
27+
weekStart: 1,
28+
yearStart: 4,
29+
formats: {
30+
LT: "HH:mm",
31+
LTS: "HH:mm:ss",
32+
L: "YYYY/MM/DD",
33+
LL: "YYYY年M月D日",
34+
LLL: "YYYY年M月D日Ah点mm分",
35+
LLLL: "YYYY年M月D日ddddAh点mm分",
36+
l: "YYYY/M/D",
37+
ll: "YYYY年M月D日",
38+
lll: "YYYY年M月D日 HH:mm",
39+
llll: "YYYY年M月D日dddd HH:mm"
40+
},
41+
relativeTime: {
42+
future: "%s内",
43+
past: "%s前",
44+
s: "几秒",
45+
m: "1 分钟",
46+
mm: "%d 分钟",
47+
h: "1 小时",
48+
hh: "%d 小时",
49+
d: "1 天",
50+
dd: "%d 天",
51+
M: "1 个月",
52+
MM: "%d 个月",
53+
y: "1 年",
54+
yy: "%d 年"
55+
},
56+
meridiem: function meridiem(e, _) {
57+
var t = 100 * e + _;
58+
return t < 600 ? "凌晨" : t < 900 ? "早上" : t < 1100 ? "上午" : t < 1300 ? "中午" : t < 1800 ? "下午" : "晚上";
59+
}
60+
};
61+
return t["default"].locale(d, null, !0), d;
62+
}, void (true ? module.exports = _(_dayjs.default) : "function" == typeof void 0 && (void 0).amd ? (void 0)([
63+
"dayjs"
64+
], _) : (e__1 = "undefined" != typeof globalThis ? globalThis : e__1 || self).dayjs_locale_zh_cn = _(e__1.dayjs));
5965
});
6066
}

crates/swc/tests/fixture/sourcemap/004/output/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"use strict";
88
var r = function(n) {
99
var t = n.data;
10-
return (0, _.jsx)("div", {
10+
return _.jsx("div", {
1111
children: t.foo
1212
});
1313
};

crates/swc/tests/fixture/sourcemap/004/output/index.map

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"mappings": "AAACA,MAAK,gBAAmB,GAAGA,KAAK,gBAAmB,IAAI,EAAA,AAAC,EAAGC,IAAI,CAAC;IAC7D;QACI;KACH;IACD;QACU,MAAY,SAAUC,CAAuB,EAAEC,CAAmB,EAAEC,CAAmB,EAAE;YAC3F;YACA,IAAIC,IAAa,SAAoBC,CAAI,EAAE;gBACvC,IAAIC,IAAOD,EAAKC,IAAI;gBACpB,OAAsB,CAAA,GAAGC,EAA+CC,GAAAA,AAAE,EAAG,OAAO;oBAChFC,UAAUH,EAAKI,GAAG;gBACtB;YACJ;YACAP,EAAoBQ,CAAC,CAACT,IACDC,EAAoBS,CAAC,CAACV,GAAqB;gBACvCW,SAAS,WAAoB;oBAC9C,OAAqBA;gBACzB;gBACqBC,SAAS,WAAoB;oBAC9C,OAAqBV;gBACzB;YACJ;YACqB,IAAIG,IAAiDJ,EAAoB,OAC1FU,IAAU,CAAA;QAE1B;QACc,MAAY,SAAUZ,CAAuB,EAAEc,CAAwB,EAAEZ,CAAmB,EAAE;aAC/Fa,OAAOC,QAAQ,GAAGD,OAAOC,QAAQ,IAAI,EAAA,AAAC,EAAGjB,IAAI,CAAC;gBAC3C;gBACA,WAAY;oBACR,OAAOG,EAAoB;gBAC/B;aACH;QAGb;IACI;IACS,SAAUA,CAAmB,EAAE;QAK3BA,EAAoBe,CAAC,CAAC,GAAG;YAC9B;YACA;YACA;SACH,EAAE,WAAY;YACX,OAPOf,EAAoBA,EAAoBgB,CAAC,GAOxB;QAC5B,IAESC,OAD0BjB,EAAoBe,CAAC;IAGhE;CACC",
2+
"mappings": "AAACA,MAAK,gBAAmB,GAAGA,KAAK,gBAAmB,IAAI,EAAA,AAAC,EAAGC,IAAI,CAAC;IAC7D;QACI;KACH;IACD;QACU,MAAY,SAAUC,CAAuB,EAAEC,CAAmB,EAAEC,CAAmB,EAAE;YAC3F;YACA,IAAIC,IAAa,SAAoBC,CAAI,EAAE;gBACvC,IAAIC,IAAOD,EAAKC,IAAI;gBACpB,OAAsB,AAAGC,EAA+CC,GAAE,CAAG,OAAO;oBAChFC,UAAUH,EAAKI,GAAG;gBACtB;YACJ;YACAP,EAAoBQ,CAAC,CAACT,IACDC,EAAoBS,CAAC,CAACV,GAAqB;gBACvCW,SAAS,WAAoB;oBAC9C,OAAqBA;gBACzB;gBACqBC,SAAS,WAAoB;oBAC9C,OAAqBV;gBACzB;YACJ;YACqB,IAAIG,IAAiDJ,EAAoB,OAC1FU,IAAU,CAAA;QAE1B;QACc,MAAY,SAAUZ,CAAuB,EAAEc,CAAwB,EAAEZ,CAAmB,EAAE;aAC/Fa,OAAOC,QAAQ,GAAGD,OAAOC,QAAQ,IAAI,EAAA,AAAC,EAAGjB,IAAI,CAAC;gBAC3C;gBACA,WAAY;oBACR,OAAOG,EAAoB;gBAC/B;aACH;QAGb;IACI;IACS,SAAUA,CAAmB,EAAE;QAK3BA,EAAoBe,CAAC,CAAC,GAAG;YAC9B;YACA;YACA;SACH,EAAE,WAAY;YACX,OAPOf,EAAoBA,EAAoBgB,CAAC,GAOxB;QAC5B,IAESC,OAD0BjB,EAAoBe,CAAC;IAGhE;CACC",
33
"names": [
44
"self",
55
"push",

crates/swc/tests/tsc-references/annotatedThisPropertyInitializerDoesntNarrow.2.minified.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ export var C = /*#__PURE__*/ function() {
55
_class_call_check(this, C), this.assets = {};
66
}
77
return C.prototype.m = function() {
8-
this.assets;
8+
0, this.assets;
99
}, C;
1010
}();

crates/swc/tests/tsc-references/arrayLiterals2ES6.2.minified.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,16 @@ var [c0, c1] = [
5151
], [
5252
...a3
5353
], [
54-
...temp1
54+
...[
55+
()=>1
56+
]
5557
], [
5658
...temp1
59+
], [
60+
[
61+
...temp1
62+
],
63+
...[
64+
"hello"
65+
]
5766
];

crates/swc/tests/tsc-references/arrayOfFunctionTypes3.2.minified.js

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
//// [arrayOfFunctionTypes3.ts]
2-
var a, a2, b2, c2;
32
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
43
[
54
function() {
65
return 1;
76
},
87
function() {}
9-
][0](), new function C() {
8+
][0]();
9+
var a, b, c, a2, b2, c2, C = function C() {
1010
_class_call_check(this, C);
11-
}(), a(''), a(1), (0, [
11+
};
12+
new [
13+
C,
14+
C
15+
][0]();
16+
var r4 = [
17+
a,
18+
b,
19+
c
20+
][0];
21+
r4(''), r4(1), (0, [
1222
a2,
1323
b2,
1424
c2

crates/swc/tests/tsc-references/arrowFunctionExpressions.2.minified.js

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
import { _ as _class_call_check } from "@swc/helpers/_/_class_call_check";
33
import "@swc/helpers/_/_sliced_to_array";
44
import "@swc/helpers/_/_to_array";
5+
''.length.toExponential();

crates/swc/tests/tsc-references/assignmentCompatWithDiscriminatedUnion.2.minified.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
var Example1, Example2, Example3, Example4, Example5, GH14865, GH30170, GH12052, GH18421, GH15907, GH20889, GH39357, b1;
33
Example1 || (Example1 = {}), t = s, Example2 || (Example2 = {}), t = s, Example3 || (Example3 = {}), t = s, Example4 || (Example4 = {}), t = s, Example5 || (Example5 = {}), t = s, GH14865 || (GH14865 = {}), b1.type, GH30170 || (GH30170 = {}), function(GH12052) {
44
function getAxisType() {
5-
return "categorical";
5+
return 0 ? "linear" : "categorical";
66
}
77
getAxisType(), getAxisType();
88
}(GH12052 || (GH12052 = {})), GH18421 || (GH18421 = {}), GH15907 || (GH15907 = {}), GH20889 || (GH20889 = {}), GH39357 || (GH39357 = {}), ("a" === b || "b" === b) && b;

crates/swc/tests/tsc-references/callSignatureWithoutReturnTypeAnnotationInference.2.minified.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function m1() {
1010
try {} catch (e) {
1111
return [];
1212
} finally{}
13-
}(0), _type_of(1), (M = M1 || (M1 = {})).x = 1, M.C = function C() {
13+
}(0), 1 === void 0 || _type_of(1), (M = M1 || (M1 = {})).x = 1, M.C = function C() {
1414
_class_call_check(this, C);
1515
}, (m1 || (m1 = {})).y = 2;
1616
var e1, M, M1, c1 = function c1(x) {

crates/swc/tests/tsc-references/checkJsdocTypeTagOnObjectProperty1.2.minified.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var _obj, obj = (_define_property(_obj = {
88
return n1 + 42;
99
},
1010
lol: "hello Lol"
11-
}, "bar1", 42), _define_property(_obj, "arrowFunc", function(num) {
11+
}, 'b' + 'ar1', 42), _define_property(_obj, "arrowFunc", function(num) {
1212
return num + 42;
1313
}), _obj);
1414
obj.foo = 'string', obj.lol, obj.bar = void 0, obj.method1(0), obj.bar1 = "42", obj.arrowFunc(0);

crates/swc/tests/tsc-references/classWithStaticFieldInParameterInitializer.2(target=es5).2.minified.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ var C = function C() {
66
_class_call_check(this, C);
77
};
88
!function() {
9-
arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : /*#__PURE__*/ function(C) {
9+
arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function(C) {
1010
function _class() {
1111
return _class_call_check(this, _class), _call_super(this, _class, arguments);
1212
}
1313
return _inherits(_class, C), _class;
1414
}(C).x = 1;
1515
}(), function() {
16-
arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : /*#__PURE__*/ function(C) {
16+
arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : function(C) {
1717
function _class() {
1818
return _class_call_check(this, _class), _call_super(this, _class, arguments);
1919
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//// [computedPropertyNames1_ES5.ts]
22
import { _ as _define_enumerable_properties } from "@swc/helpers/_/_define_enumerable_properties";
33
var _mutatorMap = {};
4-
_mutatorMap[1] = _mutatorMap[1] || {}, _mutatorMap[1].get = function() {
4+
_mutatorMap[0 + 1] = _mutatorMap[0 + 1] || {}, _mutatorMap[0 + 1].get = function() {
55
return 0;
6-
}, _mutatorMap[1] = _mutatorMap[1] || {}, _mutatorMap[1].set = function(v) {}, _define_enumerable_properties({}, _mutatorMap);
6+
}, _mutatorMap[0 + 1] = _mutatorMap[0 + 1] || {}, _mutatorMap[0 + 1].set = function(v) {}, _define_enumerable_properties({}, _mutatorMap);
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
//// [computedPropertyNames46_ES5.ts]
22
import { _ as _define_property } from "@swc/helpers/_/_define_property";
3-
_define_property({}, 0, 0);
3+
_define_property({}, "" || 0, 0);
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
//// [computedPropertyNames47_ES5.ts]
22
import { _ as _define_property } from "@swc/helpers/_/_define_property";
33
var E1, E2, E11 = ((E1 = E11 || {})[E1.x = 0] = "x", E1), E21 = ((E2 = E21 || {})[E2.x = 0] = "x", E2);
4-
_define_property({}, 0, 0);
4+
_define_property({}, 0 || 0, 0);
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
//// [computedPropertyNames48_ES5.ts]
22
import { _ as _define_property } from "@swc/helpers/_/_define_property";
33
var E, a, E1 = ((E = E1 || {})[E.x = 0] = "x", E);
4-
extractIndexer(_define_property({}, a, "")), extractIndexer(_define_property({}, 0, "")), extractIndexer(_define_property({}, 0, ""));
4+
extractIndexer(_define_property({}, a, "")), extractIndexer(_define_property({}, 0, "")), extractIndexer(_define_property({}, "" || 0, ""));

crates/swc/tests/tsc-references/computedPropertyNames48_ES6.2.minified.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ extractIndexer({
55
}), extractIndexer({
66
0: ""
77
}), extractIndexer({
8-
0: ""
8+
["" || 0]: ""
99
});
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
//// [computedPropertyNamesContextualType10_ES5.ts]
22
var _obj;
33
import { _ as _define_property } from "@swc/helpers/_/_define_property";
4-
_define_property(_obj = {}, NaN, ""), _define_property(_obj, NaN, 0);
4+
_define_property(_obj = {}, +"foo", ""), _define_property(_obj, +"bar", 0);
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//// [computedPropertyNamesContextualType2_ES5.ts]
22
var _obj;
33
import { _ as _define_property } from "@swc/helpers/_/_define_property";
4-
_define_property(_obj = {}, NaN, function(y) {
4+
_define_property(_obj = {}, +"foo", function(y) {
55
return y.length;
6-
}), _define_property(_obj, NaN, function(y) {
6+
}), _define_property(_obj, +"bar", function(y) {
77
return y.length;
88
});
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//// [computedPropertyNamesContextualType3_ES5.ts]
22
var _obj;
33
import { _ as _define_property } from "@swc/helpers/_/_define_property";
4-
_define_property(_obj = {}, NaN, function(y) {
4+
_define_property(_obj = {}, +"foo", function(y) {
55
return y.length;
6-
}), _define_property(_obj, NaN, function(y) {
6+
}), _define_property(_obj, +"bar", function(y) {
77
return y.length;
88
});
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
//// [computedPropertyNamesContextualType5_ES5.ts]
22
var _obj;
33
import { _ as _define_property } from "@swc/helpers/_/_define_property";
4-
_define_property(_obj = {}, NaN, ""), _define_property(_obj, NaN, 0);
4+
_define_property(_obj = {}, +"foo", ""), _define_property(_obj, +"bar", 0);

crates/swc/tests/tsc-references/computedPropertyNamesContextualType6_ES5.2.minified.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import { _ as _define_property } from "@swc/helpers/_/_define_property";
44
foo((_define_property(_obj = {
55
p: "",
66
0: function() {}
7-
}, "hibye", !0), _define_property(_obj, 1, 0), _define_property(_obj, NaN, [
7+
}, "hi" + "bye", !0), _define_property(_obj, 0 + 1, 0), _define_property(_obj, +"hi", [
88
0
99
]), _obj));

crates/swc/tests/tsc-references/computedPropertyNamesContextualType6_ES6.2.minified.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
foo({
33
p: "",
44
0: ()=>{},
5-
hibye: !0,
6-
1: 0,
7-
[NaN]: [
5+
["hi" + "bye"]: !0,
6+
[0 + 1]: 0,
7+
[+"hi"]: [
88
0
99
]
1010
});

crates/swc/tests/tsc-references/computedPropertyNamesContextualType7_ES5.2.minified.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var _obj;
33
import { _ as _define_property } from "@swc/helpers/_/_define_property";
44
foo((_define_property(_obj = {
55
0: function() {}
6-
}, "hibye", !0), _define_property(_obj, 1, 0), _define_property(_obj, NaN, [
6+
}, "hi" + "bye", !0), _define_property(_obj, 0 + 1, 0), _define_property(_obj, +"hi", [
77
0
88
]), _obj)), g({
99
p: ""

crates/swc/tests/tsc-references/computedPropertyNamesContextualType7_ES6.2.minified.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//// [computedPropertyNamesContextualType7_ES6.ts]
22
foo({
33
0: ()=>{},
4-
hibye: !0,
5-
1: 0,
6-
[NaN]: [
4+
["hi" + "bye"]: !0,
5+
[0 + 1]: 0,
6+
[+"hi"]: [
77
0
88
]
99
}), g({
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
//// [computedPropertyNamesContextualType9_ES5.ts]
22
var _obj;
33
import { _ as _define_property } from "@swc/helpers/_/_define_property";
4-
_define_property(_obj = {}, NaN, ""), _define_property(_obj, NaN, 0);
4+
_define_property(_obj = {}, +"foo", ""), _define_property(_obj, +"bar", 0);
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
//// [computedPropertyNamesDeclarationEmit6_ES5.ts]
22
var _obj;
33
import { _ as _define_property } from "@swc/helpers/_/_define_property";
4-
_define_property(_obj = {}, -1, {}), _define_property(_obj, 1, {}), _define_property(_obj, -2, {}), _define_property(_obj, !1, {});
4+
_define_property(_obj = {}, -1, {}), _define_property(_obj, +1, {}), _define_property(_obj, ~1, {}), _define_property(_obj, !1, {});
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
//// [conditionalOperatorConditionIsNumberType.ts]
2+
"string".length, "string".length;
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
//// [constEnum2.ts]
2-
var D, D1 = ((D = D1 || {})[D.e = 199 * Math.floor(1000 * Math.random())] = "e", D[D.f = 10 - 100 * Math.floor(Math.random() % 8)] = "f", D[D.g = 0] = "g", D);
2+
var D, D1 = ((D = D1 || {})[D.e = 199 * Math.floor(1000 * Math.random())] = "e", D[D.f = 10 - 100 * Math.floor(Math.random() % 8)] = "f", D[D.g = 9000 % 2] = "g", D);

crates/swc/tests/tsc-references/controlFlowBindingElement.2.minified.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
var _data_param = 'value';
33
console.log(void 0 === _data_param ? function() {
44
throw Error('param is not defined');
5-
}() : _data_param);
5+
}() : _data_param), 'value' === void 0 && function() {
6+
throw Error('param is not defined');
7+
}();
68
var window = {};
79
window.window = window, window.window.window;
810
var window1 = {};
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
//// [controlFlowIIFE.ts]
22
let maybeNumber, test;
3-
if (maybeNumber = 1, ++maybeNumber, maybeNumber++, !test) throw Error('Test is not defined');
3+
if (maybeNumber = 1, void 0 !== ++maybeNumber && maybeNumber++, !test) throw Error('Test is not defined');
44
test.slice(1);

0 commit comments

Comments
 (0)