fix(es/transform): Apply hygiene and resolver if minify is specified (#6793)

**Related issue:**

 - Closes https://github.com/swc-project/swc/issues/6791.
This commit is contained in:
Donny/강동윤 2023-01-12 16:29:28 +09:00 committed by GitHub
parent 06e7db9f06
commit c14540905f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
151 changed files with 637 additions and 459 deletions

View File

@ -24,9 +24,9 @@ use swc_ecma_transforms::{
modules,
optimization::const_modules,
pass::Optional,
Assumptions,
resolver, Assumptions,
};
use swc_ecma_visit::{as_folder, noop_visit_mut_type, VisitMut};
use swc_ecma_visit::{as_folder, noop_visit_mut_type, VisitMut, VisitMutWith};
use crate::config::{CompiledPaths, GlobalPassOption, JsMinifyOptions, ModuleConfig};
@ -408,6 +408,13 @@ impl VisitMut for MinifierPass {
return;
}
m.visit_mut_with(&mut hygiene());
m.visit_mut_with(&mut resolver(
self.unresolved_mark,
self.top_level_mark,
false,
));
m.map_with_mut(|m| {
swc_ecma_minifier::optimize(
m.into(),

View File

@ -1,15 +1,15 @@
export var Test;
(function(t) {
let e;
(function(e) {
e["Test"] = "1";
e["Test2"] = "2";
e["Test3"] = "3";
(function(t) {
t["Test"] = "1";
t["Test2"] = "2";
t["Test3"] = "3";
})(e = t.testEnum || (t.testEnum = {}));
let s;
(function(s) {
s["Test"] = "1";
s["Test2"] = "2";
s["Test3"] = "3";
(function(t) {
t["Test"] = "1";
t["Test2"] = "2";
t["Test3"] = "3";
})(s = t.testEnum2 || (t.testEnum2 = {}));
})(Test || (Test = {}));

View File

@ -0,0 +1,71 @@
{
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": false
},
"target": "es2022",
"loose": false,
"minify": {
"compress": {
"arguments": false,
"arrows": true,
"booleans": true,
"booleans_as_integers": false,
"collapse_vars": true,
"comparisons": true,
"computed_props": true,
"conditionals": true,
"dead_code": true,
"directives": true,
"drop_console": false,
"drop_debugger": true,
"evaluate": true,
"expression": false,
"hoist_funs": false,
"hoist_props": true,
"hoist_vars": true,
"if_return": true,
"join_vars": true,
"keep_classnames": false,
"keep_fargs": true,
"keep_fnames": false,
"keep_infinity": false,
"loops": true,
"negate_iife": true,
"properties": true,
"reduce_funcs": false,
"reduce_vars": false,
"side_effects": true,
"switches": true,
"typeofs": true,
"unsafe": false,
"unsafe_arrows": false,
"unsafe_comps": false,
"unsafe_Function": false,
"unsafe_math": false,
"unsafe_symbols": false,
"unsafe_methods": false,
"unsafe_proto": false,
"unsafe_regexp": false,
"unsafe_undefined": false,
"unused": true,
"const_to_let": true,
"pristine_globals": true
},
"mangle": {
"toplevel": true,
"keep_classnames": false,
"keep_fnames": false,
"keep_private_props": false,
"ie8": false,
"safari10": false
}
}
},
"module": {
"type": "es6"
},
"minify": false,
"isModule": true
}

View File

@ -0,0 +1,7 @@
import { test } from "test";
enum Test {
"Hello" = "World!",
}
test(Test["Hello"])

View File

@ -0,0 +1,3 @@
var l;
import { test as o } from "test";
(l || (l = {})).Hello = "World!", o(l.Hello);

View File

@ -1 +1 @@
import r from"@swc/helpers/src/_async_to_generator.mjs";import t from"@swc/helpers/src/_ts_generator.mjs";export default function e(r){var t=r.data;return React.createElement("div",null,t.foo)}export function getStaticProps(){return n.apply(this,arguments)}function n(){return(n=r(function(){return t(this,function(r){return[2,{props:{data:{foo:"bar"}}}]})})).apply(this,arguments)}
import t from"@swc/helpers/src/_async_to_generator.mjs";import r from"@swc/helpers/src/_ts_generator.mjs";export default function e(t){var r=t.data;return React.createElement("div",null,r.foo)}export function getStaticProps(){return n.apply(this,arguments)}function n(){return(n=t(function(){return r(this,function(t){return[2,{props:{data:{foo:"bar"}}}]})})).apply(this,arguments)}

View File

@ -2,9 +2,9 @@
for(var _i = 0, _iter = []; _i < _iter.length; _i++){
_iter[_i];
for(var _i1 = 0, _iter1 = [
_$v
_$v1
]; _i1 < _iter1.length; _i1++){
var _$v = _iter1[_i1];
_$v++;
var _$v1 = _iter1[_i1];
_$v1++;
}
}

View File

@ -1 +1,2 @@
//// [InvalidNonInstantiatedModule.ts]
M;

View File

@ -3,11 +3,11 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.aTs = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "default", {
}), Object.defineProperty(exports1, "default", {
enumerable: !0,
get: ()=>_default
});
@ -19,12 +19,12 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.bTs = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
function _default() {}
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "default", {
}), Object.defineProperty(exports1, "default", {
enumerable: !0,
get: ()=>_default
});

View File

@ -1,2 +1,2 @@
//// [asOpEmitParens.ts]
x.y, new (x());
x, x.y, new (x());

View File

@ -5,7 +5,7 @@ function _templateObject() {
"Hello ",
" World"
]);
return _templateObject = function _templateObject() {
return _templateObject = function() {
return data;
}, data;
}
@ -13,7 +13,7 @@ function _templateObject1() {
var data = _tagged_template_literal([
"Hello"
]);
return _templateObject1 = function _templateObject1() {
return _templateObject1 = function() {
return data;
}, data;
}

View File

@ -5,7 +5,7 @@ function _templateObject() {
var data = _tagged_template_literal([
"Hello world"
]);
return _templateObject = function _templateObject() {
return _templateObject = function() {
return data;
}, data;
}

View File

@ -1,14 +1,14 @@
//// [assignmentCompatWithDiscriminatedUnion.ts]
var Example1, Example2, Example3, Example4, Example5, GH14865, GH30170, GH12052, GH18421, GH15907, GH20889, GH39357;
Example1 || (Example1 = {}), t = s, Example2 || (Example2 = {}), t = s, Example3 || (Example3 = {}), t = s, Example4 || (Example4 = {}), t = s, Example5 || (Example5 = {}), t = s, function(GH14865) {
var b, a = {
var b1, a = {
type: "A",
data: "whatevs"
};
a.type, b.type, b = a;
a.type, b1.type, b1 = a;
}(GH14865 || (GH14865 = {})), GH30170 || (GH30170 = {}), function(GH12052) {
var getAxisType = function() {
return "categorical";
};
getAxisType(), getAxisType();
}(GH12052 || (GH12052 = {})), GH18421 || (GH18421 = {}), GH15907 || (GH15907 = {}), GH20889 || (GH20889 = {}), GH39357 || (GH39357 = {});
}(GH12052 || (GH12052 = {})), GH18421 || (GH18421 = {}), GH15907 || (GH15907 = {}), GH20889 || (GH20889 = {}), GH39357 || (GH39357 = {}), ("a" === b || "b" === b) && b;

View File

@ -1,5 +1,5 @@
//// [callChain.ts]
var _o2, _o21, _o22, _o23, _o3_b, _o3_b1, _o3_b2, _o3_b3, _o3_b4, _o3_b5, _o3_b6, _o3_b7, _o3_b8, _o3_b9, _o3_b10, _o3_b11, _o5;
var _o2, _o21, _o22, _o23, _o3_b6, _o3_b7, _o3_b8, _o3_b9, _o3_b10, _o3_b11, _o3_b12, _o3_b13, _o3_b14, _o3_b15, _o3_b16, _o3_b17, _o5;
null == o1 || o1(), null == o1 || o1(1), null == o1 || o1.apply(void 0, [
1,
2
@ -24,31 +24,31 @@ null == o1 || o1(), null == o1 || o1(1), null == o1 || o1.apply(void 0, [
2,
3,
4
]), null === (_o3_b = o3.b) || void 0 === _o3_b || _o3_b.call(o3).c, null === (_o3_b1 = o3.b) || void 0 === _o3_b1 || _o3_b1.call(o3, 1).c, null === (_o3_b2 = o3.b) || void 0 === _o3_b2 || _o3_b2.call.apply(_o3_b2, [
]), null === (_o3_b6 = o3.b) || void 0 === _o3_b6 || _o3_b6.call(o3).c, null === (_o3_b7 = o3.b) || void 0 === _o3_b7 || _o3_b7.call(o3, 1).c, null === (_o3_b8 = o3.b) || void 0 === _o3_b8 || _o3_b8.call.apply(_o3_b8, [
o3,
1,
2
]).c, null === (_o3_b3 = o3.b) || void 0 === _o3_b3 || _o3_b3.call.apply(_o3_b3, [
]).c, null === (_o3_b9 = o3.b) || void 0 === _o3_b9 || _o3_b9.call.apply(_o3_b9, [
o3,
1,
2,
3,
4
]).c, null === (_o3_b4 = o3.b) || void 0 === _o3_b4 || _o3_b4.call(o3).c, null === (_o3_b5 = o3.b) || void 0 === _o3_b5 || _o3_b5.call(o3, 1).c, null === (_o3_b6 = o3.b) || void 0 === _o3_b6 || _o3_b6.call.apply(_o3_b6, [
]).c, null === (_o3_b10 = o3.b) || void 0 === _o3_b10 || _o3_b10.call(o3).c, null === (_o3_b11 = o3.b) || void 0 === _o3_b11 || _o3_b11.call(o3, 1).c, null === (_o3_b12 = o3.b) || void 0 === _o3_b12 || _o3_b12.call.apply(_o3_b12, [
o3,
1,
2
]).c, null === (_o3_b7 = o3.b) || void 0 === _o3_b7 || _o3_b7.call.apply(_o3_b7, [
]).c, null === (_o3_b13 = o3.b) || void 0 === _o3_b13 || _o3_b13.call.apply(_o3_b13, [
o3,
1,
2,
3,
4
]).c, null === (_o3_b8 = o3.b) || void 0 === _o3_b8 || _o3_b8.call(o3).c, null === (_o3_b9 = o3.b) || void 0 === _o3_b9 || _o3_b9.call(o3, 1).c, null === (_o3_b10 = o3.b) || void 0 === _o3_b10 || _o3_b10.call.apply(_o3_b10, [
]).c, null === (_o3_b14 = o3.b) || void 0 === _o3_b14 || _o3_b14.call(o3).c, null === (_o3_b15 = o3.b) || void 0 === _o3_b15 || _o3_b15.call(o3, 1).c, null === (_o3_b16 = o3.b) || void 0 === _o3_b16 || _o3_b16.call.apply(_o3_b16, [
o3,
1,
2
]).c, null === (_o3_b11 = o3.b) || void 0 === _o3_b11 || _o3_b11.call.apply(_o3_b11, [
]).c, null === (_o3_b17 = o3.b) || void 0 === _o3_b17 || _o3_b17.call.apply(_o3_b17, [
o3,
1,
2,

View File

@ -1,2 +1,3 @@
//// [file.tsx]
import * as React from "react";
GenericComponent, GenericComponent, GenericComponent, GenericComponent;

View File

@ -2,3 +2,4 @@
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
import _inherits from "@swc/helpers/src/_inherits.mjs";
import _create_super from "@swc/helpers/src/_create_super.mjs";
C1, D1, E1;

View File

@ -4,11 +4,11 @@
"exports",
"@swc/helpers/src/_class_call_check.mjs"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.classStaticBlock24Ts = {}, global.classCallCheckMjs);
}(this, function(exports, _classCallCheck) {
}(this, function(exports1, _classCallCheck) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "C", {
}), Object.defineProperty(exports1, "C", {
enumerable: !0,
get: function() {
return C;

View File

@ -1 +1,2 @@
//// [commonTypeIntersection.ts]
x1, x2;

View File

@ -1 +1,2 @@
//// [comparisonOperatorWithIntersectionType.ts]
a, b;

View File

@ -2,4 +2,4 @@
var E, a, b, c, x1, x2, x3;
!function(E) {
E[E.a = 0] = "a", E[E.b = 1] = "b", E[E.c = 2] = "c";
}(E || (E = {})), x1 = Math.pow(x1, a), x1 = Math.pow(x1, b), x1 = Math.pow(x1, c), x1 = Math.pow(x1, null), x1 = Math.pow(x1, void 0), x2 = Math.pow(x2, a), x2 = Math.pow(x2, b), x2 = Math.pow(x2, c), x2 = Math.pow(x2, null), x2 = Math.pow(x2, void 0), x3 = Math.pow(x3, a), x3 = Math.pow(x3, b), x3 = Math.pow(x3, c), x3 = Math.pow(x3, null), x3 = Math.pow(x3, void 0);
}(E || (E = {})), x1 = Math.pow(x1 = Math.pow(x1 = Math.pow(x1 = Math.pow(x1 = Math.pow(x1, a), b), c), null), void 0), x2 = Math.pow(x2 = Math.pow(x2 = Math.pow(x2 = Math.pow(x2 = Math.pow(x2, a), b), c), null), void 0), x3 = Math.pow(x3 = Math.pow(x3 = Math.pow(x3 = Math.pow(x3 = Math.pow(x3, a), b), c), null), void 0);

View File

@ -2,4 +2,4 @@
var E, a, b, x1, x2, x3, x4, x5, x6;
!function(E) {
E[E.a = 0] = "a", E[E.b = 1] = "b";
}(E || (E = {})), x1 = Math.pow(x1, a), x1 = Math.pow(x1, b), x1 = Math.pow(x1, !0), x1 = Math.pow(x1, 0), x1 = Math.pow(x1, ""), x1 = Math.pow(x1, E.a), x1 = Math.pow(x1, {}), x1 = Math.pow(x1, null), x1 = Math.pow(x1, void 0), x2 = Math.pow(x2, a), x2 = Math.pow(x2, b), x2 = Math.pow(x2, !0), x2 = Math.pow(x2, 0), x2 = Math.pow(x2, ""), x2 = Math.pow(x2, E.a), x2 = Math.pow(x2, {}), x2 = Math.pow(x2, null), x2 = Math.pow(x2, void 0), x3 = Math.pow(x3, a), x3 = Math.pow(x3, b), x3 = Math.pow(x3, !0), x3 = Math.pow(x3, 0), x3 = Math.pow(x3, ""), x3 = Math.pow(x3, E.a), x3 = Math.pow(x3, {}), x3 = Math.pow(x3, null), x3 = Math.pow(x3, void 0), x4 = Math.pow(x4, a), x4 = Math.pow(x4, b), x4 = Math.pow(x4, !0), x4 = Math.pow(x4, 0), x4 = Math.pow(x4, ""), x4 = Math.pow(x4, E.a), x4 = Math.pow(x4, {}), x4 = Math.pow(x4, null), x4 = Math.pow(x4, void 0), x5 = Math.pow(x5, b), x5 = Math.pow(x5, !0), x5 = Math.pow(x5, ""), x5 = Math.pow(x5, {}), x6 = Math.pow(x6, b), x6 = Math.pow(x6, !0), x6 = Math.pow(x6, ""), x6 = Math.pow(x6, {});
}(E || (E = {})), x1 = Math.pow(x1 = Math.pow(x1 = Math.pow(x1 = Math.pow(x1 = Math.pow(x1 = Math.pow(x1 = Math.pow(x1 = Math.pow(x1 = Math.pow(x1, a), b), !0), 0), ""), E.a), {}), null), void 0), x2 = Math.pow(x2 = Math.pow(x2 = Math.pow(x2 = Math.pow(x2 = Math.pow(x2 = Math.pow(x2 = Math.pow(x2 = Math.pow(x2 = Math.pow(x2, a), b), !0), 0), ""), E.a), {}), null), void 0), x3 = Math.pow(x3 = Math.pow(x3 = Math.pow(x3 = Math.pow(x3 = Math.pow(x3 = Math.pow(x3 = Math.pow(x3 = Math.pow(x3 = Math.pow(x3, a), b), !0), 0), ""), E.a), {}), null), void 0), x4 = Math.pow(x4 = Math.pow(x4 = Math.pow(x4 = Math.pow(x4 = Math.pow(x4 = Math.pow(x4 = Math.pow(x4 = Math.pow(x4 = Math.pow(x4, a), b), !0), 0), ""), E.a), {}), null), void 0), x5 = Math.pow(x5 = Math.pow(x5 = Math.pow(x5 = Math.pow(x5, b), !0), ""), {}), x6 = Math.pow(x6 = Math.pow(x6 = Math.pow(x6 = Math.pow(x6, b), !0), ""), {});

View File

@ -2,4 +2,4 @@
function ff2(x, y) {
return `${x}-${y}`;
}
id(1), ff2('foo', 'bar'), ff2('foo', '0'), ff2('top', 'left');
d, id(1), ff2('foo', 'bar'), ff2('foo', '0'), ff2('top', 'left');

View File

@ -1 +1,2 @@
//// [controlFlowForInStatement2.ts]
"a" in c && c, "a" in c && c, "b" in c && c, "b" in c && c;

View File

@ -1,2 +1,2 @@
//// [controlFlowInOperator.ts]
"a" in c && c.a, "a" in c && c.a;
"a" in c && (c, c.a), "d" in c && c, "a" in c && (c, c.a), "d" in c && c;

View File

@ -1,3 +1,3 @@
//// [controlFlowNullishCoalesce.ts]
var a;
null != o || (a = 1), a.toString();
null != o ? o : a = 1, a.toString(), null == o || o;

View File

@ -4,7 +4,7 @@ import _type_of from "@swc/helpers/src/_type_of.mjs";
function someFunction(someOptionalObject) {
(null == someOptionalObject ? void 0 : someOptionalObject.someProperty) !== lastSomeProperty && (console.log(someOptionalObject), console.log(someOptionalObject.someProperty), lastSomeProperty = null == someOptionalObject ? void 0 : someOptionalObject.someProperty);
}
null == o || o[a = 1], a.toString(), null == o || o.x[b = 1], b.toString(), null == o || o(c = 1), c.toString(), null == o || o.x(d = 1), d.toString(), null == f || f(x), f(x), f(x), (null == o2 ? void 0 : o2.f(x)) ? (o2.f, null == o2 || o2.f, null == o2 || o2.f(x)) : (null == o2 || o2.f, o2.f), null == o2 || o2.f, o2.f, (null == o3 ? void 0 : o3.x) === 1 ? (o3.x, null == o3 || o3.x) : (null == o3 || o3.x, o3.x), null == o3 || o3.x, o3.x, (null === (_o4_x = o4.x) || void 0 === _o4_x ? void 0 : _o4_x.y) ? (o4.x, o4.x.y, null === (_o4_x2 = o4.x) || void 0 === _o4_x2 || _o4_x2.y) : (o4.x, null === (_o4_x3 = o4.x) || void 0 === _o4_x3 || _o4_x3.y, o4.x.y), o4.x, null === (_o4_x1 = o4.x) || void 0 === _o4_x1 || _o4_x1.y, o4.x.y, (null === (_o5_x_y_z = null === (_o5_x = o5.x) || void 0 === _o5_x ? void 0 : _o5_x.y.z) || void 0 === _o5_x_y_z ? void 0 : _o5_x_y_z.w) ? (o5.x, o5.x.y, o5.x.y.z, o5.x.y.z.w, null === (_o5_x_y_z2 = o5.x.y.z) || void 0 === _o5_x_y_z2 || _o5_x_y_z2.w, null === (_o5_x4 = o5.x) || void 0 === _o5_x4 || _o5_x4.y.z.w, null === (_o5_x_y_z3 = null === (_o5_x5 = o5.x) || void 0 === _o5_x5 ? void 0 : _o5_x5.y.z) || void 0 === _o5_x_y_z3 || _o5_x_y_z3.w) : (o5.x, null === (_o5_x6 = o5.x) || void 0 === _o5_x6 || _o5_x6.y, null === (_o5_x7 = o5.x) || void 0 === _o5_x7 || _o5_x7.y.z, null === (_o5_x_y_z4 = null === (_o5_x8 = o5.x) || void 0 === _o5_x8 ? void 0 : _o5_x8.y.z) || void 0 === _o5_x_y_z4 || _o5_x_y_z4.w, o5.x.y, o5.x.y.z.w), o5.x, null === (_o5_x1 = o5.x) || void 0 === _o5_x1 || _o5_x1.y, null === (_o5_x2 = o5.x) || void 0 === _o5_x2 || _o5_x2.y.z, null === (_o5_x_y_z1 = null === (_o5_x3 = o5.x) || void 0 === _o5_x3 ? void 0 : _o5_x3.y.z) || void 0 === _o5_x_y_z1 || _o5_x_y_z1.w, o5.x.y, o5.x.y.z.w, (null == o6 ? void 0 : o6.f()) || null == o6 || o6.f, o6.f, null == o6 || o6.f, o6.f, someFunction({
null == o || o[a = 1], a.toString(), null == o || o.x[b = 1], b.toString(), null == o || o(c = 1), c.toString(), null == o || o.x(d = 1), d.toString(), null == f || f(x), x, f, f(x), x, f, f(x), (null == o2 ? void 0 : o2.f(x)) ? (x, o2.f, null == o2 || o2.f, null == o2 || o2.f(x)) : (x, o2, null == o2 || o2.f, o2.f), x, o2, null == o2 || o2.f, o2.f, (null == o3 ? void 0 : o3.x) === 1 ? (o3, o3.x, null == o3 || o3.x) : (o3, null == o3 || o3.x, o3.x), o3, null == o3 || o3.x, o3.x, (null === (_o4_x = o4.x) || void 0 === _o4_x ? void 0 : _o4_x.y) ? (o4.x, o4.x.y, null === (_o4_x2 = o4.x) || void 0 === _o4_x2 || _o4_x2.y) : (o4.x, null === (_o4_x3 = o4.x) || void 0 === _o4_x3 || _o4_x3.y, o4.x.y), o4.x, null === (_o4_x1 = o4.x) || void 0 === _o4_x1 || _o4_x1.y, o4.x.y, (null === (_o5_x_y_z = null === (_o5_x = o5.x) || void 0 === _o5_x ? void 0 : _o5_x.y.z) || void 0 === _o5_x_y_z ? void 0 : _o5_x_y_z.w) ? (o5.x, o5.x.y, o5.x.y.z, o5.x.y.z.w, null === (_o5_x_y_z2 = o5.x.y.z) || void 0 === _o5_x_y_z2 || _o5_x_y_z2.w, null === (_o5_x4 = o5.x) || void 0 === _o5_x4 || _o5_x4.y.z.w, null === (_o5_x_y_z3 = null === (_o5_x5 = o5.x) || void 0 === _o5_x5 ? void 0 : _o5_x5.y.z) || void 0 === _o5_x_y_z3 || _o5_x_y_z3.w) : (o5.x, null === (_o5_x6 = o5.x) || void 0 === _o5_x6 || _o5_x6.y, null === (_o5_x7 = o5.x) || void 0 === _o5_x7 || _o5_x7.y.z, null === (_o5_x_y_z4 = null === (_o5_x8 = o5.x) || void 0 === _o5_x8 ? void 0 : _o5_x8.y.z) || void 0 === _o5_x_y_z4 || _o5_x_y_z4.w, o5.x.y, o5.x.y.z.w), o5.x, null === (_o5_x1 = o5.x) || void 0 === _o5_x1 || _o5_x1.y, null === (_o5_x2 = o5.x) || void 0 === _o5_x2 || _o5_x2.y.z, null === (_o5_x_y_z1 = null === (_o5_x3 = o5.x) || void 0 === _o5_x3 ? void 0 : _o5_x3.y.z) || void 0 === _o5_x_y_z1 || _o5_x_y_z1.w, o5.x.y, o5.x.y.z.w, (null == o6 ? void 0 : o6.f()) ? (o6, o6.f) : (o6, null == o6 || o6.f, o6.f), o6, null == o6 || o6.f, o6.f, someFunction({
someProperty: 42
}), someFunction(void 0);
for(var _o4_x, _o4_x1, _o5_x_y_z, _o5_x, _o5_x1, _o5_x2, _o5_x_y_z1, _o5_x3, _arr_i, a, b, c, d, _o4_x2, _o4_x3, _o5_x_y_z2, _o5_x4, _o5_x_y_z3, _o5_x5, _o5_x6, _o5_x7, _o5_x_y_z4, _o5_x8, lastSomeProperty, _arr_i1, i = 0; (null === (_arr_i = arr[i]) || void 0 === _arr_i ? void 0 : _arr_i.tag) === "left";)i += 1, (null === (_arr_i1 = arr[i]) || void 0 === _arr_i1 ? void 0 : _arr_i1.tag) === "right" && console.log("I should ALSO be reachable");

View File

@ -4,12 +4,12 @@
"exports",
"@swc/helpers/src/_ts_decorate.mjs"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.aTs = {}, global.tsDecorateMjs);
}(this, function(exports, _tsDecorate) {
}(this, function(exports1, _tsDecorate) {
"use strict";
var decorator;
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "default", {
}), Object.defineProperty(exports1, "default", {
enumerable: !0,
get: ()=>Foo
}), _tsDecorate = _tsDecorate.default;
@ -25,12 +25,12 @@
"exports",
"@swc/helpers/src/_ts_decorate.mjs"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.bTs = {}, global.tsDecorateMjs);
}(this, function(exports, _tsDecorate) {
}(this, function(exports1, _tsDecorate) {
"use strict";
var decorator;
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "default", {
}), Object.defineProperty(exports1, "default", {
enumerable: !0,
get: ()=>_class
}), _tsDecorate = _tsDecorate.default;

View File

@ -3,11 +3,11 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.aTs = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "default", {
}), Object.defineProperty(exports1, "default", {
enumerable: !0,
get: ()=>_default
});
@ -23,9 +23,9 @@
"@swc/helpers/src/_interop_require_default.mjs",
"./a"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.bTs = {}, global.asyncToGeneratorMjs, global.interopRequireDefaultMjs, global.a);
}(this, function(exports, _asyncToGenerator, _interopRequireDefault, _a) {
}(this, function(exports1, _asyncToGenerator, _interopRequireDefault, _a) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), _asyncToGenerator = _asyncToGenerator.default, _a = (_interopRequireDefault = _interopRequireDefault.default)(_a), _asyncToGenerator(function*() {
yield _a.default;

View File

@ -3,11 +3,11 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.aTs = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "default", {
}), Object.defineProperty(exports1, "default", {
enumerable: !0,
get: ()=>Foo
});
@ -19,12 +19,12 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.bTs = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
function foo() {}
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "default", {
}), Object.defineProperty(exports1, "default", {
enumerable: !0,
get: ()=>foo
});

View File

@ -1,10 +1,10 @@
//// [destructuringArrayBindingPatternAndAssignment2.ts]
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
import _to_consumable_array from "@swc/helpers/src/_to_consumable_array.mjs";
var _ref_ = (_sliced_to_array([][0], 1)[0], _sliced_to_array([][1], 1));
_sliced_to_array(_ref_[0], 1)[0];
var _undefined = _sliced_to_array(void 0, 2), _undefined_ = (_sliced_to_array(_undefined[0], 1)[0], _sliced_to_array(_undefined[1], 1));
_sliced_to_array(_undefined_[0], 1)[0];
var _ref_1 = (_sliced_to_array([][0], 1)[0], _sliced_to_array([][1], 1));
_sliced_to_array(_ref_1[0], 1)[0];
var _undefined = _sliced_to_array(void 0, 2), _undefined_1 = (_sliced_to_array(_undefined[0], 1)[0], _sliced_to_array(_undefined[1], 1));
_sliced_to_array(_undefined_1[0], 1)[0];
var _bar = _sliced_to_array([
1,
2,

View File

@ -1,15 +1,15 @@
//// [destructuringArrayBindingPatternAndAssignment3.ts]
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
var tmp = [
var tmp2 = [
1
][2], e = void 0 === tmp ? e : tmp;
][2], e = void 0 === tmp2 ? e : tmp2;
!function(param) {
var _param = _sliced_to_array(param, 2);
_param[0], _param[1];
}([
1
]), function(param) {
var _param = _sliced_to_array(param, 3), tmp = (_param[0], _param[1], _param[2]), e = void 0 === tmp ? e : tmp;
var _param = _sliced_to_array(param, 3), tmp1 = (_param[0], _param[1], _param[2]), e = void 0 === tmp1 ? e : tmp1;
}([
1
]), function(param) {

View File

@ -10,13 +10,13 @@ var trace = [], order = function(n) {
(void 0 === tmp ? order(0) : tmp)[order(1)];
var tmp1 = {};
(void 0 === tmp1 ? order(0) : tmp1)[order(1)];
var _ref = {}, _order = order(0), _order1 = order(2), tmp2 = _ref[_order];
(void 0 === tmp2 ? order(1) : tmp2)[_order1], _object_without_properties(_ref, [
var _ref3 = {}, _order = order(0), _order1 = order(2), tmp2 = _ref3[_order];
(void 0 === tmp2 ? order(1) : tmp2)[_order1], _object_without_properties(_ref3, [
_order
].map(_to_property_key));
var _ref1 = [
var _ref5 = [
{
x: 1
}
], _ref2 = _sliced_to_array(_ref1, 2);
_object_destructuring_empty(_ref2[0]), _ref2[1], _extends({}, _object_destructuring_empty(_ref1[0]));
], _ref6 = _sliced_to_array(_ref5, 2);
_object_destructuring_empty(_ref6[0]), _ref6[1], _extends({}, _object_destructuring_empty(_ref5[0]));

View File

@ -1,5 +1,5 @@
//// [destructuringObjectAssignmentPatternWithNestedSpread.ts]
var _c, ref, d;
var _c, ref1, d;
import _object_without_properties from "@swc/helpers/src/_object_without_properties.mjs";
_object_without_properties((_c = {
x: {
@ -8,4 +8,4 @@ _object_without_properties((_c = {
}
}).x, [
"a"
]), (void 0 === (ref = _c.x) ? d : ref).a;
]), (void 0 === (ref1 = _c.x) ? d : ref1).a;

View File

@ -12,12 +12,12 @@ var tmp = {
(void 0 === tmp ? {
b11: "string"
} : tmp).b11;
var _ref1 = [
var _ref2 = [
void 0,
void 0,
void 0
];
_ref1[0], _ref1[1], _ref1[2];
_ref2[0], _ref2[1], _ref2[2];
var _concat = _sliced_to_array([
1,
"string"

View File

@ -12,12 +12,12 @@ var tmp = {
(void 0 === tmp ? {
b11: "string"
} : tmp).b11;
var _ref1 = [
var _ref2 = [
void 0,
void 0,
void 0
];
_ref1[0], _ref1[1], _ref1[2];
_ref2[0], _ref2[1], _ref2[2];
var _concat = _sliced_to_array([
1,
"string"

View File

@ -1 +1,2 @@
//// [emitArrowFunctionWhenUsingArguments01.ts]
arguments;

View File

@ -1 +1,2 @@
//// [emitArrowFunctionWhenUsingArguments02.ts]
arguments;

View File

@ -1,3 +1,3 @@
//// [emitCompoundExponentiationOperator1.ts]
var comp;
comp = Math.pow(comp, 1), comp = Math.pow(comp, Math.pow(comp, comp)), comp = Math.pow(comp, Math.pow(comp, Math.pow(comp, 2))), comp = Math.pow(comp, Math.pow(comp, comp) + 2), comp = Math.pow(comp, Math.pow(comp, comp) - 2), comp = Math.pow(comp, 2 * Math.pow(comp, comp)), comp = Math.pow(comp, Math.pow(comp, comp) / 2), comp = Math.pow(comp, Math.pow(comp, comp) % 2), comp = Math.pow(comp, Math.pow(comp - 2, 5)), comp = Math.pow(comp, Math.pow(comp + 2, 5)), comp = Math.pow(comp, Math.pow(2 * comp, 5)), comp = Math.pow(comp, Math.pow(comp / 2, 5)), comp = Math.pow(comp, Math.pow(comp % 2, 5)), comp = Math.pow(comp, Math.pow(comp, 7)), comp = Math.pow(comp, Math.pow(comp, 3)), comp = Math.pow(comp, Math.pow(comp, 10)), comp = Math.pow(comp, Math.pow(comp, 2.5)), comp = Math.pow(comp, Math.pow(comp, 1));
comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp, 1), Math.pow(comp, comp)), Math.pow(comp, Math.pow(comp, 2))), Math.pow(comp, comp) + 2), Math.pow(comp, comp) - 2), 2 * Math.pow(comp, comp)), Math.pow(comp, comp) / 2), Math.pow(comp, comp) % 2), Math.pow(comp - 2, 5)), Math.pow(comp + 2, 5)), Math.pow(2 * comp, 5)), Math.pow(comp / 2, 5)), Math.pow(comp % 2, 5)), Math.pow(comp, 7)), Math.pow(comp, 3)), Math.pow(comp, 10)), Math.pow(comp, 2.5)), Math.pow(comp, 1));

View File

@ -1,3 +1,3 @@
//// [emitCompoundExponentiationOperator2.ts]
var comp;
comp = Math.pow(comp, 1), comp = Math.pow(comp, comp = Math.pow(comp, 1)), comp = Math.pow(comp, comp = Math.pow(comp, 3)), comp = Math.pow(comp, comp = Math.pow(comp, -1)), comp = Math.pow(comp, comp = Math.pow(comp, 2)), comp = Math.pow(comp, comp = Math.pow(comp, 0.5)), comp = Math.pow(comp, comp = Math.pow(comp, 3)), comp = Math.pow(comp, comp = Math.pow(comp, -1)), comp = Math.pow(comp, comp = Math.pow(comp, 2)), comp = Math.pow(comp, comp = Math.pow(comp, 0.5)), comp = Math.pow(comp, comp = Math.pow(comp, 9)), comp = Math.pow(comp, comp = Math.pow(comp, -15)), comp = Math.pow(comp, comp = Math.pow(comp, 32)), comp = Math.pow(comp, comp = Math.pow(comp, 0.015625)), comp = Math.pow(comp, comp = Math.pow(comp, 27)), comp = Math.pow(comp, comp = Math.pow(comp, 1)), comp = Math.pow(comp, comp = Math.pow(comp, 32)), comp = Math.pow(comp, comp = Math.pow(comp, 0.015625));
comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp = Math.pow(comp, 1), comp = Math.pow(comp, 1)), comp = Math.pow(comp, 3)), comp = Math.pow(comp, -1)), comp = Math.pow(comp, 2)), comp = Math.pow(comp, 0.5)), comp = Math.pow(comp, 3)), comp = Math.pow(comp, -1)), comp = Math.pow(comp, 2)), comp = Math.pow(comp, 0.5)), comp = Math.pow(comp, 9)), comp = Math.pow(comp, -15)), comp = Math.pow(comp, 32)), comp = Math.pow(comp, 0.015625)), comp = Math.pow(comp, 27)), comp = Math.pow(comp, 1)), comp = Math.pow(comp, 32)), comp = Math.pow(comp, 0.015625));

