feat(es/utils): Use more unique names for aliases (#6399)

This commit is contained in:
Austaras 2022-11-11 09:57:49 +08:00 committed by GitHub
parent c39380d7a0
commit 574502a816
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
312 changed files with 1531 additions and 1518 deletions

View File

@ -1,6 +1,6 @@
import _to_consumable_array from "@swc/helpers/src/_to_consumable_array.mjs";
function a(param) {
var _b = param.b, b = _b === void 0 ? [] : _b;
var _param_b = param.b, b = _param_b === void 0 ? [] : _param_b;
var t = useMemo(function() {
return(// Cmt1
_to_consumable_array(a.slice(0, 1)).concat(// Cmt2

View File

@ -1,13 +1,13 @@
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
export var Class1 = function Class1(param) {
"use strict";
var _name = param.name, name = _name === void 0 ? "" : _name;
var _param_name = param.name, name = _param_name === void 0 ? "" : _param_name;
_class_call_check(this, Class1);
console.log(name);
};
export var Class2 = function Class2(param) {
"use strict";
var _name = param.name, name = _name === void 0 ? "" : _name;
var _param_name = param.name, name = _param_name === void 0 ? "" : _param_name;
_class_call_check(this, Class2);
console.log(name);
};

View File

@ -271,9 +271,9 @@ class Shard extends _utils.Emitter {
* Called whenever the websocket opens.
* @private
*/ _open() {
var ref;
var _class_private_field_get;
this.status = _utils.Status.HANDSHAKING;
this._debug(`Connected. ${(ref = _classPrivateFieldGet(this, _ws1)) === null || ref === void 0 ? void 0 : ref.url} in ${Date.now() - this.connectedAt}`);
this._debug(`Connected. ${(_class_private_field_get = _classPrivateFieldGet(this, _ws1)) === null || _class_private_field_get === void 0 ? void 0 : _class_private_field_get.url} in ${Date.now() - this.connectedAt}`);
if (_classPrivateFieldGet(this, _queue).length) {
this._debug(`${_classPrivateFieldGet(this, _queue).length} packets waiting... sending all now.`);
while(_classPrivateFieldGet(this, _queue).length){
@ -300,8 +300,8 @@ class Shard extends _utils.Emitter {
* @param {WebSocket.CloseEvent} evt
* @private
*/ _close(evt) {
var ref;
const reason = (ref = evt.reason || _utils.GatewayCloseCode[evt.code]) !== null && ref !== void 0 ? ref : "unknown";
var _ref;
const reason = (_ref = evt.reason || _utils.GatewayCloseCode[evt.code]) !== null && _ref !== void 0 ? _ref : "unknown";
this._debug(`Closed; Code = ${evt.code}, Clean? = ${evt.wasClean}, Reason = ${reason}`);
if (_classPrivateFieldGet(this, _seq) !== -1) {
_classPrivateFieldSet(this, _closingSeq, _classPrivateFieldGet(this, _seq));

View File

@ -59,8 +59,8 @@ class RequestHandler {
].includes(p) ? match : `/${p}/:id`).replace(/\/reactions\/[^/]+/g, "/reactions/:id").replace(/\/webhooks\/(\d+)\/[\w-]{64,}/, "webhooks/$1/:token").replace(/\?.*$/, "");
let ending = ";";
if (method === "delete" && route.endsWith("/message/:id")) {
var ref;
const id = (ref = /\d{16,19}$/.exec(route)) === null || ref === void 0 ? void 0 : ref[0];
var _exec;
const id = (_exec = /\d{16,19}$/.exec(route)) === null || _exec === void 0 ? void 0 : _exec[0];
const snowflake = _utils.Snowflake.deconstruct(id);
if (Date.now() - snowflake.timestamp > 1000 * 60 * 60 * 24 * 14) {
ending += "deletes-old";
@ -73,8 +73,8 @@ class RequestHandler {
* @param {Response} res
* @return {* | Promise<any>}
*/ static async parseResponse(res) {
var ref;
if ((ref = res.headers.get("Content-Type")) === null || ref === void 0 ? void 0 : ref.startsWith("application/json")) {
var _res_headers_get;
if ((_res_headers_get = res.headers.get("Content-Type")) === null || _res_headers_get === void 0 ? void 0 : _res_headers_get.startsWith("application/json")) {
return await res.json();
}
return res.buffer();

View File

@ -6,9 +6,9 @@ function foo() {
}
function _foo() {
_foo = _async_to_generator(function() {
var tmp, ref, ref;
var tmp, _ref, _ref;
return _ts_generator(this, function(_state) {
tmp = baz.bar, ref = tmp === void 0 ? {} : tmp, ref = ref !== null ? ref : _throw(new TypeError("Cannot destructure undefined"));
tmp = baz.bar, _ref = tmp === void 0 ? {} : tmp, _ref = _ref !== null ? _ref : _throw(new TypeError("Cannot destructure undefined"));
return [
2
];

View File

@ -6,9 +6,9 @@ function f(a, b) {
}
function _f() {
_f = _async_to_generator(function(a, b) {
var ref, ref1, tmp, a_;
var _JSON_parse, _JSON_parse_, tmp, a_;
return _ts_generator(this, function(_state) {
ref = _sliced_to_array(JSON.parse(b), 1), ref1 = ref[0], tmp = ref1.a, a_ = tmp === void 0 ? 1 : tmp;
_JSON_parse = _sliced_to_array(JSON.parse(b), 1), _JSON_parse_ = _JSON_parse[0], tmp = _JSON_parse_.a, a_ = tmp === void 0 ? 1 : tmp;
return [
2
];

View File

@ -1,6 +1,6 @@
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
function Bar() {
var ref = _sliced_to_array(useState(0), 2), foo = ref[0], setFoo = ref[1];
var _useState = _sliced_to_array(useState(0), 2), foo = _useState[0], setFoo = _useState[1];
// @refresh reset
React.useEffect(function() {});
return /*#__PURE__*/ React.createElement("h1", null, foo, " ");

View File

@ -1,7 +1,7 @@
var _value, ref;
var _myVar_target_value, _myVar_target_value_toLowerCase;
var myVar = {
target: {
value: "ABC"
}
};
console.log((ref = (_value = myVar.target.value).toLowerCase) === null || ref === void 0 ? void 0 : ref.call(_value));
console.log((_myVar_target_value_toLowerCase = (_myVar_target_value = myVar.target.value).toLowerCase) === null || _myVar_target_value_toLowerCase === void 0 ? void 0 : _myVar_target_value_toLowerCase.call(_myVar_target_value));

View File

@ -8,7 +8,7 @@ class ReusablePayments extends PureComponent {
}
}
setDefaultReusablePayment(skipPaymentSource) {
var _props = this.props, reusablePaymentSources = _props.reusablePaymentSources, selectedReusablePayment = _props.selectedReusablePayment, onChange = _props.onChange;
var _this_props = this.props, reusablePaymentSources = _this_props.reusablePaymentSources, selectedReusablePayment = _this_props.selectedReusablePayment, onChange = _this_props.onChange;
var validReusablePaymentSources = reusablePaymentSources.filter((ps)=>ps.__typename === "StripePaymentSource" && ps !== skipPaymentSource);
if (selectedReusablePayment === null) {
return;
@ -25,7 +25,7 @@ class ReusablePayments extends PureComponent {
onChange(ps || validReusablePaymentSources[0]);
}
render() {
var _props = this.props, selectedReusablePayment = _props.selectedReusablePayment, reusablePaymentSources = _props.reusablePaymentSources;
var _this_props = this.props, selectedReusablePayment = _this_props.selectedReusablePayment, reusablePaymentSources = _this_props.reusablePaymentSources;
var stripePaymentSources = reusablePaymentSources.filter((ps)=>ps.__typename === "StripePaymentSource");
if (!stripePaymentSources.length) {
return null;
@ -85,7 +85,7 @@ class ReusablePayments extends PureComponent {
return this.props.onChange(selected);
};
this.handleDeletePaymentSource = (id, deletePaymentSource)=>{
var _props = this.props, selectedReusablePayment = _props.selectedReusablePayment, onChange = _props.onChange;
var _this_props = this.props, selectedReusablePayment = _this_props.selectedReusablePayment, onChange = _this_props.onChange;
if (onChange && selectedReusablePayment && selectedReusablePayment.id === id) {
this.setDefaultReusablePayment(selectedReusablePayment);
}

View File

@ -13,9 +13,9 @@ var Foo = /*#__PURE__*/ function() {
key: "sendSomeMessage",
value: function sendSomeMessage(_parent, _param, _param1) {
return _async_to_generator(function() {
var _input, toNumber, messageBody, all, dataSources;
var _param_input, toNumber, messageBody, all, dataSources;
return _ts_generator(this, function(_state) {
_input = _param.input, toNumber = _input.toNumber, messageBody = _input.messageBody, all = _object_without_properties(_param.input, [
_param_input = _param.input, toNumber = _param_input.toNumber, messageBody = _param_input.messageBody, all = _object_without_properties(_param.input, [
"toNumber",
"messageBody"
]), dataSources = _param1.dataSources;

View File

@ -4,9 +4,9 @@ import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
var resolver = {
sendSomeMessage: function sendSomeMessage(_parent, _param, _param1) {
return _async_to_generator(function() {
var _input, toNumber, messageBody, all, dataSources;
var _param_input, toNumber, messageBody, all, dataSources;
return _ts_generator(this, function(_state) {
_input = _param.input, toNumber = _input.toNumber, messageBody = _input.messageBody, all = _object_without_properties(_param.input, [
_param_input = _param.input, toNumber = _param_input.toNumber, messageBody = _param_input.messageBody, all = _object_without_properties(_param.input, [
"toNumber",
"messageBody"
]), dataSources = _param1.dataSources;

View File

@ -1,5 +1,5 @@
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
var ref = _sliced_to_array(createQuery(), 2);
export var useQuery = ref[0], query = ref[1].query;
var ref1 = _sliced_to_array(createMutation(), 2);
export var useMutation = ref1[0], mutate = ref1[1].mutate;
var _createQuery = _sliced_to_array(createQuery(), 2);
export var useQuery = _createQuery[0], query = _createQuery[1].query;
var _createMutation = _sliced_to_array(createMutation(), 2);
export var useMutation = _createMutation[0], mutate = _createMutation[1].mutate;

View File

@ -2,7 +2,7 @@ export function App() {
return React.createElement(Form, null);
}
export function Form(param) {
var _onChange = param.onChange, onChange = _onChange === void 0 ? function() {} : _onChange;
var _param_onChange = param.onChange, onChange = _param_onChange === void 0 ? function() {} : _param_onChange;
return React.createElement("input", {
onChange: function onChange1() {
onChange();

View File

@ -1,9 +1,9 @@
var ref = {
var _ref = {
a: 1,
b: 2
}, a1 = ref.a, b1 = ref.b;
var ref1 = {
}, a1 = _ref.a, b1 = _ref.b;
var _ref1 = {
a: 1,
b: 2
};
export var a2 = ref1.a, b2 = ref1.b;
export var a2 = _ref1.a, b2 = _ref1.b;

View File

@ -16,12 +16,12 @@ _export(exports, {
return b2;
}
});
var ref = {
var _ref = {
a: 1,
b: 2
}, a1 = ref.a, b1 = ref.b;
var ref1 = {
}, a1 = _ref.a, b1 = _ref.b;
var _ref1 = {
a: 1,
b: 2
};
var a2 = ref1.a, b2 = ref1.b;
var a2 = _ref1.a, b2 = _ref1.b;

View File

@ -484,7 +484,7 @@ export var sendTransaction = function() {
}();
export var sendTransactionWithRetry = function() {
var _ref = _async_to_generator(function(connection, wallet, instructions, signers) {
var commitment, includesFeePayer, block, beforeSend, transaction, _tmp, _transaction, _transaction1, _transaction2, ref, txid, slot;
var commitment, includesFeePayer, block, beforeSend, transaction, _tmp, _transaction, _transaction1, _transaction2, _ref, txid, slot;
var _arguments = arguments;
return _ts_generator(this, function(_state) {
switch(_state.label){
@ -550,7 +550,7 @@ export var sendTransactionWithRetry = function() {
})
];
case 5:
ref = _state.sent(), txid = ref.txid, slot = ref.slot;
_ref = _state.sent(), txid = _ref.txid, slot = _ref.slot;
return [
2,
{
@ -574,11 +574,11 @@ export function sendSignedTransaction(_) {
}
function _sendSignedTransaction() {
_sendSignedTransaction = _async_to_generator(function(param) {
var signedTransaction, connection, _timeout, timeout, rawTransaction, startTime, slot, txid, done, confirmation, err, simulateResult, e, i, line;
var signedTransaction, connection, _param_timeout, timeout, rawTransaction, startTime, slot, txid, done, confirmation, err, simulateResult, e, i, line;
return _ts_generator(this, function(_state) {
switch(_state.label){
case 0:
signedTransaction = param.signedTransaction, connection = param.connection, _timeout = param.timeout, timeout = _timeout === void 0 ? DEFAULT_TIMEOUT : _timeout;
signedTransaction = param.signedTransaction, connection = param.connection, _param_timeout = param.timeout, timeout = _param_timeout === void 0 ? DEFAULT_TIMEOUT : _param_timeout;
rawTransaction = signedTransaction.serialize();
startTime = getUnixTs();
slot = 0;

View File

@ -4,22 +4,22 @@ var a = function a() {
"use strict";
_class_call_check(this, a);
};
var ref = [
var _ref = [
function _class() {
"use strict";
_class_call_check(this, _class);
}
], b = ref[0];
var ref1 = [], tmp = ref1[0], c = tmp === void 0 ? function c() {
], b = _ref[0];
var _ref1 = [], tmp = _ref1[0], c = tmp === void 0 ? function c() {
"use strict";
_class_call_check(this, c);
} : tmp;
var ref2 = [
var _ref2 = [
function _class() {
"use strict";
_class_call_check(this, _class);
}
], tmp1 = ref2[0], d = tmp1 === void 0 ? function d() {
], tmp1 = _ref2[0], d = tmp1 === void 0 ? function d() {
"use strict";
_class_call_check(this, d);
} : tmp1;
@ -29,20 +29,20 @@ var e = {
_class_call_check(this, e);
}
}.e;
var ref3 = {}, _f = ref3.f, f = _f === void 0 ? function f() {
var _ref3 = {}, _ref_f = _ref3.f, f = _ref_f === void 0 ? function f() {
"use strict";
_class_call_check(this, f);
} : _f;
var ref4 = {
} : _ref_f;
var _ref4 = {
g: function g() {
"use strict";
_class_call_check(this, g);
}
}, _g = ref4.g, g = _g === void 0 ? function g() {
}, _ref_g = _ref4.g, g = _ref_g === void 0 ? function g() {
"use strict";
_class_call_check(this, g);
} : _g;
var ref5 = {}, tmp2 = ref5._, h = tmp2 === void 0 ? function h() {
} : _ref_g;
var _ref5 = {}, tmp2 = _ref5._, h = tmp2 === void 0 ? function h() {
"use strict";
_class_call_check(this, h);
} : tmp2;

View File

@ -10,7 +10,7 @@ var Router = /*#__PURE__*/ function() {
_proto.change = function change(method, url, as, options, forcedScroll) {
var _this = this;
return _async_to_generator(function() {
var shouldResolveHref, prevLocale, parsedAs, localePathResult, didNavigate, ref, detectedDomain, asNoBasePath, _shallow, shallow, routeProps, cleanedAs, localeChange, parsed, pathname, query, pages, rewrites, ref1, err, resolvedAs, rewritesResult, route, parsedAs1, asPathname, routeRegex, routeMatch, shouldInterpolate, interpolatedAs, missingParams, ref2, ref3, routeInfo, error, props, __N_SSG, __N_SSP, destination, parsedHref, ref4, newUrl, newAs, notFoundRoute, _, isValidShallowRoute, _scroll, shouldScroll, resetScroll, err1;
var shouldResolveHref, prevLocale, parsedAs, localePathResult, didNavigate, _this_locales, detectedDomain, asNoBasePath, _options_shallow, shallow, routeProps, cleanedAs, localeChange, parsed, pathname, query, pages, rewrites, ref, err, resolvedAs, rewritesResult, route, parsedAs1, asPathname, routeRegex, routeMatch, shouldInterpolate, interpolatedAs, missingParams, _self___NEXT_DATA___props, _self___NEXT_DATA___props_pageProps, routeInfo, error, props, __N_SSG, __N_SSP, destination, parsedHref, _prepareUrlAs, newUrl, newAs, notFoundRoute, _, isValidShallowRoute, _options_scroll, shouldScroll, resetScroll, err1;
return _ts_generator(this, function(_state) {
switch(_state.label){
case 0:
@ -47,7 +47,7 @@ var Router = /*#__PURE__*/ function() {
if (process.env.__NEXT_I18N_SUPPORT) {
;
// if the locale isn't configured hard navigate to show 404 page
if (!((ref = _this.locales) === null || ref === void 0 ? void 0 : ref.includes(_this.locale))) {
if (!((_this_locales = _this.locales) === null || _this_locales === void 0 ? void 0 : _this_locales.includes(_this.locale))) {
parsedAs.pathname = addLocale(parsedAs.pathname, _this.locale);
window.location.href = formatWithValidation(parsedAs);
// this was previously a return but was removed in favor
@ -83,7 +83,7 @@ var Router = /*#__PURE__*/ function() {
if (ST) {
performance.mark("routeChange");
}
_shallow = options.shallow, shallow = _shallow === void 0 ? false : _shallow;
_options_shallow = options.shallow, shallow = _options_shallow === void 0 ? false : _options_shallow;
routeProps = {
shallow: shallow
};
@ -133,7 +133,7 @@ var Router = /*#__PURE__*/ function() {
getClientBuildManifest()
];
case 3:
ref1 = _state.sent(), rewrites = ref1.__rewrites, ref1;
ref = _state.sent(), rewrites = ref.__rewrites, ref;
return [
3,
5
@ -251,7 +251,7 @@ var Router = /*#__PURE__*/ function() {
if (destination.startsWith("/") && props.pageProps.__N_REDIRECT_BASE_PATH !== false) {
parsedHref = parseRelativeUrl(destination);
parsedHref.pathname = resolveDynamicRoute(parsedHref.pathname, pages);
ref4 = prepareUrlAs(_this, destination, destination), newUrl = ref4.url, newAs = ref4.as;
_prepareUrlAs = prepareUrlAs(_this, destination, destination), newUrl = _prepareUrlAs.url, newAs = _prepareUrlAs.as;
return [
2,
_this.change(method, newUrl, newAs, options)
@ -307,13 +307,13 @@ var Router = /*#__PURE__*/ function() {
case 13:
Router.events.emit("beforeHistoryChange", as, routeProps);
_this.changeState(method, url, as, options);
if (options._h && pathname === "/_error" && ((ref2 = self.__NEXT_DATA__.props) === null || ref2 === void 0 ? void 0 : (ref3 = ref2.pageProps) === null || ref3 === void 0 ? void 0 : ref3.statusCode) === 500 && (props === null || props === void 0 ? void 0 : props.pageProps)) {
if (options._h && pathname === "/_error" && ((_self___NEXT_DATA___props = self.__NEXT_DATA__.props) === null || _self___NEXT_DATA___props === void 0 ? void 0 : (_self___NEXT_DATA___props_pageProps = _self___NEXT_DATA___props.pageProps) === null || _self___NEXT_DATA___props_pageProps === void 0 ? void 0 : _self___NEXT_DATA___props_pageProps.statusCode) === 500 && (props === null || props === void 0 ? void 0 : props.pageProps)) {
// ensure statusCode is still correct for static 500 page
// when updating query information
props.pageProps.statusCode = 500;
}
isValidShallowRoute = options.shallow && _this.route === route;
shouldScroll = (_scroll = options.scroll) !== null && _scroll !== void 0 ? _scroll : !isValidShallowRoute;
shouldScroll = (_options_scroll = options.scroll) !== null && _options_scroll !== void 0 ? _options_scroll : !isValidShallowRoute;
resetScroll = shouldScroll ? {
x: 0,
y: 0

View File

@ -13,6 +13,6 @@ var _slicedToArray = require("@swc/helpers/lib/_sliced_to_array.js").default;
var _react = /*#__PURE__*/ _interopRequireDefault(require("react"));
var _reactI18N = require("@shopify/react-i18n");
function App() {
var ref = _slicedToArray((0, _reactI18N.useI18n)(), 1), i18n = ref[0];
var _useI18n = _slicedToArray((0, _reactI18N.useI18n)(), 1), i18n = _useI18n[0];
return /*#__PURE__*/ _react.default.createElement("h1", null, i18n.translate("foo"));
}

View File

@ -13,6 +13,6 @@ var _slicedToArray = require("@swc/helpers/lib/_sliced_to_array.js").default;
var _react = /*#__PURE__*/ _interopRequireDefault(require("react"));
var _reactI18N = require("@shopify/react-i18n");
function App() {
var ref = _slicedToArray((0, _reactI18N.useI18n)(), 1), i18n = ref[0];
var _useI18n = _slicedToArray((0, _reactI18N.useI18n)(), 1), i18n = _useI18n[0];
return /*#__PURE__*/ _react.default.createElement("h1", null, i18n.translate("foo"));
}

View File

@ -13,6 +13,6 @@ var _slicedToArray = require("@swc/helpers/lib/_sliced_to_array.js").default;
var _react = /*#__PURE__*/ _interopRequireDefault(require("react"));
var _reactI18N = require("@shopify/react-i18n");
function App() {
var ref = _slicedToArray((0, _reactI18N.useI18n)(), 1), i18n = ref[0];
var _useI18n = _slicedToArray((0, _reactI18N.useI18n)(), 1), i18n = _useI18n[0];
return /*#__PURE__*/ _react.default.createElement("h1", null, i18n.translate("foo"));
}

View File

@ -2,6 +2,6 @@ import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
import React from "react";
import { useI18n } from "@shopify/react-i18n";
export function App() {
var ref = _sliced_to_array(useI18n(), 1), i18n = ref[0];
var _useI18n = _sliced_to_array(useI18n(), 1), i18n = _useI18n[0];
return /*#__PURE__*/ React.createElement("h1", null, i18n.translate("foo"));
}

View File

@ -4,7 +4,7 @@ for(var _i = 0, _iter = [
2,
3
]; _i < _iter.length; _i++){
var __i = _sliced_to_array(_iter[_i], 2), tmp = __i[0], a = tmp === void 0 ? 0 : tmp, tmp1 = __i[1], b = tmp1 === void 0 ? 1 : tmp1;
var _iter__i = _sliced_to_array(_iter[_i], 2), tmp = _iter__i[0], a = tmp === void 0 ? 0 : tmp, tmp1 = _iter__i[1], b = tmp1 === void 0 ? 1 : tmp1;
a;
b;
}

View File

@ -4,6 +4,6 @@ for(var _i = 0, _iter = [
2,
3
]; _i < _iter.length; _i++){
var __i = _sliced_to_array(_iter[_i], 2);
__i[0], __i[1];
var _iter__i = _sliced_to_array(_iter[_i], 2);
_iter__i[0], _iter__i[1];
}

View File

@ -3,7 +3,7 @@ for(var _i = 0, _iter = [
2,
3
]; _i < _iter.length; _i++){
var __i = _iter[_i], tmp = __i.x, a = tmp === void 0 ? 0 : tmp, tmp1 = __i.y, b = tmp1 === void 0 ? 1 : tmp1;
var _iter__i = _iter[_i], tmp = _iter__i.x, a = tmp === void 0 ? 0 : tmp, tmp1 = _iter__i.y, b = tmp1 === void 0 ? 1 : tmp1;
a;
b;
}

View File

@ -3,6 +3,6 @@ for(var _i = 0, _iter = [
2,
3
]; _i < _iter.length; _i++){
var __i = _iter[_i];
__i.x, __i.y;
var _iter__i = _iter[_i];
_iter__i.x, _iter__i.y;
}

View File

@ -4,7 +4,7 @@ for(var _i = 0, _iter = [
2,
3
]; _i < _iter.length; _i++){
var __i = _sliced_to_array(_iter[_i], 2), tmp = __i[0], a = tmp === void 0 ? 0 : tmp, tmp1 = __i[1], b = tmp1 === void 0 ? 1 : tmp1;
var _iter__i = _sliced_to_array(_iter[_i], 2), tmp = _iter__i[0], a = tmp === void 0 ? 0 : tmp, tmp1 = _iter__i[1], b = tmp1 === void 0 ? 1 : tmp1;
a;
b;
}

View File

@ -4,6 +4,6 @@ for(var _i = 0, _iter = [
2,
3
]; _i < _iter.length; _i++){
var __i = _sliced_to_array(_iter[_i], 2);
__i[0], __i[1];
var _iter__i = _sliced_to_array(_iter[_i], 2);
_iter__i[0], _iter__i[1];
}

View File

@ -3,7 +3,7 @@ for(var _i = 0, _iter = [
2,
3
]; _i < _iter.length; _i++){
var __i = _iter[_i], tmp = __i.x, a = tmp === void 0 ? 0 : tmp, tmp1 = __i.y, b = tmp1 === void 0 ? 1 : tmp1;
var _iter__i = _iter[_i], tmp = _iter__i.x, a = tmp === void 0 ? 0 : tmp, tmp1 = _iter__i.y, b = tmp1 === void 0 ? 1 : tmp1;
a;
b;
}

View File

@ -3,6 +3,6 @@ for(var _i = 0, _iter = [
2,
3
]; _i < _iter.length; _i++){
var __i = _iter[_i];
__i.x, __i.y;
var _iter__i = _iter[_i];
_iter__i.x, _iter__i.y;
}

View File

@ -3,7 +3,7 @@ for(var _i = 0, _iter = [
2,
3
]; _i < _iter.length; _i++){
var __i = _iter[_i], tmp = __i.x, a = tmp === void 0 ? 0 : tmp, tmp1 = __i.y, b = tmp1 === void 0 ? 1 : tmp1;
var _iter__i = _iter[_i], tmp = _iter__i.x, a = tmp === void 0 ? 0 : tmp, tmp1 = _iter__i.y, b = tmp1 === void 0 ? 1 : tmp1;
a;
b;
}

View File

@ -3,6 +3,6 @@ for(var _i = 0, _iter = [
2,
3
]; _i < _iter.length; _i++){
var __i = _iter[_i];
__i.x, __i.y;
var _iter__i = _iter[_i];
_iter__i.x, _iter__i.y;
}

View File

@ -4,7 +4,7 @@ for(var _i = 0, _iter = [
2,
3
]; _i < _iter.length; _i++){
var __i = _sliced_to_array(_iter[_i], 2), tmp = __i[0], a = tmp === void 0 ? 0 : tmp, tmp1 = __i[1], b = tmp1 === void 0 ? 1 : tmp1;
var _iter__i = _sliced_to_array(_iter[_i], 2), tmp = _iter__i[0], a = tmp === void 0 ? 0 : tmp, tmp1 = _iter__i[1], b = tmp1 === void 0 ? 1 : tmp1;
a;
b;
}

View File

@ -4,6 +4,6 @@ for(var _i = 0, _iter = [
2,
3
]; _i < _iter.length; _i++){
var __i = _sliced_to_array(_iter[_i], 2);
__i[0], __i[1];
var _iter__i = _sliced_to_array(_iter[_i], 2);
_iter__i[0], _iter__i[1];
}

View File

@ -3,12 +3,12 @@
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
import _to_consumable_array from "@swc/helpers/src/_to_consumable_array.mjs";
function foo(param) {
var _x = _sliced_to_array(param.x, 2), a = _x[0], b = _x[1], _y = param.y, c = _y.c, d = _y.d, e = _y.e;
var _param_x = _sliced_to_array(param.x, 2), a = _param_x[0], b = _param_x[1], _param_y = param.y, c = _param_y.c, d = _param_y.d, e = _param_y.e;
}
function bar(param) {
var _x = _sliced_to_array(param.x, 2), a = _x[0], tmp = _x[1], b = tmp === void 0 ? 10 : tmp, _y = param.y, c = _y.c, d = _y.d, _e = _y.e, e = _e === void 0 ? {
var _param_x = _sliced_to_array(param.x, 2), a = _param_x[0], tmp = _param_x[1], b = tmp === void 0 ? 10 : tmp, _param_y = param.y, c = _param_y.c, d = _param_y.d, _param_y_e = _param_y.e, e = _param_y_e === void 0 ? {
f: 1
} : _e;
} : _param_y_e;
}
function baz(x) {}
var o = {

View File

@ -2,8 +2,8 @@
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
import _to_consumable_array from "@swc/helpers/src/_to_consumable_array.mjs";
function foo(param) {
var _x = _sliced_to_array(param.x, 2), _y = (_x[0], _x[1], param.y);
_y.c, _y.d, _y.e;
var _param_x = _sliced_to_array(param.x, 2), _param_y = (_param_x[0], _param_x[1], param.y);
_param_y.c, _param_y.d, _param_y.e;
}
foo({
x: [

View File

@ -64,11 +64,11 @@ var b1 = [
// - If the array literal contains no spread elements and is an array assignment pattern in a destructuring assignment (section 4.17.1),
// the resulting type is a tuple type constructed from the types of the element expressions.
var c0 = 1, c1 = 2; // tuple type [number, number]
var ref = [
var _ref = [
1,
2,
true
], c2 = ref[0], c3 = ref[1]; // tuple type [number, number, boolean]
], c2 = _ref[0], c3 = _ref[1]; // tuple type [number, number, boolean]
// The resulting type an array literal expression is determined as follows:
// - the resulting type is an array type with an element type that is the union of the types of the
// non - spread element expressions and the numeric index signature types of the spread element expressions

View File

@ -19,12 +19,12 @@ var a0 = [
].concat(_to_consumable_array(a0)), _to_consumable_array(a0).concat([
,
]);
var ref = [
var _ref = [
1,
2,
!0
];
ref[0], ref[1];
_ref[0], _ref[1];
var temp = [
"s",
"t",

View File

@ -16,12 +16,12 @@ var a1 = [
// The resulting type an array literal expression is determined as follows:
// - If the array literal contains no spread elements and is an array assignment pattern in a destructuring assignment (section 4.17.1),
// the resulting type is a tuple type constructed from the types of the element expressions.
var ref = [
var _ref = [
1,
2,
"string",
true
], b1 = ref[0], b2 = ref[1];
], b1 = _ref[0], b2 = _ref[1];
// The resulting type an array literal expression is determined as follows:
// - the resulting type is an array type with an element type that is the union of the types of the
// non - spread element expressions and the numeric index signature types of the spread element expressions

View File

@ -1,12 +1,12 @@
//// [arrayLiterals3.ts]
import _to_consumable_array from "@swc/helpers/src/_to_consumable_array.mjs";
var ref = [
var _ref = [
1,
2,
"string",
!0
];
ref[0], ref[1];
_ref[0], _ref[1];
var temp1 = [
1,
2,

View File

@ -48,15 +48,15 @@ var p7 = function(param) {
var b = param.a.b;
};
var p8 = function(param) {
var _a = param.a, a = _a === void 0 ? 1 : _a;
var _param_a = param.a, a = _param_a === void 0 ? 1 : _param_a;
};
var p9 = function(param) {
var tmp = param.a, ref = tmp === void 0 ? {
var tmp = param.a, _ref = tmp === void 0 ? {
b: 1
} : tmp, _b = ref.b, b = _b === void 0 ? 1 : _b;
} : tmp, _ref_b = _ref.b, b = _ref_b === void 0 ? 1 : _ref_b;
};
var p10 = function(param) {
var _param = _sliced_to_array(param, 1), ref = _param[0], value = ref.value, done = ref.done;
var _param = _sliced_to_array(param, 1), _param_ = _param[0], value = _param_.value, done = _param_.done;
};
// Arrow function used in class member initializer
// Arrow function used in class member function

View File

@ -1,6 +1,6 @@
//// [callChain.ts]
var _o2, _o21, _o22, _o23, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
var ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7, ref8, ref9, ref10, ref11, ref12;
var _o2, _o21, _o22, _o23, _o3_b, _o3_b1, _o3_b2, _o3_b3, _o3_b4, _o3_b5;
var _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;
o1 === null || o1 === void 0 ? void 0 : o1();
o1 === null || o1 === void 0 ? void 0 : o1(1);
o1 === null || o1 === void 0 ? void 0 : o1.apply(void 0, [
@ -37,42 +37,42 @@ o2 === null || o2 === void 0 ? void 0 : (_o23 = o2)["b"].apply(_o23, [
3,
4
]);
(ref = o3.b) === null || ref === void 0 ? void 0 : ref.call(o3).c;
(ref1 = o3.b) === null || ref1 === void 0 ? void 0 : ref1.call(o3, 1).c;
(ref2 = o3.b) === null || ref2 === void 0 ? void 0 : (_ref = ref2).call.apply(_ref, [
(_o3_b6 = o3.b) === null || _o3_b6 === void 0 ? void 0 : _o3_b6.call(o3).c;
(_o3_b7 = o3.b) === null || _o3_b7 === void 0 ? void 0 : _o3_b7.call(o3, 1).c;
(_o3_b8 = o3.b) === null || _o3_b8 === void 0 ? void 0 : (_o3_b = _o3_b8).call.apply(_o3_b, [
o3,
1,
2
]).c;
(ref3 = o3.b) === null || ref3 === void 0 ? void 0 : (_ref1 = ref3).call.apply(_ref1, [
(_o3_b9 = o3.b) === null || _o3_b9 === void 0 ? void 0 : (_o3_b1 = _o3_b9).call.apply(_o3_b1, [
o3,
1,
2,
3,
4
]).c;
(ref4 = o3.b) === null || ref4 === void 0 ? void 0 : ref4.call(o3)["c"];
(ref5 = o3.b) === null || ref5 === void 0 ? void 0 : ref5.call(o3, 1)["c"];
(ref6 = o3.b) === null || ref6 === void 0 ? void 0 : (_ref2 = ref6).call.apply(_ref2, [
(_o3_b10 = o3.b) === null || _o3_b10 === void 0 ? void 0 : _o3_b10.call(o3)["c"];
(_o3_b11 = o3.b) === null || _o3_b11 === void 0 ? void 0 : _o3_b11.call(o3, 1)["c"];
(_o3_b12 = o3.b) === null || _o3_b12 === void 0 ? void 0 : (_o3_b2 = _o3_b12).call.apply(_o3_b2, [
o3,
1,
2
])["c"];
(ref7 = o3.b) === null || ref7 === void 0 ? void 0 : (_ref3 = ref7).call.apply(_ref3, [
(_o3_b13 = o3.b) === null || _o3_b13 === void 0 ? void 0 : (_o3_b3 = _o3_b13).call.apply(_o3_b3, [
o3,
1,
2,
3,
4
])["c"];
(ref8 = o3["b"]) === null || ref8 === void 0 ? void 0 : ref8.call(o3).c;
(ref9 = o3["b"]) === null || ref9 === void 0 ? void 0 : ref9.call(o3, 1).c;
(ref10 = o3["b"]) === null || ref10 === void 0 ? void 0 : (_ref4 = ref10).call.apply(_ref4, [
(_o3_b14 = o3["b"]) === null || _o3_b14 === void 0 ? void 0 : _o3_b14.call(o3).c;
(_o3_b15 = o3["b"]) === null || _o3_b15 === void 0 ? void 0 : _o3_b15.call(o3, 1).c;
(_o3_b16 = o3["b"]) === null || _o3_b16 === void 0 ? void 0 : (_o3_b4 = _o3_b16).call.apply(_o3_b4, [
o3,
1,
2
]).c;
(ref11 = o3["b"]) === null || ref11 === void 0 ? void 0 : (_ref5 = ref11).call.apply(_ref5, [
(_o3_b17 = o3["b"]) === null || _o3_b17 === void 0 ? void 0 : (_o3_b5 = _o3_b17).call.apply(_o3_b5, [
o3,
1,
2,
@ -80,7 +80,7 @@ o2 === null || o2 === void 0 ? void 0 : (_o23 = o2)["b"].apply(_o23, [
4
]).c;
var v = o4 === null || o4 === void 0 ? void 0 : o4(incr);
(ref12 = o5()) === null || ref12 === void 0 ? void 0 : ref12();
(_o5 = o5()) === null || _o5 === void 0 ? void 0 : _o5();
// GH#36031
o2 === null || o2 === void 0 ? void 0 : o2.b().toString;
o2 === null || o2 === void 0 ? void 0 : o2.b().toString;

View File

@ -1,5 +1,5 @@
//// [callChain.2.ts]
var ref;
var _o3_b;
o1 === null || o1 === void 0 ? void 0 : o1();
o2 === null || o2 === void 0 ? void 0 : o2.b();
(ref = o3.b) === null || ref === void 0 ? void 0 : ref.call(o3).c;
(_o3_b = o3.b) === null || _o3_b === void 0 ? void 0 : _o3_b.call(o3).c;

View File

@ -1,3 +1,3 @@
//// [callChain.2.ts]
var ref;
null == o1 || o1(), null == o2 || o2.b(), null === (ref = o3.b) || void 0 === ref || ref.call(o3).c;
var _o3_b;
null == o1 || o1(), null == o2 || o2.b(), null === (_o3_b = o3.b) || void 0 === _o3_b || _o3_b.call(o3).c;

View File

@ -1,5 +1,5 @@
//// [callChain.ts]
var _o2, _o21, _o22, _o23, ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7, ref8, ref9, ref10, ref11, ref12;
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;
null == o1 || o1(), null == o1 || o1(1), null == o1 || o1.apply(void 0, [
1,
2
@ -24,34 +24,34 @@ null == o1 || o1(), null == o1 || o1(1), null == o1 || o1.apply(void 0, [
2,
3,
4
]), null === (ref = o3.b) || void 0 === ref || ref.call(o3).c, null === (ref1 = o3.b) || void 0 === ref1 || ref1.call(o3, 1).c, null === (ref2 = o3.b) || void 0 === ref2 || ref2.call.apply(ref2, [
]), 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, [
o3,
1,
2
]).c, null === (ref3 = o3.b) || void 0 === ref3 || ref3.call.apply(ref3, [
]).c, null === (_o3_b3 = o3.b) || void 0 === _o3_b3 || _o3_b3.call.apply(_o3_b3, [
o3,
1,
2,
3,
4
]).c, null === (ref4 = o3.b) || void 0 === ref4 || ref4.call(o3).c, null === (ref5 = o3.b) || void 0 === ref5 || ref5.call(o3, 1).c, null === (ref6 = o3.b) || void 0 === ref6 || ref6.call.apply(ref6, [
]).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, [
o3,
1,
2
]).c, null === (ref7 = o3.b) || void 0 === ref7 || ref7.call.apply(ref7, [
]).c, null === (_o3_b7 = o3.b) || void 0 === _o3_b7 || _o3_b7.call.apply(_o3_b7, [
o3,
1,
2,
3,
4
]).c, null === (ref8 = o3.b) || void 0 === ref8 || ref8.call(o3).c, null === (ref9 = o3.b) || void 0 === ref9 || ref9.call(o3, 1).c, null === (ref10 = o3.b) || void 0 === ref10 || ref10.call.apply(ref10, [
]).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, [
o3,
1,
2
]).c, null === (ref11 = o3.b) || void 0 === ref11 || ref11.call.apply(ref11, [
]).c, null === (_o3_b11 = o3.b) || void 0 === _o3_b11 || _o3_b11.call.apply(_o3_b11, [
o3,
1,
2,
3,
4
]).c, null == o4 || o4(incr), null === (ref12 = o5()) || void 0 === ref12 || ref12(), null == o2 || o2.b().toString, null == o2 || o2.b().toString;
]).c, null == o4 || o4(incr), null === (_o5 = o5()) || void 0 === _o5 || _o5(), null == o2 || o2.b().toString, null == o2 || o2.b().toString;

View File

@ -1,19 +1,19 @@
//// [callChain.3.ts]
var ref, ref1, ref2, ref3, ref4;
var n1 = a === null || a === void 0 ? void 0 : (ref = a.m) === null || ref === void 0 ? void 0 : ref.call(a, {
var _a_m, _a_m1, _a_m2, _a_m3, _a_m4;
var n1 = a === null || a === void 0 ? void 0 : (_a_m = a.m) === null || _a_m === void 0 ? void 0 : _a_m.call(a, {
x: 12
}); // should be an error (`undefined` is not assignable to `number`)
var n2 = a === null || a === void 0 ? void 0 : (ref1 = a.m) === null || ref1 === void 0 ? void 0 : ref1.call(a, {
var n2 = a === null || a === void 0 ? void 0 : (_a_m1 = a.m) === null || _a_m1 === void 0 ? void 0 : _a_m1.call(a, {
x: absorb()
}); // likewise
var n3 = a === null || a === void 0 ? void 0 : (ref2 = a.m) === null || ref2 === void 0 ? void 0 : ref2.call(a, {
var n3 = a === null || a === void 0 ? void 0 : (_a_m2 = a.m) === null || _a_m2 === void 0 ? void 0 : _a_m2.call(a, {
x: 12
}); // should be ok
var n4 = a === null || a === void 0 ? void 0 : (ref3 = a.m) === null || ref3 === void 0 ? void 0 : ref3.call(a, {
var n4 = a === null || a === void 0 ? void 0 : (_a_m3 = a.m) === null || _a_m3 === void 0 ? void 0 : _a_m3.call(a, {
x: absorb()
}); // likewise
// Also a test showing `!` vs `?` for good measure
var t1 = a === null || a === void 0 ? void 0 : (ref4 = a.m) === null || ref4 === void 0 ? void 0 : ref4.call(a, {
var t1 = a === null || a === void 0 ? void 0 : (_a_m4 = a.m) === null || _a_m4 === void 0 ? void 0 : _a_m4.call(a, {
x: 12
});
t1 = a.m({

View File

@ -1,14 +1,14 @@
//// [callChain.3.ts]
var ref, ref1, ref2, ref3, ref4;
null == a || null === (ref = a.m) || void 0 === ref || ref.call(a, {
var _a_m, _a_m1, _a_m2, _a_m3, _a_m4;
null == a || null === (_a_m = a.m) || void 0 === _a_m || _a_m.call(a, {
x: 12
}), null == a || null === (ref1 = a.m) || void 0 === ref1 || ref1.call(a, {
}), null == a || null === (_a_m1 = a.m) || void 0 === _a_m1 || _a_m1.call(a, {
x: absorb()
}), null == a || null === (ref2 = a.m) || void 0 === ref2 || ref2.call(a, {
}), null == a || null === (_a_m2 = a.m) || void 0 === _a_m2 || _a_m2.call(a, {
x: 12
}), null == a || null === (ref3 = a.m) || void 0 === ref3 || ref3.call(a, {
}), null == a || null === (_a_m3 = a.m) || void 0 === _a_m3 || _a_m3.call(a, {
x: absorb()
}), null == a || null === (ref4 = a.m) || void 0 === ref4 || ref4.call(a, {
}), null == a || null === (_a_m4 = a.m) || void 0 === _a_m4 || _a_m4.call(a, {
x: 12
}), a.m({
x: 12

View File

@ -5,11 +5,11 @@ class Base {
}
class Derived extends Base {
method1() {
var ref;
return (ref = super.method) === null || ref === void 0 ? void 0 : ref.call(this);
var _super_method;
return (_super_method = super.method) === null || _super_method === void 0 ? void 0 : _super_method.call(this);
}
method2() {
var ref;
return (ref = super["method"]) === null || ref === void 0 ? void 0 : ref.call(this);
var _super_method;
return (_super_method = super["method"]) === null || _super_method === void 0 ? void 0 : _super_method.call(this);
}
}

View File

@ -5,11 +5,11 @@ class Base {
}
class Derived extends Base {
method1() {
var ref;
return (ref = super.method) === null || ref === void 0 ? void 0 : ref.call(this);
var _super_method;
return (_super_method = super.method) === null || _super_method === void 0 ? void 0 : _super_method.call(this);
}
method2() {
var ref;
return (ref = super["method"]) === null || ref === void 0 ? void 0 : ref.call(this);
var _super_method;
return (_super_method = super["method"]) === null || _super_method === void 0 ? void 0 : _super_method.call(this);
}
}

View File

@ -5,11 +5,11 @@ class Base {
}
class Derived extends Base {
method1() {
var ref;
return (ref = super.method) === null || ref === void 0 ? void 0 : ref.call(this);
var _super_method;
return (_super_method = super.method) === null || _super_method === void 0 ? void 0 : _super_method.call(this);
}
method2() {
var ref;
return (ref = super["method"]) === null || ref === void 0 ? void 0 : ref.call(this);
var _super_method;
return (_super_method = super["method"]) === null || _super_method === void 0 ? void 0 : _super_method.call(this);
}
}

View File

@ -5,11 +5,11 @@ class Base {
}
class Derived extends Base {
method1() {
var ref;
return (ref = super.method) === null || ref === void 0 ? void 0 : ref.call(this);
var _super_method;
return (_super_method = super.method) === null || _super_method === void 0 ? void 0 : _super_method.call(this);
}
method2() {
var ref;
return (ref = super["method"]) === null || ref === void 0 ? void 0 : ref.call(this);
var _super_method;
return (_super_method = super["method"]) === null || _super_method === void 0 ? void 0 : _super_method.call(this);
}
}

View File

@ -5,11 +5,11 @@ class Base {
}
class Derived extends Base {
method1() {
var ref;
return (ref = super.method) === null || ref === void 0 ? void 0 : ref.call(this);
var _super_method;
return (_super_method = super.method) === null || _super_method === void 0 ? void 0 : _super_method.call(this);
}
method2() {
var ref;
return (ref = super["method"]) === null || ref === void 0 ? void 0 : ref.call(this);
var _super_method;
return (_super_method = super["method"]) === null || _super_method === void 0 ? void 0 : _super_method.call(this);
}
}

View File

@ -24,12 +24,12 @@ var Derived = /*#__PURE__*/ function(Base) {
}
var _proto = Derived.prototype;
_proto.method1 = function method1() {
var ref;
return (ref = _get(_get_prototype_of(Derived.prototype), "method", this)) === null || ref === void 0 ? void 0 : ref.call(this);
var _super_method;
return (_super_method = _get(_get_prototype_of(Derived.prototype), "method", this)) === null || _super_method === void 0 ? void 0 : _super_method.call(this);
};
_proto.method2 = function method2() {
var ref;
return (ref = _get(_get_prototype_of(Derived.prototype), "method", this)) === null || ref === void 0 ? void 0 : ref.call(this);
var _super_method;
return (_super_method = _get(_get_prototype_of(Derived.prototype), "method", this)) === null || _super_method === void 0 ? void 0 : _super_method.call(this);
};
return Derived;
}(Base);

View File

@ -5,7 +5,7 @@ import _get_prototype_of from "@swc/helpers/src/_get_prototype_of.mjs";
import _inherits from "@swc/helpers/src/_inherits.mjs";
import _to_consumable_array from "@swc/helpers/src/_to_consumable_array.mjs";
import _create_super from "@swc/helpers/src/_create_super.mjs";
var _obj, _obj1, _obj2, _obj3, _instance, _obj4, _instance1, _obj5, _obj6, _obj7, _obj8, _instance2, _obj9, _instance3, _instance4, _instance5, _instance6;
var _obj, _obj1, _obj2, _obj3, _foo_apply, _obj4, _foo_apply1, _obj5, _obj6, _obj7, _obj8, _foo_apply2, _obj9, _foo_apply3, _xa_, _xa_1, _xa_2;
function foo(x, y) {
for(var _len = arguments.length, z = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++){
z[_key - 2] = arguments[_key];
@ -41,17 +41,17 @@ obj.foo(1, 2, "abc");
1,
2
].concat(_to_consumable_array(a))).foo(1, 2, "abc");
(_instance = (_obj3 = obj).foo.apply(_obj3, [
(_foo_apply = (_obj3 = obj).foo.apply(_obj3, [
1,
2
].concat(_to_consumable_array(a)))).foo.apply(_instance, [
].concat(_to_consumable_array(a)))).foo.apply(_foo_apply, [
1,
2
].concat(_to_consumable_array(a)));
(_instance1 = (_obj4 = obj).foo.apply(_obj4, [
(_foo_apply1 = (_obj4 = obj).foo.apply(_obj4, [
1,
2
].concat(_to_consumable_array(a)))).foo.apply(_instance1, [
].concat(_to_consumable_array(a)))).foo.apply(_foo_apply1, [
1,
2
].concat(_to_consumable_array(a), [
@ -72,34 +72,34 @@ obj.foo(1, 2, "abc");
1,
2
].concat(_to_consumable_array(a))).foo(1, 2, "abc");
(_instance2 = (_obj8 = obj).foo.apply(_obj8, [
(_foo_apply2 = (_obj8 = obj).foo.apply(_obj8, [
1,
2
].concat(_to_consumable_array(a)))).foo.apply(_instance2, [
].concat(_to_consumable_array(a)))).foo.apply(_foo_apply2, [
1,
2
].concat(_to_consumable_array(a)));
(_instance3 = (_obj9 = obj).foo.apply(_obj9, [
(_foo_apply3 = (_obj9 = obj).foo.apply(_obj9, [
1,
2
].concat(_to_consumable_array(a)))).foo.apply(_instance3, [
].concat(_to_consumable_array(a)))).foo.apply(_foo_apply3, [
1,
2
].concat(_to_consumable_array(a), [
"abc"
]));
xa[1].foo(1, 2, "abc");
(_instance4 = xa[1]).foo.apply(_instance4, [
(_xa_ = xa[1]).foo.apply(_xa_, [
1,
2
].concat(_to_consumable_array(a)));
(_instance5 = xa[1]).foo.apply(_instance5, [
(_xa_1 = xa[1]).foo.apply(_xa_1, [
1,
2
].concat(_to_consumable_array(a), [
"abc"
]));
(_instance6 = xa[1]).foo.apply(_instance6, [
(_xa_2 = xa[1]).foo.apply(_xa_2, [
1,
2,
"abc"
@ -140,9 +140,9 @@ var D = /*#__PURE__*/ function(C) {
}
var _proto = D.prototype;
_proto.foo = function foo() {
var _instance;
var _$_get;
_get(_get_prototype_of(D.prototype), "foo", this).call(this, 1, 2);
(_instance = _get(_get_prototype_of(D.prototype), "foo", this)).call.apply(_instance, [
(_$_get = _get(_get_prototype_of(D.prototype), "foo", this)).call.apply(_$_get, [
this,
1,
2

View File

@ -1,5 +1,5 @@
//// [callWithSpread.ts]
var _instance, _instance1, _instance2, _instance3, _instance4, _instance5, _instance6, a, obj, xa;
var _foo_apply, _foo_apply1, _foo_apply2, _foo_apply3, _xa_, _xa_1, _xa_2, a, obj, xa;
import _class_call_check from "@swc/helpers/src/_class_call_check.mjs";
import _get from "@swc/helpers/src/_get.mjs";
import _get_prototype_of from "@swc/helpers/src/_get_prototype_of.mjs";
@ -28,16 +28,16 @@ foo(1, 2, "abc"), foo.apply(void 0, [
])), obj.foo.apply(obj, [
1,
2
].concat(_to_consumable_array(a))).foo(1, 2, "abc"), (_instance = obj.foo.apply(obj, [
].concat(_to_consumable_array(a))).foo(1, 2, "abc"), (_foo_apply = obj.foo.apply(obj, [
1,
2
].concat(_to_consumable_array(a)))).foo.apply(_instance, [
].concat(_to_consumable_array(a)))).foo.apply(_foo_apply, [
1,
2
].concat(_to_consumable_array(a))), (_instance1 = obj.foo.apply(obj, [
].concat(_to_consumable_array(a))), (_foo_apply1 = obj.foo.apply(obj, [
1,
2
].concat(_to_consumable_array(a)))).foo.apply(_instance1, [
].concat(_to_consumable_array(a)))).foo.apply(_foo_apply1, [
1,
2
].concat(_to_consumable_array(a), [
@ -53,29 +53,29 @@ foo(1, 2, "abc"), foo.apply(void 0, [
])), obj.foo.apply(obj, [
1,
2
].concat(_to_consumable_array(a))).foo(1, 2, "abc"), (_instance2 = obj.foo.apply(obj, [
].concat(_to_consumable_array(a))).foo(1, 2, "abc"), (_foo_apply2 = obj.foo.apply(obj, [
1,
2
].concat(_to_consumable_array(a)))).foo.apply(_instance2, [
].concat(_to_consumable_array(a)))).foo.apply(_foo_apply2, [
1,
2
].concat(_to_consumable_array(a))), (_instance3 = obj.foo.apply(obj, [
].concat(_to_consumable_array(a))), (_foo_apply3 = obj.foo.apply(obj, [
1,
2
].concat(_to_consumable_array(a)))).foo.apply(_instance3, [
].concat(_to_consumable_array(a)))).foo.apply(_foo_apply3, [
1,
2
].concat(_to_consumable_array(a), [
"abc"
])), xa[1].foo(1, 2, "abc"), (_instance4 = xa[1]).foo.apply(_instance4, [
])), xa[1].foo(1, 2, "abc"), (_xa_ = xa[1]).foo.apply(_xa_, [
1,
2
].concat(_to_consumable_array(a))), (_instance5 = xa[1]).foo.apply(_instance5, [
].concat(_to_consumable_array(a))), (_xa_1 = xa[1]).foo.apply(_xa_1, [
1,
2
].concat(_to_consumable_array(a), [
"abc"
])), (_instance6 = xa[1]).foo.apply(_instance6, [
])), (_xa_2 = xa[1]).foo.apply(_xa_2, [
1,
2,
"abc"

View File

@ -4,9 +4,9 @@ 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";
import React from "react";
var ResizablePanel = /*#__PURE__*/ function(_Component) {
var ResizablePanel = /*#__PURE__*/ function(_React_Component) {
"use strict";
_inherits(ResizablePanel, _Component);
_inherits(ResizablePanel, _React_Component);
var _super = _create_super(ResizablePanel);
function ResizablePanel() {
_class_call_check(this, ResizablePanel);

View File

@ -6,9 +6,9 @@ import _inherits from "@swc/helpers/src/_inherits.mjs";
import _create_super from "@swc/helpers/src/_create_super.mjs";
import _ts_generator from "@swc/helpers/src/_ts_generator.mjs";
import * as React from "react";
var AsyncLoader = /*#__PURE__*/ function(_Component) {
var AsyncLoader = /*#__PURE__*/ function(_React_Component) {
"use strict";
_inherits(AsyncLoader, _Component);
_inherits(AsyncLoader, _React_Component);
var _super = _create_super(AsyncLoader);
function AsyncLoader() {
_class_call_check(this, AsyncLoader);

View File

@ -7,9 +7,9 @@ var B;
(function(B) {
var a = A;
B.a = a;
var D = /*#__PURE__*/ function(_C) {
var D = /*#__PURE__*/ function(_a_C) {
"use strict";
_inherits(D, _C);
_inherits(D, _a_C);
var _super = _create_super(D);
function D() {
_class_call_check(this, D);

View File

@ -6,9 +6,9 @@ import _create_super from "@swc/helpers/src/_create_super.mjs";
!function(B) {
var a = A;
B.a = a;
var D = function(_C) {
var D = function(_a_C) {
"use strict";
_inherits(D, _C);
_inherits(D, _a_C);
var _super = _create_super(D);
function D() {
return _class_call_check(this, D), _super.apply(this, arguments);

View File

@ -13,9 +13,9 @@ var D0 = /*#__PURE__*/ function(Base1) {
}
return D0;
}(Base);
var D1 = /*#__PURE__*/ function(_superClass) {
var D1 = /*#__PURE__*/ function(_getBase) {
"use strict";
_inherits(D1, _superClass);
_inherits(D1, _getBase);
var _super = _create_super(D1);
function D1() {
_class_call_check(this, D1);
@ -27,9 +27,9 @@ var D1 = /*#__PURE__*/ function(_superClass) {
}
return D1;
}(getBase());
var D2 = /*#__PURE__*/ function(_superClass) {
var D2 = /*#__PURE__*/ function(_getBase) {
"use strict";
_inherits(D2, _superClass);
_inherits(D2, _getBase);
var _super = _create_super(D2);
function D2() {
_class_call_check(this, D2);
@ -42,9 +42,9 @@ var D2 = /*#__PURE__*/ function(_superClass) {
}
return D2;
}(getBase());
var D3 = /*#__PURE__*/ function(_superClass) {
var D3 = /*#__PURE__*/ function(_getBase) {
"use strict";
_inherits(D3, _superClass);
_inherits(D3, _getBase);
var _super = _create_super(D3);
function D3() {
_class_call_check(this, D3);
@ -57,9 +57,9 @@ var D3 = /*#__PURE__*/ function(_superClass) {
return D3;
}(getBase());
// Error, no constructors with three type arguments
var D4 = /*#__PURE__*/ function(_superClass) {
var D4 = /*#__PURE__*/ function(_getBase) {
"use strict";
_inherits(D4, _superClass);
_inherits(D4, _getBase);
var _super = _create_super(D4);
function D4() {
_class_call_check(this, D4);
@ -68,9 +68,9 @@ var D4 = /*#__PURE__*/ function(_superClass) {
return D4;
}(getBase());
// Error, constructor return types differ
var D5 = /*#__PURE__*/ function(_superClass) {
var D5 = /*#__PURE__*/ function(_getBadBase) {
"use strict";
_inherits(D5, _superClass);
_inherits(D5, _getBadBase);
var _super = _create_super(D5);
function D5() {
_class_call_check(this, D5);

View File

@ -46,9 +46,9 @@ var C4 = /*#__PURE__*/ function(_superClass) {
}
return C4;
}(42);
var C5 = /*#__PURE__*/ function(_superClass) {
var C5 = /*#__PURE__*/ function(_hello) {
"use strict";
_inherits(C5, _superClass);
_inherits(C5, _hello);
var _super = _create_super(C5);
function C5() {
_class_call_check(this, C5);

View File

@ -2,9 +2,9 @@
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";
var C = /*#__PURE__*/ function(_E) {
var C = /*#__PURE__*/ function(_N_E) {
"use strict";
_inherits(C, _E);
_inherits(C, _N_E);
var _super = _create_super(C);
function C() {
_class_call_check(this, C);
@ -29,9 +29,9 @@ var M;
})(M || (M = {}));
var N;
(function(N) {
var E = /*#__PURE__*/ function(_D) {
var E = /*#__PURE__*/ function(_M_D) {
"use strict";
_inherits(E, _D);
_inherits(E, _M_D);
var _super = _create_super(E);
function E() {
_class_call_check(this, E);
@ -43,9 +43,9 @@ var N;
})(N || (N = {}));
var O;
(function(O) {
var C2 = /*#__PURE__*/ function(_E2) {
var C2 = /*#__PURE__*/ function(_Q_E2) {
"use strict";
_inherits(C2, _E2);
_inherits(C2, _Q_E2);
var _super = _create_super(C2);
function C2() {
_class_call_check(this, C2);
@ -70,9 +70,9 @@ var O;
})(P || (P = {}));
var Q;
(function(Q) {
var E2 = /*#__PURE__*/ function(_D2) {
var E2 = /*#__PURE__*/ function(_P_D2) {
"use strict";
_inherits(E2, _D2);
_inherits(E2, _P_D2);
var _super = _create_super(E2);
function E2() {
_class_call_check(this, E2);

View File

@ -2,9 +2,9 @@
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";
var M, N, O, C = function(_E) {
var M, N, O, C = function(_N_E) {
"use strict";
_inherits(C, _E);
_inherits(C, _N_E);
var _super = _create_super(C);
function C() {
return _class_call_check(this, C), _super.apply(this, arguments);
@ -23,9 +23,9 @@ var M, N, O, C = function(_E) {
}(C);
M.D = D;
}(M || (M = {})), function(N) {
var E = function(_D) {
var E = function(_M_D) {
"use strict";
_inherits(E, _D);
_inherits(E, _M_D);
var _super = _create_super(E);
function E() {
return _class_call_check(this, E), _super.apply(this, arguments);
@ -34,9 +34,9 @@ var M, N, O, C = function(_E) {
}(M.D);
N.E = E;
}(N || (N = {})), function(O) {
var P, D2, Q, E2, P1, Q1, C2 = function(_E2) {
var P, D2, Q, E2, P1, Q1, C2 = function(_Q_E2) {
"use strict";
_inherits(C2, _E2);
_inherits(C2, _Q_E2);
var _super = _create_super(C2);
function C2() {
return _class_call_check(this, C2), _super.apply(this, arguments);
@ -51,9 +51,9 @@ var M, N, O, C = function(_E) {
return _class_call_check(this, D2), _super.apply(this, arguments);
}
return D2;
}(C2), P.D2 = D2, Q = Q1 || (Q1 = {}), E2 = function(_D2) {
}(C2), P.D2 = D2, Q = Q1 || (Q1 = {}), E2 = function(_P_D2) {
"use strict";
_inherits(E2, _D2);
_inherits(E2, _P_D2);
var _super = _create_super(E2);
function E2() {
return _class_call_check(this, E2), _super.apply(this, arguments);

View File

@ -13,7 +13,7 @@ var Base = /*#__PURE__*/ function() {
};
return Base;
}();
var tmp = super.bar();
var _super_bar = super.bar();
var C = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(C, Base);
@ -23,6 +23,6 @@ var C = /*#__PURE__*/ function(Base) {
return _super.apply(this, arguments);
}
var _proto = C.prototype;
_proto[tmp] = function() {};
_proto[_super_bar] = function() {};
return C;
}(Base);

View File

@ -4,9 +4,9 @@ class Base {
return 0;
}
}
let tmp = super.bar();
let _super_bar = super.bar();
class C extends Base {
// Gets emitted as super, not _super, which is consistent with
// use of super in static properties initializers.
[tmp]() {}
[_super_bar]() {}
}

View File

@ -14,7 +14,7 @@ var Base = /*#__PURE__*/ function() {
};
return Base;
}();
var tmp = _define_property({}, super.bar(), 1)[0];
var _ = _define_property({}, super.bar(), 1)[0];
var C = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(C, Base);
@ -24,6 +24,6 @@ var C = /*#__PURE__*/ function(Base) {
return _super.apply(this, arguments);
}
var _proto = C.prototype;
_proto[tmp] = function() {};
_proto[_] = function() {};
return C;
}(Base);

View File

@ -4,11 +4,11 @@ class Base {
return 0;
}
}
let tmp = {
let _ = {
[super.bar()]: 1
}[0];
class C extends Base {
// Gets emitted as super, not _super, which is consistent with
// use of super in static properties initializers.
[tmp]() {}
[_]() {}
}

View File

@ -6,7 +6,7 @@ var Base = function Base() {
"use strict";
_class_call_check(this, Base);
};
var tmp = (super(), "prop");
var _tmp = (super(), "prop");
var C = /*#__PURE__*/ function(Base) {
"use strict";
_inherits(C, Base);
@ -16,6 +16,6 @@ var C = /*#__PURE__*/ function(Base) {
return _super.apply(this, arguments);
}
var _proto = C.prototype;
_proto[tmp] = function() {};
_proto[_tmp] = function() {};
return C;
}(Base);

View File

@ -1,7 +1,7 @@
//// [computedPropertyNames27_ES6.ts]
class Base {
}
let tmp = (super(), "prop");
let _tmp = (super(), "prop");
class C extends Base {
[tmp]() {}
[_tmp]() {}
}

View File

@ -1,8 +1,8 @@
//// [contextuallyTypedBindingInitializer.ts]
function f(param) {
var _show = param.show, show = _show === void 0 ? function(v) {
var _param_show = param.show, show = _param_show === void 0 ? function(v) {
return v.toString();
} : _show;
} : _param_show;
}
function f2(param) {
var tmp = param["show"], showRename = tmp === void 0 ? function(v) {
@ -15,25 +15,25 @@ function f3(param) {
} : tmp;
}
function ff(param) {
var _nested = param.nested, nested = _nested === void 0 ? {
var _param_nested = param.nested, nested = _param_nested === void 0 ? {
show: function(v) {
return v.toString();
}
} : _nested;
} : _param_nested;
}
function g(param) {
var _prop = param.prop, prop = _prop === void 0 ? [
var _param_prop = param.prop, prop = _param_prop === void 0 ? [
"hello",
1234
] : _prop;
] : _param_prop;
}
function h(param) {
var _prop = param.prop, prop = _prop === void 0 ? "foo" : _prop;
var _param_prop = param.prop, prop = _param_prop === void 0 ? "foo" : _param_prop;
}
var ref = {
var _ref = {
stringIdentity: function(x) {
return x;
}
}, tmp = ref.stringIdentity, id = tmp === void 0 ? function(arg) {
}, tmp = _ref.stringIdentity, id = tmp === void 0 ? function(arg) {
return arg;
} : tmp;

View File

@ -21,19 +21,19 @@ function ff(param) {
}
} : tmp;
}
var ref = {
var _ref = {
stringIdentity: function(x) {
return x;
}
}, tmp = ref.stringIdentity, id = tmp === void 0 ? function(arg) {
}, tmp = _ref.stringIdentity, id = tmp === void 0 ? function(arg) {
return arg.length;
} : tmp;
function g(param) {
var _prop = param.prop, prop = _prop === void 0 ? [
var _param_prop = param.prop, prop = _param_prop === void 0 ? [
101,
1234
] : _prop;
] : _param_prop;
}
function h(param) {
var _prop = param.prop, prop = _prop === void 0 ? "baz" : _prop;
var _param_prop = param.prop, prop = _param_prop === void 0 ? "baz" : _param_prop;
}

View File

@ -68,23 +68,23 @@
q: 13
});
(function(param) {
var _p = param.p, p = _p === void 0 ? 14 : _p;
var _param_p = param.p, p = _param_p === void 0 ? 14 : _param_p;
return p;
})({
p: 15
});
(function() {
var ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
r: 18
}, _r = ref.r, r = _r === void 0 ? 17 : _r;
}, _ref_r = _ref.r, r = _ref_r === void 0 ? 17 : _ref_r;
return r;
})({
r: 19
});
(function() {
var ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
u: 23
}, _u = ref.u, u = _u === void 0 ? 22 : _u;
}, _ref_u = _ref.u, u = _ref_u === void 0 ? 22 : _ref_u;
return u;
})();
// contextually typed parameters.

View File

@ -21,17 +21,17 @@
}(), function(first) {
for(var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++)rest[_key - 1] = arguments[_key];
}(8, 9, 10), function() {
var ref = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {
var _ref = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {
r: 18
};
ref.r;
_ref.r;
}({
r: 19
}), function() {
var ref = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {
var _ref = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {
u: 23
};
ref.u;
_ref.u;
}(), function(o) {
o.a(11);
}({

View File

@ -68,23 +68,23 @@
q: 13
});
(function(param) {
var _p = param.p, p = _p === void 0 ? 14 : _p;
var _param_p = param.p, p = _param_p === void 0 ? 14 : _param_p;
return p;
})({
p: 15
});
(function() {
var ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
r: 18
}, _r = ref.r, r = _r === void 0 ? 17 : _r;
}, _ref_r = _ref.r, r = _ref_r === void 0 ? 17 : _ref_r;
return r;
})({
r: 19
});
(function() {
var ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
u: 23
}, _u = ref.u, u = _u === void 0 ? 22 : _u;
}, _ref_u = _ref.u, u = _ref_u === void 0 ? 22 : _ref_u;
return u;
})();
// contextually typed parameters.

View File

@ -21,17 +21,17 @@
}(), function(first) {
for(var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++)rest[_key - 1] = arguments[_key];
}(8, 9, 10), function() {
var ref = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {
var _ref = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {
r: 18
};
ref.r;
_ref.r;
}({
r: 19
}), function() {
var ref = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {
var _ref = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {
u: 23
};
ref.u;
_ref.u;
}(), function(o) {
o.a(11);
}({

View File

@ -10,9 +10,9 @@ function f2() {
x;
var y = "";
y;
var ref = [
var _ref = [
undefined
], tmp = ref[0], z = tmp === void 0 ? "" : tmp;
], tmp = _ref[0], z = tmp === void 0 ? "" : tmp;
z;
}
function f3() {
@ -20,9 +20,9 @@ function f3() {
x;
var y = "";
y;
var ref = [
var _ref = [
undefined
], tmp = ref[0], z = tmp === void 0 ? "" : tmp;
], tmp = _ref[0], z = tmp === void 0 ? "" : tmp;
z;
}
function f4() {
@ -34,9 +34,9 @@ function f4() {
y: ""
}.y;
y;
var ref = {
var _ref = {
z: undefined
}, _z = ref.z, z = _z === void 0 ? "" : _z;
}, _ref_z = _ref.z, z = _ref_z === void 0 ? "" : _ref_z;
z;
}
function f5() {
@ -48,9 +48,9 @@ function f5() {
y: ""
}.y;
y;
var ref = {
var _ref = {
z: undefined
}, _z = ref.z, z = _z === void 0 ? "" : _z;
}, _ref_z = _ref.z, z = _ref_z === void 0 ? "" : _ref_z;
z;
}
function f6() {
@ -58,7 +58,7 @@ function f6() {
x;
var y = {}.y;
y;
var ref = {}, _z = ref.z, z = _z === void 0 ? "" : _z;
var _ref = {}, _ref_z = _ref.z, z = _ref_z === void 0 ? "" : _ref_z;
z;
}
function f7() {

View File

@ -2,7 +2,7 @@
// assignments in shortcutting chain
import _instanceof from "@swc/helpers/src/_instanceof.mjs";
import _type_of from "@swc/helpers/src/_type_of.mjs";
var ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7, ref8;
var _o4_x, _o4_x1, _o5_x, _ref, _o5_x1, _o5_x2, _o5_x3, _ref1, _arr_i;
var a;
o === null || o === void 0 ? void 0 : o[a = 1];
a.toString();
@ -54,42 +54,42 @@ if ((o3 === null || o3 === void 0 ? void 0 : o3.x) === 1) {
o3;
o3 === null || o3 === void 0 ? void 0 : o3.x;
o3.x;
if ((ref = o4.x) === null || ref === void 0 ? void 0 : ref.y) {
var ref9;
if ((_o4_x = o4.x) === null || _o4_x === void 0 ? void 0 : _o4_x.y) {
var _o4_x2;
o4.x; // { y: boolean }
o4.x.y; // true
(ref9 = o4.x) === null || ref9 === void 0 ? void 0 : ref9.y; // true
(_o4_x2 = o4.x) === null || _o4_x2 === void 0 ? void 0 : _o4_x2.y; // true
} else {
var ref10;
var _o4_x3;
o4.x;
(ref10 = o4.x) === null || ref10 === void 0 ? void 0 : ref10.y;
(_o4_x3 = o4.x) === null || _o4_x3 === void 0 ? void 0 : _o4_x3.y;
o4.x.y;
}
o4.x;
(ref1 = o4.x) === null || ref1 === void 0 ? void 0 : ref1.y;
(_o4_x1 = o4.x) === null || _o4_x1 === void 0 ? void 0 : _o4_x1.y;
o4.x.y;
if ((ref3 = (ref2 = o5.x) === null || ref2 === void 0 ? void 0 : ref2.y.z) === null || ref3 === void 0 ? void 0 : ref3.w) {
var ref11, ref12, ref13, ref14;
if ((_ref = (_o5_x = o5.x) === null || _o5_x === void 0 ? void 0 : _o5_x.y.z) === null || _ref === void 0 ? void 0 : _ref.w) {
var _o5_x_y_z, _o5_x4, _o5_x5, _ref2;
o5.x;
o5.x.y;
o5.x.y.z;
o5.x.y.z.w; // true
(ref11 = o5.x.y.z) === null || ref11 === void 0 ? void 0 : ref11.w; // true
(ref12 = o5.x) === null || ref12 === void 0 ? void 0 : ref12.y.z.w; // true
(ref14 = (ref13 = o5.x) === null || ref13 === void 0 ? void 0 : ref13.y.z) === null || ref14 === void 0 ? void 0 : ref14.w; // true
(_o5_x_y_z = o5.x.y.z) === null || _o5_x_y_z === void 0 ? void 0 : _o5_x_y_z.w; // true
(_o5_x4 = o5.x) === null || _o5_x4 === void 0 ? void 0 : _o5_x4.y.z.w; // true
(_ref2 = (_o5_x5 = o5.x) === null || _o5_x5 === void 0 ? void 0 : _o5_x5.y.z) === null || _ref2 === void 0 ? void 0 : _ref2.w; // true
} else {
var ref15, ref16, ref17, ref18;
var _o5_x6, _o5_x7, _o5_x8, _ref3;
o5.x;
(ref15 = o5.x) === null || ref15 === void 0 ? void 0 : ref15.y;
(ref16 = o5.x) === null || ref16 === void 0 ? void 0 : ref16.y.z;
(ref18 = (ref17 = o5.x) === null || ref17 === void 0 ? void 0 : ref17.y.z) === null || ref18 === void 0 ? void 0 : ref18.w;
(_o5_x6 = o5.x) === null || _o5_x6 === void 0 ? void 0 : _o5_x6.y;
(_o5_x7 = o5.x) === null || _o5_x7 === void 0 ? void 0 : _o5_x7.y.z;
(_ref3 = (_o5_x8 = o5.x) === null || _o5_x8 === void 0 ? void 0 : _o5_x8.y.z) === null || _ref3 === void 0 ? void 0 : _ref3.w;
o5.x.y;
o5.x.y.z.w;
}
o5.x;
(ref4 = o5.x) === null || ref4 === void 0 ? void 0 : ref4.y;
(ref5 = o5.x) === null || ref5 === void 0 ? void 0 : ref5.y.z;
(ref7 = (ref6 = o5.x) === null || ref6 === void 0 ? void 0 : ref6.y.z) === null || ref7 === void 0 ? void 0 : ref7.w;
(_o5_x1 = o5.x) === null || _o5_x1 === void 0 ? void 0 : _o5_x1.y;
(_o5_x2 = o5.x) === null || _o5_x2 === void 0 ? void 0 : _o5_x2.y.z;
(_ref1 = (_o5_x3 = o5.x) === null || _o5_x3 === void 0 ? void 0 : _o5_x3.y.z) === null || _ref1 === void 0 ? void 0 : _ref1.w;
o5.x.y;
o5.x.y.z.w;
if (o6 === null || o6 === void 0 ? void 0 : o6.f()) {
@ -452,8 +452,8 @@ function getArea(shape) {
}
}
function extractCoordinates(f1) {
var ref;
if (((ref = f1.geometry) === null || ref === void 0 ? void 0 : ref.type) !== "test") {
var _f_geometry;
if (((_f_geometry = f1.geometry) === null || _f_geometry === void 0 ? void 0 : _f_geometry.type) !== "test") {
return [];
}
return f1.geometry.coordinates;
@ -473,10 +473,10 @@ someFunction(someObject);
someFunction(undefined);
// Repro from #35970
var i = 0;
while(((ref8 = arr[i]) === null || ref8 === void 0 ? void 0 : ref8.tag) === "left"){
var ref19;
while(((_arr_i = arr[i]) === null || _arr_i === void 0 ? void 0 : _arr_i.tag) === "left"){
var _arr_i1;
i += 1;
if (((ref19 = arr[i]) === null || ref19 === void 0 ? void 0 : ref19.tag) === "right") {
if (((_arr_i1 = arr[i]) === null || _arr_i1 === void 0 ? void 0 : _arr_i1.tag) === "right") {
console.log("I should ALSO be reachable");
}
}

View File

@ -2,7 +2,7 @@
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 === (ref = o4.x) || void 0 === ref ? void 0 : ref.y) ? (o4.x, o4.x.y, null === (ref9 = o4.x) || void 0 === ref9 || ref9.y) : (o4.x, null === (ref10 = o4.x) || void 0 === ref10 || ref10.y, o4.x.y), o4.x, null === (ref1 = o4.x) || void 0 === ref1 || ref1.y, o4.x.y, (null === (ref3 = null === (ref2 = o5.x) || void 0 === ref2 ? void 0 : ref2.y.z) || void 0 === ref3 ? void 0 : ref3.w) ? (o5.x, o5.x.y, o5.x.y.z, o5.x.y.z.w, null === (ref11 = o5.x.y.z) || void 0 === ref11 || ref11.w, null === (ref12 = o5.x) || void 0 === ref12 || ref12.y.z.w, null === (ref14 = null === (ref13 = o5.x) || void 0 === ref13 ? void 0 : ref13.y.z) || void 0 === ref14 || ref14.w) : (o5.x, null === (ref15 = o5.x) || void 0 === ref15 || ref15.y, null === (ref16 = o5.x) || void 0 === ref16 || ref16.y.z, null === (ref18 = null === (ref17 = o5.x) || void 0 === ref17 ? void 0 : ref17.y.z) || void 0 === ref18 || ref18.w, o5.x.y, o5.x.y.z.w), o5.x, null === (ref4 = o5.x) || void 0 === ref4 || ref4.y, null === (ref5 = o5.x) || void 0 === ref5 || ref5.y.z, null === (ref7 = null === (ref6 = o5.x) || void 0 === ref6 ? void 0 : ref6.y.z) || void 0 === ref7 || ref7.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), 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 === (_ref = null === (_o5_x = o5.x) || void 0 === _o5_x ? void 0 : _o5_x.y.z) || void 0 === _ref ? void 0 : _ref.w) ? (o5.x, o5.x.y, o5.x.y.z, o5.x.y.z.w, null === (_o5_x_y_z = o5.x.y.z) || void 0 === _o5_x_y_z || _o5_x_y_z.w, null === (_o5_x4 = o5.x) || void 0 === _o5_x4 || _o5_x4.y.z.w, null === (_ref2 = null === (_o5_x5 = o5.x) || void 0 === _o5_x5 ? void 0 : _o5_x5.y.z) || void 0 === _ref2 || _ref2.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 === (_ref3 = null === (_o5_x8 = o5.x) || void 0 === _o5_x8 ? void 0 : _o5_x8.y.z) || void 0 === _ref3 || _ref3.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 === (_ref1 = null === (_o5_x3 = o5.x) || void 0 === _o5_x3 ? void 0 : _o5_x3.y.z) || void 0 === _ref1 || _ref1.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({
someProperty: 42
}), someFunction(void 0);
for(var ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7, ref8, a, b, c, d, ref9, ref10, ref11, ref12, ref13, ref14, ref15, ref16, ref17, ref18, lastSomeProperty, ref19, i = 0; (null === (ref8 = arr[i]) || void 0 === ref8 ? void 0 : ref8.tag) === "left";)i += 1, (null === (ref19 = arr[i]) || void 0 === ref19 ? void 0 : ref19.tag) === "right" && console.log("I should ALSO be reachable");
for(var _o4_x, _o4_x1, _o5_x, _ref, _o5_x1, _o5_x2, _o5_x3, _ref1, _arr_i, a, b, c, d, _o4_x2, _o4_x3, _o5_x_y_z, _o5_x4, _o5_x5, _ref2, _o5_x6, _o5_x7, _o5_x8, _ref3, 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

@ -3,19 +3,19 @@ import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
import _throw from "@swc/helpers/src/_throw.mjs";
import _to_array from "@swc/helpers/src/_to_array.mjs";
function f0() {
var ref = [
var _ref = [
1,
"hello"
];
var ref1 = [
var _ref1 = [
1,
"hello"
], x = ref1[0];
], x = _ref1[0];
var x = 1, y = "hello";
var ref2 = [
var _ref2 = [
1,
"hello"
], x = ref2[0], y = ref2[1], z = ref2[2];
], x = _ref2[0], y = _ref2[1], z = _ref2[2];
var x = 2;
var x;
var y;
@ -33,10 +33,10 @@ function f1() {
var z;
}
function f2() {
var ref = {
var _ref = {
x: 5,
y: "hello"
}, ref = ref !== null ? ref : _throw(new TypeError("Cannot destructure undefined")); // Ok, empty binding pattern means nothing
}, _ref = _ref !== null ? _ref : _throw(new TypeError("Cannot destructure undefined")); // Ok, empty binding pattern means nothing
var x = {
x: 5,
y: "hello"
@ -45,24 +45,24 @@ function f2() {
x: 5,
y: "hello"
}.y; // Error, no x in target
var ref1 = {
var _ref1 = {
x: 5,
y: "hello"
}, x = ref1.x, y = ref1.y;
}, x = _ref1.x, y = _ref1.y;
var x;
var y;
var ref2 = {
var _ref2 = {
x: 5,
y: "hello"
}, a = ref2.x; // Error, no y in target
var ref3 = {
}, a = _ref2.x; // Error, no y in target
var _ref3 = {
x: 5,
y: "hello"
}, b = ref3.y; // Error, no x in target
var ref4 = {
}, b = _ref3.y; // Error, no x in target
var _ref4 = {
x: 5,
y: "hello"
}, a = ref4.x, b = ref4.y;
}, a = _ref4.x, b = _ref4.y;
var a;
var b;
}
@ -73,7 +73,7 @@ function f3() {
var z;
}
function f4() {
var ref = {
var _ref = {
a: 1,
b: {
a: "hello",
@ -81,7 +81,7 @@ function f4() {
a: true
}
}
}, x = ref.a, _b = ref.b, y = _b.a, _b1 = _b.b, z = _b1.a;
}, x = _ref.a, _ref_b = _ref.b, y = _ref_b.a, _ref_b_b = _ref_b.b, z = _ref_b_b.a;
var x;
var y;
var z;
@ -97,40 +97,40 @@ function f7() {
var y;
}
function f8() {
var ref = [], a = ref[0], b = ref[1], c = ref[2]; // Error, [] is an empty tuple
var ref1 = [
var _ref = [], a = _ref[0], b = _ref[1], c = _ref[2]; // Error, [] is an empty tuple
var _ref1 = [
1
], d = ref1[0], e = ref1[1], f = ref1[2]; // Error, [1] is a tuple
], d = _ref1[0], e = _ref1[1], f = _ref1[2]; // Error, [1] is a tuple
}
function f9() {
var ref = _sliced_to_array({}, 2), a = ref[0], b = ref[1]; // Error, not array type
var ref1 = _sliced_to_array({
var _ref = _sliced_to_array({}, 2), a = _ref[0], b = _ref[1]; // Error, not array type
var _ref1 = _sliced_to_array({
0: 10,
1: 20
}, 2), c = ref1[0], d = ref1[1]; // Error, not array type
}, 2), c = _ref1[0], d = _ref1[1]; // Error, not array type
var e = 10, f = 20;
}
function f10() {
var ref = {}, a = ref.a, b = ref.b; // Error
var ref1 = [], a = ref1.a, b = ref1.b; // Error
var _ref = {}, a = _ref.a, b = _ref.b; // Error
var _ref1 = [], a = _ref1.a, b = _ref1.b; // Error
}
function f11() {
var ref = {
var _ref = {
x: 10,
y: "hello"
}, a = ref.x, b = ref.y;
var ref1 = {
}, a = _ref.x, b = _ref.y;
var _ref1 = {
0: 10,
1: "hello"
}, a = ref1[0], b = ref1[1];
var ref2 = {
}, a = _ref1[0], b = _ref1[1];
var _ref2 = {
"<": 10,
">": "hello"
}, a = ref2["<"], b = ref2[">"];
var ref3 = [
}, a = _ref2["<"], b = _ref2[">"];
var _ref3 = [
10,
"hello"
], a = ref3[0], b = ref3[1];
], a = _ref3[0], b = _ref3[1];
var a;
var b;
}
@ -141,13 +141,13 @@ function f12() {
x: 5,
y: true
}
], ref = _sliced_to_array(tmp === void 0 ? [
], _ref = _sliced_to_array(tmp === void 0 ? [
"abc",
{
x: 10,
y: false
}
] : tmp, 2), b = ref[0], ref1 = ref[1], x = ref1.x, c = ref1.y;
] : tmp, 2), b = _ref[0], _ref_ = _ref[1], x = _ref_.x, c = _ref_.y;
var a;
var b;
var x;
@ -155,7 +155,7 @@ function f12() {
}
function f13() {
var x = 1, y = "hello";
var ref = [
var _ref = [
[
x,
y
@ -164,10 +164,10 @@ function f13() {
x: x,
y: y
}
], a = ref[0], b = ref[1];
], a = _ref[0], b = _ref[1];
}
function f14(param) {
var _param = _sliced_to_array(param, 2), tmp = _param[0], a = tmp === void 0 ? 1 : tmp, ref = _sliced_to_array(_param[1], 2), tmp1 = ref[0], b = tmp1 === void 0 ? "hello" : tmp1, ref1 = ref[1], x = ref1.x, tmp2 = ref1.y, c = tmp2 === void 0 ? false : tmp2;
var _param = _sliced_to_array(param, 2), tmp = _param[0], a = tmp === void 0 ? 1 : tmp, _param_ = _sliced_to_array(_param[1], 2), tmp1 = _param_[0], b = tmp1 === void 0 ? "hello" : tmp1, _param__ = _param_[1], x = _param__.x, tmp2 = _param__.y, c = tmp2 === void 0 ? false : tmp2;
var a;
var b;
var c;
@ -215,10 +215,10 @@ function f15() {
};
}
function f16() {
var ref = f15(), a = ref.a, b = ref.b, c = ref.c;
var _f15 = f15(), a = _f15.a, b = _f15.b, c = _f15.c;
}
function f17(param) {
var _a = param.a, a = _a === void 0 ? "" : _a, _b = param.b, b = _b === void 0 ? 0 : _b, _c = param.c, c = _c === void 0 ? false : _c;
var _param_a = param.a, a = _param_a === void 0 ? "" : _param_a, _param_b = param.b, b = _param_b === void 0 ? 0 : _param_b, _param_c = param.c, c = _param_c === void 0 ? false : _param_c;
}
f17({});
f17({

View File

@ -2,8 +2,8 @@
var M;
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
function f14(param) {
var _param = _sliced_to_array(param, 2), ref = (_param[0], _sliced_to_array(_param[1], 2)), ref1 = (ref[0], ref[1]);
ref1.x, ref1.y;
var _param = _sliced_to_array(param, 2), _param_ = (_param[0], _sliced_to_array(_param[1], 2)), _param__ = (_param_[0], _param_[1]);
_param__.x, _param__.y;
}
function f17(param) {
param.a, param.b, param.c;

View File

@ -7,7 +7,7 @@ import _inherits from "@swc/helpers/src/_inherits.mjs";
import _create_super from "@swc/helpers/src/_create_super.mjs";
var x = "p";
var _x = x;
var __x = _x;
var _x1 = _x;
var A = /*#__PURE__*/ function() {
"use strict";
function A(y) {
@ -16,7 +16,7 @@ var A = /*#__PURE__*/ function() {
_define_property(this, "b", void 0);
_define_property(this, "c", void 0);
_define_property(this, "computed", void 0);
_define_property(this, __x, void 0);
_define_property(this, _x1, void 0);
_define_property(this, "z", void 0);
_define_property(this, "y", void 0);
this.y = y;

View File

@ -1,15 +1,15 @@
//// [deleteChain.ts]
var ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7, ref8, ref9, ref10, ref11, ref12, ref13, ref14, ref15;
var _o3_b, _o3_b1, _o4_b, _ref, _o4_b1, _ref1, _o4_b2, _ref2, _o5_b, _ref3, _o5_b1, _ref4, _o6_b, _ref5, _o6_b1, _ref6;
o1 === null || o1 === void 0 ? void 0 : delete o1.b;
delete (o1 === null || o1 === void 0 ? void 0 : o1.b);
o2 === null || o2 === void 0 ? void 0 : delete o2.b.c;
o2 === null || o2 === void 0 ? void 0 : delete o2.b.c;
(ref = o3.b) === null || ref === void 0 ? void 0 : delete ref.c;
delete ((ref1 = o3.b) === null || ref1 === void 0 ? void 0 : ref1.c);
(ref3 = (ref2 = o4.b) === null || ref2 === void 0 ? void 0 : ref2.c.d) === null || ref3 === void 0 ? void 0 : delete ref3.e;
(ref5 = (ref4 = o4.b) === null || ref4 === void 0 ? void 0 : ref4.c.d) === null || ref5 === void 0 ? void 0 : delete ref5.e;
delete ((ref7 = (ref6 = o4.b) === null || ref6 === void 0 ? void 0 : ref6.c.d) === null || ref7 === void 0 ? void 0 : ref7.e);
(ref9 = (ref8 = o5.b) === null || ref8 === void 0 ? void 0 : ref8.call(o5).c.d) === null || ref9 === void 0 ? void 0 : delete ref9.e;
delete ((ref11 = (ref10 = o5.b) === null || ref10 === void 0 ? void 0 : ref10.call(o5).c.d) === null || ref11 === void 0 ? void 0 : ref11.e);
(ref13 = (ref12 = o6.b) === null || ref12 === void 0 ? void 0 : ref12["c"].d) === null || ref13 === void 0 ? void 0 : delete ref13["e"];
delete ((ref15 = (ref14 = o6.b) === null || ref14 === void 0 ? void 0 : ref14["c"].d) === null || ref15 === void 0 ? void 0 : ref15["e"]);
(_o3_b = o3.b) === null || _o3_b === void 0 ? void 0 : delete _o3_b.c;
delete ((_o3_b1 = o3.b) === null || _o3_b1 === void 0 ? void 0 : _o3_b1.c);
(_ref = (_o4_b = o4.b) === null || _o4_b === void 0 ? void 0 : _o4_b.c.d) === null || _ref === void 0 ? void 0 : delete _ref.e;
(_ref1 = (_o4_b1 = o4.b) === null || _o4_b1 === void 0 ? void 0 : _o4_b1.c.d) === null || _ref1 === void 0 ? void 0 : delete _ref1.e;
delete ((_ref2 = (_o4_b2 = o4.b) === null || _o4_b2 === void 0 ? void 0 : _o4_b2.c.d) === null || _ref2 === void 0 ? void 0 : _ref2.e);
(_ref3 = (_o5_b = o5.b) === null || _o5_b === void 0 ? void 0 : _o5_b.call(o5).c.d) === null || _ref3 === void 0 ? void 0 : delete _ref3.e;
delete ((_ref4 = (_o5_b1 = o5.b) === null || _o5_b1 === void 0 ? void 0 : _o5_b1.call(o5).c.d) === null || _ref4 === void 0 ? void 0 : _ref4.e);
(_ref5 = (_o6_b = o6.b) === null || _o6_b === void 0 ? void 0 : _o6_b["c"].d) === null || _ref5 === void 0 ? void 0 : delete _ref5["e"];
delete ((_ref6 = (_o6_b1 = o6.b) === null || _o6_b1 === void 0 ? void 0 : _o6_b1["c"].d) === null || _ref6 === void 0 ? void 0 : _ref6["e"]);

View File

@ -1,3 +1,3 @@
//// [deleteChain.ts]
var ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7, ref8, ref9, ref10, ref11, ref12, ref13, ref14, ref15;
null == o1 || delete o1.b, delete (null == o1 ? void 0 : o1.b), null == o2 || delete o2.b.c, null == o2 || delete o2.b.c, null === (ref = o3.b) || void 0 === ref || delete ref.c, delete (null === (ref1 = o3.b) || void 0 === ref1 ? void 0 : ref1.c), null === (ref3 = null === (ref2 = o4.b) || void 0 === ref2 ? void 0 : ref2.c.d) || void 0 === ref3 || delete ref3.e, null === (ref5 = null === (ref4 = o4.b) || void 0 === ref4 ? void 0 : ref4.c.d) || void 0 === ref5 || delete ref5.e, delete (null === (ref7 = null === (ref6 = o4.b) || void 0 === ref6 ? void 0 : ref6.c.d) || void 0 === ref7 ? void 0 : ref7.e), null === (ref9 = null === (ref8 = o5.b) || void 0 === ref8 ? void 0 : ref8.call(o5).c.d) || void 0 === ref9 || delete ref9.e, delete (null === (ref11 = null === (ref10 = o5.b) || void 0 === ref10 ? void 0 : ref10.call(o5).c.d) || void 0 === ref11 ? void 0 : ref11.e), null === (ref13 = null === (ref12 = o6.b) || void 0 === ref12 ? void 0 : ref12.c.d) || void 0 === ref13 || delete ref13.e, delete (null === (ref15 = null === (ref14 = o6.b) || void 0 === ref14 ? void 0 : ref14.c.d) || void 0 === ref15 ? void 0 : ref15.e);
var _o3_b, _o3_b1, _o4_b, _ref, _o4_b1, _ref1, _o4_b2, _ref2, _o5_b, _ref3, _o5_b1, _ref4, _o6_b, _ref5, _o6_b1, _ref6;
null == o1 || delete o1.b, delete (null == o1 ? void 0 : o1.b), null == o2 || delete o2.b.c, null == o2 || delete o2.b.c, null === (_o3_b = o3.b) || void 0 === _o3_b || delete _o3_b.c, delete (null === (_o3_b1 = o3.b) || void 0 === _o3_b1 ? void 0 : _o3_b1.c), null === (_ref = null === (_o4_b = o4.b) || void 0 === _o4_b ? void 0 : _o4_b.c.d) || void 0 === _ref || delete _ref.e, null === (_ref1 = null === (_o4_b1 = o4.b) || void 0 === _o4_b1 ? void 0 : _o4_b1.c.d) || void 0 === _ref1 || delete _ref1.e, delete (null === (_ref2 = null === (_o4_b2 = o4.b) || void 0 === _o4_b2 ? void 0 : _o4_b2.c.d) || void 0 === _ref2 ? void 0 : _ref2.e), null === (_ref3 = null === (_o5_b = o5.b) || void 0 === _o5_b ? void 0 : _o5_b.call(o5).c.d) || void 0 === _ref3 || delete _ref3.e, delete (null === (_ref4 = null === (_o5_b1 = o5.b) || void 0 === _o5_b1 ? void 0 : _o5_b1.call(o5).c.d) || void 0 === _ref4 ? void 0 : _ref4.e), null === (_ref5 = null === (_o6_b = o6.b) || void 0 === _o6_b ? void 0 : _o6_b.c.d) || void 0 === _ref5 || delete _ref5.e, delete (null === (_ref6 = null === (_o6_b1 = o6.b) || void 0 === _o6_b1 ? void 0 : _o6_b1.c.d) || void 0 === _ref6 ? void 0 : _ref6.e);

View File

@ -348,8 +348,8 @@ var DerivedWithClassDeclarationExtendingMember = /*#__PURE__*/ function(Base) {
function DerivedWithClassDeclarationExtendingMember() {
_class_call_check(this, DerivedWithClassDeclarationExtendingMember);
var _this;
var InnerClass = /*#__PURE__*/ function(_memberClass) {
_inherits(InnerClass, _memberClass);
var InnerClass = /*#__PURE__*/ function(_this_memberClass) {
_inherits(InnerClass, _this_memberClass);
var _super = _create_super(InnerClass);
function InnerClass() {
_class_call_check(this, InnerClass);
@ -407,8 +407,8 @@ var DerivedWithClassExpressionExtendingMember = /*#__PURE__*/ function(Base) {
function DerivedWithClassExpressionExtendingMember() {
_class_call_check(this, DerivedWithClassExpressionExtendingMember);
var _this;
console.log(/*#__PURE__*/ function(_memberClass) {
_inherits(_class, _memberClass);
console.log(/*#__PURE__*/ function(_this_memberClass) {
_inherits(_class, _this_memberClass);
var _super = _create_super(_class);
function _class() {
_class_call_check(this, _class);

View File

@ -35,23 +35,23 @@ function foo() {
3
];
}
var ref = _sliced_to_array(foo(), 2), b6 = ref[0], b7 = ref[1];
var ref1 = _to_array(foo()), b8 = ref1.slice(0);
var _foo = _sliced_to_array(foo(), 2), b6 = _foo[0], b7 = _foo[1];
var _foo1 = _to_array(foo()), b8 = _foo1.slice(0);
// S is not a tuple- like type and the numeric index signature type of S is assignable to the target given in E.
var temp = [
1,
2,
3
];
var ref2 = _sliced_to_array(_to_consumable_array(temp), 2), c0 = ref2[0], c1 = ref2[1];
var ref3 = [], c2 = ref3[0];
var ref4 = [], c3 = ref4[0], ref5 = [], c4 = ref5[0];
var _$_to_consumable_array = _sliced_to_array(_to_consumable_array(temp), 2), c0 = _$_to_consumable_array[0], c1 = _$_to_consumable_array[1];
var _ref = [], c2 = _ref[0];
var _ref1 = [], c3 = _ref1[0], _ref2 = [], c4 = _ref2[0];
var c5 = 1, c6 = true;
var ref6 = [
var _ref3 = [
1,
2,
3
], c7 = ref6[1];
], c7 = _ref3[1];
var c8 = 4;
var c9 = 4;
var c10 = [

View File

@ -6,19 +6,19 @@ var _undefined = _sliced_to_array(void 0, 2);
_undefined[0], _undefined[1];
var _undefined1 = _sliced_to_array(void 0, 2);
_undefined1[0], _undefined1[1];
var ref = _sliced_to_array([
var _foo = _sliced_to_array([
1,
2,
3
], 2);
ref[0], ref[1], _to_array([
_foo[0], _foo[1], _to_array([
1,
2,
3
]).slice(0);
var ref1 = _sliced_to_array(_to_consumable_array([
var _$_to_consumable_array = _sliced_to_array(_to_consumable_array([
1,
2,
3
]), 2);
ref1[0], ref1[1];
_$_to_consumable_array[0], _$_to_consumable_array[1];

View File

@ -35,23 +35,23 @@ function foo() {
3
];
}
var ref = _sliced_to_array(foo(), 2), b6 = ref[0], b7 = ref[1];
var ref1 = _to_array(foo()), b8 = ref1.slice(0);
var _foo = _sliced_to_array(foo(), 2), b6 = _foo[0], b7 = _foo[1];
var _foo1 = _to_array(foo()), b8 = _foo1.slice(0);
// S is not a tuple- like type and the numeric index signature type of S is assignable to the target given in E.
var temp = [
1,
2,
3
];
var ref2 = _sliced_to_array(_to_consumable_array(temp), 2), c0 = ref2[0], c1 = ref2[1];
var ref3 = [], c2 = ref3[0];
var ref4 = [], c3 = ref4[0], ref5 = [], c4 = ref5[0];
var _$_to_consumable_array = _sliced_to_array(_to_consumable_array(temp), 2), c0 = _$_to_consumable_array[0], c1 = _$_to_consumable_array[1];
var _ref = [], c2 = _ref[0];
var _ref1 = [], c3 = _ref1[0], _ref2 = [], c4 = _ref2[0];
var c5 = 1, c6 = true;
var ref6 = [
var _ref3 = [
1,
2,
3
], c7 = ref6[1];
], c7 = _ref3[1];
var c8 = 4;
var c9 = 4;
var c10 = [

View File

@ -6,19 +6,19 @@ var _undefined = _sliced_to_array(void 0, 2);
_undefined[0], _undefined[1];
var _undefined1 = _sliced_to_array(void 0, 2);
_undefined1[0], _undefined1[1];
var ref = _sliced_to_array([
var _foo = _sliced_to_array([
1,
2,
3
], 2);
ref[0], ref[1], _to_array([
_foo[0], _foo[1], _to_array([
1,
2,
3
]).slice(0);
var ref1 = _sliced_to_array(_to_consumable_array([
var _$_to_consumable_array = _sliced_to_array(_to_consumable_array([
1,
2,
3
]), 2);
ref1[0], ref1[1];
_$_to_consumable_array[0], _$_to_consumable_array[1];

View File

@ -3,10 +3,10 @@
// S is the type Any, or
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 // Error
= [], ref1 = _sliced_to_array(ref[0], 1), a0 = ref1[0], ref2 = _sliced_to_array(ref[1], 1), ref3 = _sliced_to_array(ref2[0], 1), a1 = ref3[0];
var _ref // Error
= [], _ref_ = _sliced_to_array(_ref[0], 1), a0 = _ref_[0], _ref_1 = _sliced_to_array(_ref[1], 1), _ref__ = _sliced_to_array(_ref_1[0], 1), a1 = _ref__[0];
var _undefined // Error
= _sliced_to_array(undefined, 2), ref4 = _sliced_to_array(_undefined[0], 1), a2 = ref4[0], ref5 = _sliced_to_array(_undefined[1], 1), ref6 = _sliced_to_array(ref5[0], 1), a3 = ref6[0];
= _sliced_to_array(undefined, 2), _undefined_ = _sliced_to_array(_undefined[0], 1), a2 = _undefined_[0], _undefined_1 = _sliced_to_array(_undefined[1], 1), _undefined__ = _sliced_to_array(_undefined_1[0], 1), a3 = _undefined__[0];
// V is an array assignment pattern, S is the type Any or an array-like type (section 3.3.2), and, for each assignment element E in V,
// S is a tuple- like type (section 3.3.3) with a property named N of a type that is assignable to the target given in E,
// where N is the numeric index of E in the array assignment pattern, or
@ -18,7 +18,7 @@ function bar() {
3
];
}
var ref7 = _sliced_to_array(bar(), 3), tmp = ref7[0], b3 = tmp === void 0 ? "string" : tmp, b4 = ref7[1], b5 = ref7[2]; // Error
var _bar = _sliced_to_array(bar(), 3), tmp = _bar[0], b3 = tmp === void 0 ? "string" : tmp, b4 = _bar[1], b5 = _bar[2]; // Error
// V is an array assignment pattern, S is the type Any or an array-like type (section 3.3.2), and, for each assignment element E in V,
// S is not a tuple- like type and the numeric index signature type of S is assignable to the target given in E.
var temp = [
@ -26,11 +26,11 @@ var temp = [
2,
3
];
var ref8 = _sliced_to_array(_to_consumable_array(temp), 2), c0 = ref8[0], c1 = ref8[1]; // Error
var ref9 = _sliced_to_array(_to_consumable_array(temp), 2), c2 = ref9[0], c3 = ref9[1]; // Error
var _$_to_consumable_array = _sliced_to_array(_to_consumable_array(temp), 2), c0 = _$_to_consumable_array[0], c1 = _$_to_consumable_array[1]; // Error
var _$_to_consumable_array1 = _sliced_to_array(_to_consumable_array(temp), 2), c2 = _$_to_consumable_array1[0], c3 = _$_to_consumable_array1[1]; // Error
function foo(idx) {
return {
2: true
};
}
var ref10 = _sliced_to_array(foo(1), 3), c4 = ref10[0], c5 = ref10[1], c6 = ref10[2]; // Error
var _foo = _sliced_to_array(foo(1), 3), c4 = _foo[0], c5 = _foo[1], c6 = _foo[2]; // Error

View File

@ -1,25 +1,25 @@
//// [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), ref1 = (_sliced_to_array(_undefined[0], 1)[0], _sliced_to_array(_undefined[1], 1));
_sliced_to_array(ref1[0], 1)[0];
var ref2 = _sliced_to_array([
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 _bar = _sliced_to_array([
1,
2,
3
], 3);
ref2[0], ref2[1], ref2[2];
_bar[0], _bar[1], _bar[2];
var temp = [
1,
2,
3
], ref3 = _sliced_to_array(_to_consumable_array(temp), 2);
ref3[0], ref3[1];
var ref4 = _sliced_to_array(_to_consumable_array(temp), 2);
ref4[0], ref4[1];
var ref5 = _sliced_to_array({
], _$_to_consumable_array = _sliced_to_array(_to_consumable_array(temp), 2);
_$_to_consumable_array[0], _$_to_consumable_array[1];
var _$_to_consumable_array1 = _sliced_to_array(_to_consumable_array(temp), 2);
_$_to_consumable_array1[0], _$_to_consumable_array1[1];
var _foo = _sliced_to_array({
2: !0
}, 3);
ref5[0], ref5[1], ref5[2];
_foo[0], _foo[1], _foo[2];

View File

@ -1,14 +1,14 @@
//// [destructuringArrayBindingPatternAndAssignment3.ts]
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
var ref = [
var _ref = [
1
], a = ref[0], tmp = ref[1], b = tmp === void 0 ? a : tmp; // ok
var ref1 = [
], a = _ref[0], tmp = _ref[1], b = tmp === void 0 ? a : tmp; // ok
var _ref1 = [
1
], c = ref1[0], tmp1 = ref1[1], d = tmp1 === void 0 ? c : tmp1, tmp2 = ref1[2], e = tmp2 === void 0 ? e : tmp2; // error for e = e
var ref2 = [
], c = _ref1[0], tmp1 = _ref1[1], d = tmp1 === void 0 ? c : tmp1, tmp2 = _ref1[2], e = tmp2 === void 0 ? e : tmp2; // error for e = e
var _ref2 = [
1
], f = ref2[0], tmp3 = ref2[1], g = tmp3 === void 0 ? f : tmp3, tmp4 = ref2[2], h = tmp4 === void 0 ? i : tmp4, tmp5 = ref2[3], i = tmp5 === void 0 ? f : tmp5; // error for h = i
], f = _ref2[0], tmp3 = _ref2[1], g = tmp3 === void 0 ? f : tmp3, tmp4 = _ref2[2], h = tmp4 === void 0 ? i : tmp4, tmp5 = _ref2[3], i = tmp5 === void 0 ? f : tmp5; // error for h = i
(function(param) {
var _param = _sliced_to_array(param, 2), a = _param[0], tmp = _param[1], b = tmp === void 0 ? a : tmp;
})([

View File

@ -1,7 +1,7 @@
//// [destructuringAssignabilityCheck.ts]
import _sliced_to_array from "@swc/helpers/src/_sliced_to_array.mjs";
import _throw from "@swc/helpers/src/_throw.mjs";
var ref = _sliced_to_array({}, 0); // should be error
var _ref = _sliced_to_array({}, 0); // should be error
var undefined = undefined !== null ? undefined : _throw(new TypeError("Cannot destructure undefined")); // error correctly
(function(param) {
var _param = _sliced_to_array(param, 0);
@ -19,5 +19,5 @@ function bar(param) {
var _param = _sliced_to_array(param, 0);
return 0;
}
var ref1 = 1, ref1 = ref1 !== null ? ref1 : _throw(new TypeError("Cannot destructure undefined"));
var ref2 = _sliced_to_array({}, 0);
var _ref1 = 1, _ref1 = _ref1 !== null ? _ref1 : _throw(new TypeError("Cannot destructure undefined"));
var _ref2 = _sliced_to_array({}, 0);

View File

@ -6,5 +6,5 @@ var undefined = undefined;
_sliced_to_array({}, 0), function(param) {
var param = null !== param ? param : _throw(new TypeError("Cannot destructure undefined"));
}(undefined);
var ref = 1, ref = null !== ref ? ref : _throw(new TypeError("Cannot destructure undefined"));
var _ref = 1, _ref = null !== _ref ? _ref : _throw(new TypeError("Cannot destructure undefined"));
_sliced_to_array({}, 0);

View File

@ -28,7 +28,7 @@ try {
}
];
} catch (param2) {
var _param1 = _sliced_to_array(param2, 1), ref = _param1[0], _x = _sliced_to_array(ref.x, 1), y = _x[0], z = ref.z;
var _param1 = _sliced_to_array(param2, 1), _param_ = _param1[0], _param__x = _sliced_to_array(_param_.x, 1), y = _param__x[0], z = _param_.z;
y + z;
}
// Test of comment ranges. A fix to GH#11755 should update this.

View File

@ -27,6 +27,6 @@ try {
}
];
} catch (param2) {
var ref = _sliced_to_array(param2, 1)[0];
_sliced_to_array(ref.x, 1)[0], ref.z;
var _param_ = _sliced_to_array(param2, 1)[0];
_sliced_to_array(_param_.x, 1)[0], _param_.z;
}

View File

@ -36,7 +36,7 @@ function f4() {
var ref1;
ref1 = 0, x = ref1["x" + ""], ref1; // Errpr
}
var ref = [
var _ref = [
"foo"
], key = ref[0], value = ref[1];
], key = _ref[0], value = _ref[1];
value.toUpperCase(); // Error

View File

@ -14,8 +14,8 @@ let [{ [order(1)]: y } = order(0)] = [
// order(0) should evaluate first (destructuring of object literal {})
// order(1) should evaluate next (initializer because property is undefined)
// order(2) should evaluate last (evaluate object binding pattern from initializer)
let _ref = {}, key = order(0), key1 = order(2), { [key]: { [key1]: z } = order(1) } = _ref, w = _object_without_properties(_ref, [
key
let _ref = {}, _order = order(0), _order1 = order(2), { [_order]: { [_order1]: z } = order(1) } = _ref, w = _object_without_properties(_ref, [
_order
].map(_to_property_key));
// https://github.com/microsoft/TypeScript/issues/39181
// b = a must occur *after* 'a' has been assigned

View File

@ -4,9 +4,9 @@ import _object_without_properties from "@swc/helpers/src/_object_without_propert
import _to_property_key from "@swc/helpers/src/_to_property_key.mjs";
let trace = [], order = (n)=>trace.push(n), [{ [order(1)]: x } = order(0)] = [], [{ [order(1)]: y } = order(0)] = [
{}
], _ref = {}, key = order(0), key1 = order(2), { [key]: { [key1]: z } = order(1) } = _ref;
], _ref = {}, _order = order(0), _order1 = order(2), { [_order]: { [_order1]: z } = order(1) } = _ref;
_object_without_properties(_ref, [
key
_order
].map(_to_property_key));
let _ref1 = [
{

View File

@ -10,19 +10,19 @@ var order = function(n) {
return trace.push(n);
};
// order(0) should evaluate before order(1) because the first element is undefined
var ref = [], tmp = ref[0], ref1 = tmp === void 0 ? order(0) : tmp, x = ref1[order(1)];
var _ref = [], tmp = _ref[0], _ref1 = tmp === void 0 ? order(0) : tmp, x = _ref1[order(1)];
// order(0) should not evaluate because the first element is defined
var tmp1 = {}, ref2 = tmp1 === void 0 ? order(0) : tmp1, y = ref2[order(1)];
var tmp1 = {}, _ref2 = tmp1 === void 0 ? order(0) : tmp1, y = _ref2[order(1)];
// order(0) should evaluate first (destructuring of object literal {})
// order(1) should evaluate next (initializer because property is undefined)
// order(2) should evaluate last (evaluate object binding pattern from initializer)
var _ref = {}, key = order(0), key1 = order(2), tmp2 = _ref[key], ref3 = tmp2 === void 0 ? order(1) : tmp2, z = ref3[key1], w = _object_without_properties(_ref, [
key
var _ref3 = {}, _order = order(0), _order1 = order(2), tmp2 = _ref3[_order], _ref4 = tmp2 === void 0 ? order(1) : tmp2, z = _ref4[_order1], w = _object_without_properties(_ref3, [
_order
].map(_to_property_key));
// https://github.com/microsoft/TypeScript/issues/39181
// b = a must occur *after* 'a' has been assigned
var _ref1 = [
var _ref5 = [
{
x: 1
}
], __ref = _sliced_to_array(_ref1, 2), ref4 = __ref[0], ref4 = ref4 !== null ? ref4 : _throw(new TypeError("Cannot destructure undefined")), tmp3 = __ref[1], b = tmp3 === void 0 ? a : tmp3, a = _extends({}, _ref1[0]);
], _ref6 = _sliced_to_array(_ref5, 2), _ref_ = _ref6[0], _ref_ = _ref_ !== null ? _ref_ : _throw(new TypeError("Cannot destructure undefined")), tmp3 = _ref6[1], b = tmp3 === void 0 ? a : tmp3, a = _extends({}, _ref5[0]);

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 = {}, key = order(0), key1 = order(2), tmp2 = _ref[key];
(void 0 === tmp2 ? order(1) : tmp2)[key1], _object_without_properties(_ref, [
key
var _ref = {}, _order = order(0), _order1 = order(2), tmp2 = _ref[_order];
(void 0 === tmp2 ? order(1) : tmp2)[_order1], _object_without_properties(_ref, [
_order
].map(_to_property_key));
var _ref1 = [
{
x: 1
}
], __ref = _sliced_to_array(_ref1, 2), ref = __ref[0], ref = null !== ref ? ref : _throw(new TypeError("Cannot destructure undefined"));
__ref[1], _extends({}, _ref1[0]);
], _ref2 = _sliced_to_array(_ref1, 2), _ref_ = _ref2[0], _ref_ = null !== _ref_ ? _ref_ : _throw(new TypeError("Cannot destructure undefined"));
_ref2[1], _extends({}, _ref1[0]);

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