View File

@ -1,4 +1,4 @@
//// [emitExponentiationOperatorInTempalteString4.ts]
import _type_of from "@swc/helpers/src/_type_of.mjs";
var t1 = 10;
++t1, t1++, --t1, _type_of(Math.pow(t1, Math.pow(10, t1))), "".concat(Math.pow(t1, -10), " hello world ").concat(Math.pow(t1, -10)), "".concat(Math.pow(-t1, 10) - t1, " hello world ").concat(Math.pow(-t1, 10) - t1), "".concat(Math.pow(-++t1, 10) - t1, " hello world ").concat(Math.pow(t1, Math.pow(-++t1, -t1))), "".concat(Math.pow(-t1++, 10) - t1, " hello world ").concat(Math.pow(10, Math.pow(-t1++, -t1))), "".concat(Math.pow(~t1, Math.pow(10, --t1)), " hello world ").concat(Math.pow(~t1, Math.pow(10, --t1))), "".concat(_type_of(Math.pow(t1, Math.pow(10, t1))), " hello world ").concat(_type_of(Math.pow(t1, Math.pow(10, t1)))), ++t1, t1++, --t1, _type_of(Math.pow(t1, Math.pow(10, t1)));
++t1, t1++, _type_of(Math.pow(--t1, Math.pow(10, t1))), "".concat(Math.pow(t1, -10), " hello world ").concat(Math.pow(t1, -10)), "".concat(Math.pow(-t1, 10) - t1, " hello world ").concat(Math.pow(-t1, 10) - t1), "".concat(Math.pow(-++t1, 10) - t1, " hello world ").concat(Math.pow(t1, Math.pow(-++t1, -t1))), "".concat(Math.pow(-t1++, 10) - t1, " hello world ").concat(Math.pow(10, Math.pow(-t1++, -t1))), "".concat(Math.pow(~t1, Math.pow(10, --t1)), " hello world ").concat(Math.pow(~t1, Math.pow(10, --t1))), "".concat(_type_of(Math.pow(t1, Math.pow(10, t1))), " hello world ").concat(_type_of(Math.pow(t1, Math.pow(10, t1)))), ++t1, t1++, _type_of(Math.pow(--t1, Math.pow(10, t1)));

View File

@ -1,5 +1,5 @@
//// [emptyAssignmentPatterns02_ES5.ts]
var a, ref;
var a, ref1;
import _object_destructuring_empty from "@swc/helpers/src/_object_destructuring_empty.mjs";
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
_object_destructuring_empty((a.x, a.y, a.z, a)), _sliced_to_array(((ref = _sliced_to_array(a, 3))[0], ref[1], ref[2], ref), 0);
_object_destructuring_empty((a.x, a.y, a.z, a)), _sliced_to_array(((ref1 = _sliced_to_array(a, 3))[0], ref1[1], ref1[2], ref1), 0);

View File

@ -1,5 +1,5 @@
//// [emptyAssignmentPatterns02_ES5iterable.ts]
var a, ref;
var a, ref1;
import _object_destructuring_empty from "@swc/helpers/src/_object_destructuring_empty.mjs";
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
_object_destructuring_empty((a.x, a.y, a.z, a)), _sliced_to_array(((ref = _sliced_to_array(a, 3))[0], ref[1], ref[2], ref), 0);
_object_destructuring_empty((a.x, a.y, a.z, a)), _sliced_to_array(((ref1 = _sliced_to_array(a, 3))[0], ref1[1], ref1[2], ref1), 0);

View File

@ -1,5 +1,5 @@
//// [emptyAssignmentPatterns04_ES5.ts]
var a, ref, ref1;
var a, ref, ref2;
import _object_destructuring_empty from "@swc/helpers/src/_object_destructuring_empty.mjs";
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
(ref = _object_destructuring_empty(a)).x, ref.y, ref.z, (ref1 = _sliced_to_array(_sliced_to_array(a, 0), 3))[0], ref1[1], ref1[2];
(ref = _object_destructuring_empty(a)).x, ref.y, ref.z, (ref2 = _sliced_to_array(_sliced_to_array(a, 0), 3))[0], ref2[1], ref2[2];

View File

@ -1,5 +1,5 @@
//// [emptyAssignmentPatterns04_ES5iterable.ts]
var a, ref, ref1;
var a, ref, ref2;
import _object_destructuring_empty from "@swc/helpers/src/_object_destructuring_empty.mjs";
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
(ref = _object_destructuring_empty(a)).x, ref.y, ref.z, (ref1 = _sliced_to_array(_sliced_to_array(a, 0), 3))[0], ref1[1], ref1[2];
(ref = _object_destructuring_empty(a)).x, ref.y, ref.z, (ref2 = _sliced_to_array(_sliced_to_array(a, 0), 3))[0], ref2[1], ref2[2];

View File

@ -4,9 +4,7 @@ var E01, E02, E03, E04, E05, E06, E07, E08, E10, E11, E12, E20;
E01[E01.A = 0] = "A";
}(E01 || (E01 = {})), function(E02) {
E02[E02.A = 123] = "A";
}(E02 || (E02 = {})), function(E03) {
E03.A = "hello";
}(E03 || (E03 = {})), function(E04) {
}(E02 || (E02 = {})), (E03 || (E03 = {})).A = "hello", function(E04) {
E04[E04.A = 0] = "A", E04[E04.B = 1] = "B", E04[E04.C = 2] = "C";
}(E04 || (E04 = {})), function(E05) {
E05[E05.A = 0] = "A", E05[E05.B = 10] = "B", E05[E05.C = 11] = "C";

View File

@ -6,10 +6,6 @@ var T1, T2, T3, T4, T5, T6;
T2.a = "1", T2.b = "12";
}(T2 || (T2 = {})), function(T3) {
T3.a = "1", T3.b = "12", T3[T3.c = 1] = "c", T3[T3.d = 3] = "d";
}(T3 || (T3 = {})), function(T4) {
T4.a = "1";
}(T4 || (T4 = {})), function(T5) {
T5.a = "12";
}(T5 || (T5 = {})), function(T6) {
}(T3 || (T3 = {})), (T4 || (T4 = {})).a = "1", (T5 || (T5 = {})).a = "12", function(T6) {
T6.a = "1", T6.b = "12";
}(T6 || (T6 = {}));

View File

@ -6,10 +6,6 @@ var T1, T2, T3, T4, T5, T6;
T2.a = "1", T2.b = "12";
}(T2 || (T2 = {})), function(T3) {
T3.a = "1", T3.b = "12";
}(T3 || (T3 = {})), function(T4) {
T4.a = "1";
}(T4 || (T4 = {})), function(T5) {
T5.a = "12";
}(T5 || (T5 = {})), function(T6) {
}(T3 || (T3 = {})), (T4 || (T4 = {})).a = "1", (T5 || (T5 = {})).a = "12", function(T6) {
T6.a = "1", T6.b = "12";
}(T6 || (T6 = {}));

View File

@ -1,12 +1,8 @@
//// [enumConstantMemberWithTemplateLiterals.ts]
var T1, T2, T3, T4, T5, T6, T7;
!function(T1) {
T1.a = "1";
}(T1 || (T1 = {})), function(T2) {
(T1 || (T1 = {})).a = "1", function(T2) {
T2.a = "1", T2.b = "2", T2[T2.c = 3] = "c";
}(T2 || (T2 = {})), function(T3) {
T3.a = "11";
}(T3 || (T3 = {})), function(T4) {
}(T2 || (T2 = {})), (T3 || (T3 = {})).a = "11", function(T4) {
T4.a = "1", T4.b = "11", T4.c = "12", T4.d = "21", T4.e = "211";
}(T4 || (T4 = {})), function(T5) {
T5.a = "1", T5.b = "12", T5.c = "123", T5[T5.d = 1] = "d", T5[T5.e = "1" - "1"] = "e", T5.f = "11", T5[T5.g = "123"] = "g", T5[T5.h = 1] = "h";

View File

@ -1,12 +1,8 @@
//// [enumConstantMemberWithTemplateLiteralsEmitDeclaration.ts]
var T1, T2, T3, T4, T5, T6, T7;
!function(T1) {
T1.a = "1";
}(T1 || (T1 = {})), function(T2) {
(T1 || (T1 = {})).a = "1", function(T2) {
T2.a = "1", T2.b = "2", T2[T2.c = 3] = "c";
}(T2 || (T2 = {})), function(T3) {
T3.a = "11";
}(T3 || (T3 = {})), function(T4) {
}(T2 || (T2 = {})), (T3 || (T3 = {})).a = "11", function(T4) {
T4.a = "1", T4.b = "11", T4.c = "12", T4.d = "21", T4.e = "211";
}(T4 || (T4 = {})), function(T5) {
T5.a = "1", T5.b = "12", T5.c = "123", T5[T5.d = 1] = "d";

View File

@ -1,3 +1 @@
//// [exponentiationOperatorWithTemplateStringInvalid.ts]
var k = 10;
k = Math.pow(k, "".concat(3)), k = Math.pow(k, "2".concat(3)), k = Math.pow(k, "2".concat(3, "4")), k = Math.pow(k, "2".concat(3, "4"));

View File

@ -1,3 +1,2 @@
//// [exponentiationOperatorWithTemplateStringInvalidES6.ts]
var k = 10;
k = Math.pow(k, "3"), k = Math.pow(k, "23"), k = Math.pow(k, "234"), kj = Math.pow(kj, "234");
kj = Math.pow(kj, "234");

View File

@ -3,16 +3,16 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.0Ts = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), function(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: !0,
get: all[name]
});
}(exports, {
}(exports1, {
a: function() {
return a;
},
@ -29,11 +29,11 @@
"@swc/helpers/src/_interop_require_wildcard.mjs",
"./0"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.1Ts = {}, global.interopRequireWildcardMjs, global["0"]);
}(this, function(exports, _interopRequireWildcard, _0) {
}(this, function(exports1, _interopRequireWildcard, _0) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "ns", {
}), Object.defineProperty(exports1, "ns", {
enumerable: !0,
get: function() {
return _0;
@ -47,9 +47,9 @@
"@swc/helpers/src/_interop_require_wildcard.mjs",
"./1"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.2Ts = {}, global.interopRequireWildcardMjs, global["1"]);
}(this, function(exports, _interopRequireWildcard, _1) {
}(this, function(exports1, _interopRequireWildcard, _1) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), (_1 = (_interopRequireWildcard = _interopRequireWildcard.default)(_1)).ns.a, _1.ns.b;
});

View File

@ -3,16 +3,16 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.0Ts = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), function(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: !0,
get: all[name]
});
}(exports, {
}(exports1, {
a: function() {
return a;
},
@ -29,11 +29,11 @@
"@swc/helpers/src/_interop_require_wildcard.mjs",
"./0"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.1Ts = {}, global.interopRequireWildcardMjs, global["0"]);
}(this, function(exports, _interopRequireWildcard, _0) {
}(this, function(exports1, _interopRequireWildcard, _0) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "ns", {
}), Object.defineProperty(exports1, "ns", {
enumerable: !0,
get: function() {
return _0;
@ -47,9 +47,9 @@
"@swc/helpers/src/_interop_require_wildcard.mjs",
"./1"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.2Ts = {}, global.interopRequireWildcardMjs, global["1"]);
}(this, function(exports, _interopRequireWildcard, _1) {
}(this, function(exports1, _interopRequireWildcard, _1) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), (_1 = (_interopRequireWildcard = _interopRequireWildcard.default)(_1)).ns.a, _1.ns.b;
});

View File

@ -3,16 +3,16 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.0Ts = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), function(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: !0,
get: all[name]
});
}(exports, {
}(exports1, {
a: function() {
return a;
},
@ -29,11 +29,11 @@
"@swc/helpers/src/_interop_require_wildcard.mjs",
"./0"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.1Ts = {}, global.interopRequireWildcardMjs, global["0"]);
}(this, function(exports, _interopRequireWildcard, _0) {
}(this, function(exports1, _interopRequireWildcard, _0) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "ns", {
}), Object.defineProperty(exports1, "ns", {
enumerable: !0,
get: function() {
return _0;
@ -52,9 +52,9 @@
"@swc/helpers/src/_interop_require_wildcard.mjs",
"./1"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.2Ts = {}, global.interopRequireWildcardMjs, global["1"]);
}(this, function(exports, _interopRequireWildcard, _1) {
}(this, function(exports1, _interopRequireWildcard, _1) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), (_1 = (_interopRequireWildcard = _interopRequireWildcard.default)(_1)).ns.a, _1.ns.b;
});

View File

@ -3,16 +3,16 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.0Ts = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), function(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: !0,
get: all[name]
});
}(exports, {
}(exports1, {
a: function() {
return a;
},
@ -29,11 +29,11 @@
"@swc/helpers/src/_interop_require_wildcard.mjs",
"./0"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.1Ts = {}, global.interopRequireWildcardMjs, global["0"]);
}(this, function(exports, _interopRequireWildcard, _0) {
}(this, function(exports1, _interopRequireWildcard, _0) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "default", {
}), Object.defineProperty(exports1, "default", {
enumerable: !0,
get: function() {
return _0;
@ -47,11 +47,11 @@
"@swc/helpers/src/_interop_require_wildcard.mjs",
"./0"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.11Ts = {}, global.interopRequireWildcardMjs, global["0"]);
}(this, function(exports, _interopRequireWildcard, _0) {
}(this, function(exports1, _interopRequireWildcard, _0) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "default", {
}), Object.defineProperty(exports1, "default", {
enumerable: !0,
get: function() {
return _default;
@ -67,9 +67,9 @@
"./1",
"./11"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.2Ts = {}, global.interopRequireDefaultMjs, global["1"], global["11"]);
}(this, function(exports, _interopRequireDefault, _1, _11) {
}(this, function(exports1, _interopRequireDefault, _1, _11) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), _1 = (_interopRequireDefault = _interopRequireDefault.default)(_1), _11 = _interopRequireDefault(_11), _1.default.a, _11.default.a, _1.default.b, _11.default.b;
});

View File

@ -4,11 +4,11 @@
"exports",
"@swc/helpers/src/_class_call_check.mjs"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.exportClassNameWithObjectUMDTs = {}, global.classCallCheckMjs);
}(this, function(exports, _classCallCheck) {
}(this, function(exports1, _classCallCheck) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "Object", {
}), Object.defineProperty(exports1, "Object", {
enumerable: !0,
get: function() {
return Object;

View File

@ -1,2 +1,2 @@
//// [for-of53.ts]
for (let v of []);
for (let v1 of []);

View File

@ -1,2 +1,2 @@
//// [for-of54.ts]
for (let v of []);
for (let v1 of []);

View File

@ -1,5 +1,5 @@
//// [genericContextualTypes1.ts]
wrap(list), wrap(function(x) {
list, wrap(list), wrap(function(x) {
return [
x
];

View File

@ -3,14 +3,14 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.0Ts = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
function foo() {
return "foo";
}
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "foo", {
}), Object.defineProperty(exports1, "foo", {
enumerable: !0,
get: function() {
return foo;
@ -24,16 +24,16 @@
"@swc/helpers/src/_class_call_check.mjs",
"@swc/helpers/src/_interop_require_wildcard.mjs"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.1Ts = {}, global.classCallCheckMjs, global.interopRequireWildcardMjs);
}(this, function(exports, _classCallCheck, _interopRequireWildcard) {
}(this, function(exports1, _classCallCheck, _interopRequireWildcard) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), function(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: !0,
get: all[name]
});
}(exports, {
}(exports1, {
p2: function() {
return p2;
},

View File

@ -3,14 +3,14 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.0Ts = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
function foo() {
return "foo";
}
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "foo", {
}), Object.defineProperty(exports1, "foo", {
enumerable: !0,
get: ()=>foo
});
@ -21,16 +21,16 @@
"exports",
"@swc/helpers/src/_interop_require_wildcard.mjs"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.1Ts = {}, global.interopRequireWildcardMjs);
}(this, function(exports, _interopRequireWildcard) {
}(this, function(exports1, _interopRequireWildcard) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), function(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: !0,
get: all[name]
});
}(exports, {
}(exports1, {
p2: ()=>p2,
D: ()=>D
}), _interopRequireWildcard = _interopRequireWildcard.default, import("./0"), import("./0").then((zero)=>zero.foo());

View File

@ -67,11 +67,9 @@ define([
], (m)=>resolve(_interopRequireWildcard(m)), reject)), this.myModule.then((Zero)=>{
console.log(Zero.foo());
}, async (err)=>{
console.log(err);
let one = await new Promise((resolve, reject)=>require([
console.log(err), console.log((await new Promise((resolve, reject)=>require([
"./1"
], (m)=>resolve(_interopRequireWildcard(m)), reject));
console.log(one.backup());
], (m)=>resolve(_interopRequireWildcard(m)), reject))).backup());
});
}
}

View File

@ -47,9 +47,7 @@ class D {
Promise.resolve().then(()=>_interopRequireWildcard(require("./0"))), this.myModule.then((Zero)=>{
console.log(Zero.foo());
}, async (err)=>{
console.log(err);
let one = await Promise.resolve().then(()=>_interopRequireWildcard(require("./1")));
console.log(one.backup());
console.log(err), console.log((await Promise.resolve().then(()=>_interopRequireWildcard(require("./1")))).backup());
});
}
}

View File

@ -43,9 +43,7 @@ System.register([], function(_export, _context) {
_context.import("./0"), this.myModule.then((Zero)=>{
console.log(Zero.foo());
}, async (err)=>{
console.log(err);
let one = await import("./1");
console.log(one.backup());
console.log(err), console.log((await import("./1")).backup());
});
}
});

View File

@ -3,14 +3,14 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.0Ts = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
function foo() {
return "foo";
}
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "foo", {
}), Object.defineProperty(exports1, "foo", {
enumerable: !0,
get: ()=>foo
});
@ -21,11 +21,11 @@
"exports",
"@swc/helpers/src/_interop_require_wildcard.mjs"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.1Ts = {}, global.interopRequireWildcardMjs);
}(this, function(exports, _interopRequireWildcard) {
}(this, function(exports1, _interopRequireWildcard) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "p2", {
}), Object.defineProperty(exports1, "p2", {
enumerable: !0,
get: ()=>p2
}), _interopRequireWildcard = _interopRequireWildcard.default, import("./0"), import("./0").then((zero)=>zero.foo());

View File

@ -3,11 +3,11 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.0Ts = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "B", {
}), Object.defineProperty(exports1, "B", {
enumerable: !0,
get: ()=>B
});
@ -23,9 +23,9 @@
"exports",
"@swc/helpers/src/_interop_require_wildcard.mjs"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.2Ts = {}, global.interopRequireWildcardMjs);
}(this, function(exports, _interopRequireWildcard) {
}(this, function(exports1, _interopRequireWildcard) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), _interopRequireWildcard = _interopRequireWildcard.default, function(x) {
x.then((value)=>{

View File

@ -3,11 +3,11 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.0Ts = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "B", {
}), Object.defineProperty(exports1, "B", {
enumerable: !0,
get: ()=>B
});
@ -23,9 +23,9 @@
"exports",
"@swc/helpers/src/_interop_require_wildcard.mjs"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.2Ts = {}, global.interopRequireWildcardMjs);
}(this, function(exports, _interopRequireWildcard) {
}(this, function(exports1, _interopRequireWildcard) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), _interopRequireWildcard = _interopRequireWildcard.default, async function() {
class C extends (await import("./0")).B {

View File

@ -3,16 +3,16 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.0Ts = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), function(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: !0,
get: all[name]
});
}(exports, {
}(exports1, {
B: ()=>B,
foo: ()=>foo
});
@ -30,14 +30,14 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.1Ts = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
function backup() {
return "backup";
}
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "backup", {
}), Object.defineProperty(exports1, "backup", {
enumerable: !0,
get: ()=>backup
});
@ -48,11 +48,11 @@
"exports",
"@swc/helpers/src/_interop_require_wildcard.mjs"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.2Ts = {}, global.interopRequireWildcardMjs);
}(this, function(exports, _interopRequireWildcard) {
}(this, function(exports1, _interopRequireWildcard) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "D", {
}), Object.defineProperty(exports1, "D", {
enumerable: !0,
get: ()=>D
}), _interopRequireWildcard = _interopRequireWildcard.default;
@ -62,9 +62,7 @@
import("./0"), this.myModule.then((Zero)=>{
console.log(Zero.foo());
}, async (err)=>{
console.log(err);
let one = await import("./1");
console.log(one.backup());
console.log(err), console.log((await import("./1")).backup());
});
}
}

View File

@ -3,14 +3,14 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.0Ts = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
function foo() {
return "foo";
}
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "foo", {
}), Object.defineProperty(exports1, "foo", {
enumerable: !0,
get: ()=>foo
});
@ -22,9 +22,9 @@
"@swc/helpers/src/_async_to_generator.mjs",
"@swc/helpers/src/_interop_require_wildcard.mjs"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.1Ts = {}, global.asyncToGeneratorMjs, global.interopRequireWildcardMjs);
}(this, function(exports, _asyncToGenerator, _interopRequireWildcard) {
}(this, function(exports1, _asyncToGenerator, _interopRequireWildcard) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), _asyncToGenerator = _asyncToGenerator.default, _interopRequireWildcard = _interopRequireWildcard.default;
});

View File

@ -3,11 +3,11 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.fooTs = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "default", {
}), Object.defineProperty(exports1, "default", {
enumerable: !0,
get: ()=>_default
});
@ -20,9 +20,9 @@
"@swc/helpers/src/_async_to_generator.mjs",
"@swc/helpers/src/_interop_require_wildcard.mjs"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.indexTs = {}, global.asyncToGeneratorMjs, global.interopRequireWildcardMjs);
}(this, function(exports, _asyncToGenerator, _interopRequireWildcard) {
}(this, function(exports1, _asyncToGenerator, _interopRequireWildcard) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), _asyncToGenerator = _asyncToGenerator.default, _interopRequireWildcard = _interopRequireWildcard.default;
});

View File

@ -3,11 +3,11 @@
"object" == typeof module && "object" == typeof module.exports ? factory(exports) : "function" == typeof define && define.amd ? define([
"exports"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.fooTs = {});
}(this, function(exports) {
}(this, function(exports1) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), Object.defineProperty(exports, "default", {
}), Object.defineProperty(exports1, "default", {
enumerable: !0,
get: function() {
return _default;
@ -23,9 +23,9 @@
"@swc/helpers/src/_interop_require_wildcard.mjs",
"@swc/helpers/src/_ts_generator.mjs"
], factory) : (global = "undefined" != typeof globalThis ? globalThis : global || self) && factory(global.indexTs = {}, global.asyncToGeneratorMjs, global.interopRequireWildcardMjs, global.tsGeneratorMjs);
}(this, function(exports, _asyncToGenerator, _interopRequireWildcard, _tsGenerator) {
}(this, function(exports1, _asyncToGenerator, _interopRequireWildcard, _tsGenerator) {
"use strict";
Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports1, "__esModule", {
value: !0
}), _asyncToGenerator = _asyncToGenerator.default, _interopRequireWildcard = _interopRequireWildcard.default, _tsGenerator = _tsGenerator.default;
});

View File

@ -6,5 +6,5 @@ var A = function A() {
};
export { A as default };
//// [/b.ts]
new A();
new A(), A;
export { };

View File

@ -1 +1,2 @@
//// [independentPropertyVariance.ts]
x, y;

View File

@ -3,7 +3,7 @@ import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
f1(), _sliced_to_array(f2(), 1)[0], f3().x, _sliced_to_array([
42
], 1)[0], _sliced_to_array(selectJohn(), 1)[0];
var _selectJohn = _sliced_to_array(selectJohn(), 2);
_selectJohn[0], _selectJohn[1];
var _selectJohn1 = _sliced_to_array(selectJohn(), 2);
_selectJohn1[0], _selectJohn1[1];
var _john = _sliced_to_array(selectJohn(), 2);
_john[0], _john[1], makeTuple(stringy()), _sliced_to_array(makeTuple(stringy()), 1)[0];

View File

@ -1,3 +1,10 @@
//// [intersectionReduction.ts]
var Tag1, Tag2;
ab.kind, f10(a1), f10(a2), Tag1 || (Tag1 = {}), Tag2 || (Tag2 = {}), s2 = s1 = s2, t2 = t1 = t2;
ab.kind, x, f10(a1), f10(a2);
var Tag1, Tag2, x2 = {
a: "foo",
b: !0
};
({
a: "foo",
b: 42
})[k] = "bar", x2[k] = "bar", Tag1 || (Tag1 = {}), Tag2 || (Tag2 = {}), s2 = s1 = s2, t2 = t1 = t2, shouldBeB;

View File

@ -1,3 +1,10 @@
//// [intersectionReductionStrict.ts]
var Tag1, Tag2;
ab.kind, Tag1 || (Tag1 = {}), Tag2 || (Tag2 = {}), s2 = s1 = s2, t2 = t1 = t2;
ab.kind, x;
var Tag1, Tag2, x2 = {
a: "foo",
b: !0
};
({
a: "foo",
b: 42
})[k] = "bar", x2[k] = "bar", Tag1 || (Tag1 = {}), Tag2 || (Tag2 = {}), s2 = s1 = s2, t2 = t1 = t2;

View File

@ -1,2 +1,2 @@
//// [intersectionWithIndexSignatures.ts]
ta1 = sa1, ta1 = sa2, ta2 = sa1, ta2 = sa2, tb1 = sb1, q.asd.a.substr(1), q.asd.b, tt = ss;
ta1 = sa1, ta1 = sa2, ta2 = sa1, ta2 = sa2, tb1 = sb1, q.asd.a.substr(1), q.asd.b, q, tt = ss;

View File

@ -1,28 +1,28 @@
//// [jsxReactTestSuite.tsx]
import _extends from "@swc/helpers/src/_extends.mjs";
this.props.children, this.props.children;
this.props.children, Component, foo, bar, Composite, this.props.children, Composite, Composite2;
var x = React.createElement("div", {
attr1: "foobar",
attr2: "foobarbazbug",
attr3: "foobarbazbug",
attr4: "baz"
});
Namespace.Component, Namespace.DeepNamespace.Component, _extends({}, x, {
Component, Namespace.Component, Namespace.DeepNamespace.Component, Component, _extends({}, x, {
y: 2,
z: !0
}), _extends({}, this.props, {
}), Component, _extends({}, this.props, {
sound: "moo"
}), _extends({}, x), _extends({}, x, {
}), Component, y, Component, _extends({}, x), Component, _extends({}, x, {
y: 2
}), _extends({}, x, {
}), Component, _extends({}, x, {
y: 2,
z: !0
}), _extends({
}), Component, _extends({
x: 1
}, y), _extends({
}, y), Component, _extends({
x: 1,
y: "2"
}, z, z), _extends({
}, z, z), Child, Component, _extends({
x: "1"
}, z = {
y: 2

View File

@ -1,2 +1,2 @@
//// [logicalAssignment1.ts]
a && (a = "foo"), b || (b = "foo"), null != c || (c = "foo"), d && (d = 42), e || (e = 42), null != f || (f = 42), g && (g = 42), h || (h = 42), null != i || (i = 42);
a && (a = "foo"), b || (b = "foo"), null != c ? c : c = "foo", d && (d = 42), e || (e = 42), null != f ? f : f = 42, g && (g = 42), h || (h = 42), null != i ? i : i = 42;

View File

@ -1,3 +1,3 @@
//// [logicalAssignment2.ts]
var _a, _b, _c, _a_foo, _b_foo, _c_foo, _a_foo_bar, _b_foo_bar, _c_foo_bar, _baz, _, _baz1;
(_a = a).baz && (_a.baz = result.baz), (_b = b).baz || (_b.baz = result.baz), null !== (_baz = (_c = c).baz) && void 0 !== _baz || (_c.baz = result.baz), (_a_foo = a.foo).baz && (_a_foo.baz = result.foo.baz), (_b_foo = b.foo).baz || (_b_foo.baz = result.foo.baz), null !== (_ = (_c_foo = c.foo).baz) && void 0 !== _ || (_c_foo.baz = result.foo.baz), (_a_foo_bar = a.foo.bar()).baz && (_a_foo_bar.baz = result.foo.bar().baz), (_b_foo_bar = b.foo.bar()).baz || (_b_foo_bar.baz = result.foo.bar().baz), null !== (_baz1 = (_c_foo_bar = c.foo.bar()).baz) && void 0 !== _baz1 || (_c_foo_bar.baz = result.foo.bar().baz);
var _a, _b, _c, _a_foo, _b_foo, _c_foo, _a_foo_bar, _b_foo_bar, _c_foo_bar, _baz3, _, _baz4;
(_a = a).baz && (_a.baz = result.baz), (_b = b).baz || (_b.baz = result.baz), null !== (_baz3 = (_c = c).baz) && void 0 !== _baz3 || (_c.baz = result.baz), (_a_foo = a.foo).baz && (_a_foo.baz = result.foo.baz), (_b_foo = b.foo).baz || (_b_foo.baz = result.foo.baz), null !== (_ = (_c_foo = c.foo).baz) && void 0 !== _ || (_c_foo.baz = result.foo.baz), (_a_foo_bar = a.foo.bar()).baz && (_a_foo_bar.baz = result.foo.bar().baz), (_b_foo_bar = b.foo.bar()).baz || (_b_foo_bar.baz = result.foo.bar().baz), null !== (_baz4 = (_c_foo_bar = c.foo.bar()).baz) && void 0 !== _baz4 || (_c_foo_bar.baz = result.foo.bar().baz);

View File

@ -2,6 +2,4 @@
var TerrestrialAnimalTypes, AlienAnimalTypes;
!function(TerrestrialAnimalTypes) {
TerrestrialAnimalTypes.CAT = "cat", TerrestrialAnimalTypes.DOG = "dog";
}(TerrestrialAnimalTypes || (TerrestrialAnimalTypes = {})), function(AlienAnimalTypes) {
AlienAnimalTypes.CAT = "cat";
}(AlienAnimalTypes || (AlienAnimalTypes = {})), TerrestrialAnimalTypes.CAT, AlienAnimalTypes.CAT;
}(TerrestrialAnimalTypes || (TerrestrialAnimalTypes = {})), (AlienAnimalTypes || (AlienAnimalTypes = {})).CAT = "cat", TerrestrialAnimalTypes.CAT, AlienAnimalTypes.CAT;

View File

@ -4,3 +4,4 @@ import _get from "@swc/helpers/src/_get.mjs";
import _get_prototype_of from "@swc/helpers/src/_get_prototype_of.mjs";
import _inherits from "@swc/helpers/src/_inherits.mjs";
import _create_super from "@swc/helpers/src/_create_super.mjs";
Mixed1, Mixed3;

View File

@ -12,4 +12,4 @@ try {
if (_didIteratorError) throw _iteratorError;
}
}
for(var n in f4());
for(var n1 in f4());

View File

@ -12,4 +12,4 @@ try {
if (_didIteratorError) throw _iteratorError;
}
}
for(var n in f4());
for(var n1 in f4());

View File

@ -5,9 +5,9 @@ import _object_without_properties from "@swc/helpers/src/_object_without_propert
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
import _to_array from "@swc/helpers/src/_to_array.mjs";
_sliced_to_array(strArray, 1)[0].toString(), _to_array(strArray).slice(0).push(void 0), _to_array(strArray).slice(2).push(void 0), strMap.t1.toString(), _extends({}, _object_destructuring_empty(strMap)).z.toString();
var ref, x = numMapPoint.x, y = numMapPoint.y, z = numMapPoint.z;
var ref3, x = numMapPoint.x, y = numMapPoint.y, z = numMapPoint.z;
x.toFixed(), y.toFixed(), z.toFixed();
var x1 = numMapPoint.x, q = _object_without_properties(numMapPoint, [
"x"
]);
x1.toFixed(), q.y.toFixed(), q.z.toFixed(), target_string = _sliced_to_array(strArray, 1)[0], target_string_undef = _sliced_to_array(strArray, 1)[0], target_string_arr = _to_array(strArray).slice(3), (ref = numMapPoint).x, ref.y, ref.z, numMapPoint.q;
x1.toFixed(), q.y.toFixed(), q.z.toFixed(), target_string = _sliced_to_array(strArray, 1)[0], target_string_undef = _sliced_to_array(strArray, 1)[0], target_string_arr = _to_array(strArray).slice(3), (ref3 = numMapPoint).x, ref3.y, ref3.z, numMapPoint.q;

View File

@ -1,3 +1,3 @@
//// [nonPrimitiveStrictNull.ts]
var a;
a.toString, a = void 0, a = null, a = b, a = c, a = a = d, "object" != typeof b && b.toString(), "object" == typeof b && (a = b), "object" == typeof d && (b = d), d.toString(), d.toString(), d.toString(), d.toString();
a.toString, a = void 0, a = null, a = b, a = c, a = a = d, "object" != typeof b && b.toString(), "object" == typeof b && (a = b), "object" == typeof d && (b = d), d.toString(), d, d.toString(), d, d.toString(), d.toString();

View File

@ -1,2 +1,2 @@
//// [nullishCoalescingOperator1.ts]
foo(), foo(), foo();
null != a1 && a1, null != a2 && a2, null != a3 && a3, null != a4 && a4, null != b1 && b1, null != b2 && b2, null != b3 && b3, null != b4 && b4, null == c1 || c1, null == c2 || c2, null == c3 || c3, null == c4 || c4, null != d1 && d1, null != d2 && d2, null != d3 && d3, null != d4 && d4, foo(), foo(), foo();

View File

@ -1,2 +1,2 @@
//// [nullishCoalescingOperator11.ts]
null != f11 || f11.toFixed();
null != f11 ? f11 : f11.toFixed();

View File

@ -1 +1,2 @@
//// [nullishCoalescingOperator2.ts]
null != a1 && a1, null != a2 && a2, null != a3 && a3, null != a4 && a4, null != a5 && a5, null != a6 && a6, null != a7 && a7, null != a8 && a8, null != a9 && a9;

View File

@ -1 +1,3 @@
//// [nullishCoalescingOperator3.ts]
var _ref, _ref1, _ref2, _ref3;
null !== (_ref3 = null !== (_ref2 = null !== (_ref1 = null !== (_ref = null != a1 ? a1 : a2) && void 0 !== _ref ? _ref : a3) && void 0 !== _ref1 ? _ref1 : a4) && void 0 !== _ref2 ? _ref2 : a5) && void 0 !== _ref3 || a6;

View File

@ -1,2 +1,2 @@
//// [nullishCoalescingOperator4.ts]
null != a1 || a1.toLowerCase(), a1 || a1.toLocaleUpperCase();
null != a1 ? a1 : a1.toLowerCase(), a1 || a1.toLocaleUpperCase();

View File

@ -1 +1,2 @@
//// [nullishCoalescingOperator7.ts]
a, null != a && a, (null != a ? a : "foo") ? null != b && b : null != c && c;

View File

@ -1,3 +1,3 @@
//// [nullishCoalescingOperator8.ts]
var _a_m, _ref;
a.p, a.m(), null !== (_ref = null !== (_a_m = a.m()) && void 0 !== _a_m ? _a_m : b.p) && void 0 !== _ref || b.m();
var _a_m1, _ref;
a.p, a.m(), null !== (_ref = null !== (_a_m1 = a.m()) && void 0 !== _a_m1 ? _a_m1 : b.p) && void 0 !== _ref || b.m();

View File

@ -1 +1,2 @@
//// [nullishCoalescingOperator9.ts]
f, null != f && f;

View File

@ -1 +1,2 @@
//// [nullishCoalescingOperator_es2020.ts]
a1, a2, a3, a4, a5, a6, a7, a8, a9, (a ?? b) || c, c || (a ?? b), (a ?? b) || c, c || (a ?? b), (a ?? b) || c, c || (a ?? b), (a ?? b) && c, c && (a ?? b), (a ?? b) && c, c && (a ?? b), (a ?? b) && c, c && (a ?? b);

View File

@ -1 +1,2 @@
//// [nullishCoalescingOperator_not_strict.ts]
null != a1 && a1, null != a2 && a2, null != a3 && a3, null != a4 && a4, null != a5 && a5, null != a6 && a6, null != a7 && a7, null != a8 && a8, null != a9 && a9;

View File

@ -32,7 +32,7 @@ a2.a, a2.b, a2 = {
var b2 = _object_spread_props(_object_spread({}, b1), {
z: 55
});
_object_spread({}, b2);
_object_spread({}, b2), opts;
var d1 = {
kind: "a",
pos: {

View File

@ -3,15 +3,15 @@ let array, xx;
import _object_spread from "@swc/helpers/src/_object_spread.mjs";
import _object_spread_props from "@swc/helpers/src/_object_spread_props.mjs";
import _object_without_properties from "@swc/helpers/src/_object_without_properties.mjs";
for (let _ref1 of array){
var _ref, { x } = _ref1;
_object_without_properties(_ref1, [
for (let _ref of array){
var _ref1, { x } = _ref;
_object_without_properties(_ref, [
"x"
]);
}
for (var _ref1 of array)_object_without_properties(_ref = _ref1, [
for (var _ref of array)_object_without_properties(_ref1 = _ref, [
"x"
]), { x: xx } = _ref;
]), { x: xx } = _ref1;
for (let norest of array.map((a)=>_object_spread_props(_object_spread({}, a), {
x: 'a string'
})))norest.x, norest.y;

View File

@ -1,18 +1,33 @@
//// [optionalChainingInference.ts]
unbox({
var b1 = {
value: null == su ? void 0 : su.length
}), unbox({
};
unbox(b1);
var b2 = {
value: null == su ? void 0 : su.length
}), unbox({
};
unbox(b2);
var b3 = {
value: null == su ? void 0 : su.length
}), unbox({
};
unbox(b3);
var b4 = {
value: null == fnu ? void 0 : fnu()
}), unbox({
};
unbox(b4);
var b5 = {
value: null == su ? void 0 : su.length
}), unbox({
};
unbox(b5);
var b6 = {
value: null == osu ? void 0 : osu.prop.length
}), unbox({
};
unbox(b6);
var b7 = {
value: null == osu ? void 0 : osu.prop.length
}), unbox({
};
unbox(b7);
var b8 = {
value: null == ofnu ? void 0 : ofnu.prop()
});
};
unbox(b8);

View File

@ -1,2 +1,2 @@
//// [optionalPropertyAssignableToStringIndexSignature.ts]
stringDictionary = optionalProperties, stringDictionary = undefinedProperties, probablyArray = numberLiteralKeys;
stringDictionary = optionalProperties, stringDictionary = undefinedProperties, probablyArray = numberLiteralKeys, optionalUndefined;

Some files were not shown because too many files have changed in this diff Show More