Files
Huáng JùnliàngandNicolò Ribaudo c072902f5e Transform discard binding (#17277)
* transform discard binding

* refactor extract functions to utils.ts

* expand scope integrity check to all binding identifiers

* update incomplete comment

* update test output fixtures

* remove forXStatement skip

* add more test cases

* feat: remove trailing void patterns on ignoreFunctionLength assumption

* make node 6 happy

* add more test cases

* skip some exec tests for Node < 12

* update tsconfig.json

* update test fixtures

* fix: handle integration issues

* run basic exec test on Node.js >= 16

* update test case

* feat: pass syntaxType from plugin option

* skip basic test for Node.js 6

* add more test cases

* add new multiple-void test case

* fix: disable named evaluation for parenthesized rhs

* fix: handle using named evaluation

* Revert "fix: disable named evaluation for parenthesized rhs"

This reverts commit 93cf63768e3d68778ee73935a6c8de9c9bba2e2e.

* prefix anonymous function with 0,

* improve takeVoidPatternComments

* use NodePath#splitExportDeclaration

* update test fixtures

* update test options

* update test fixtures due to regenerator runtime changes

* fix: remove VoidPattern from LVal

* fix: improve destructuring transform detection

Previously the isPattern check includes void pattern, which would result to an infinite recursion as the void pattern keeps being queued.

* fix incorrect typings

* update isAnonymousFunctionDefinition
2025-06-28 08:17:58 +02:00

78 lines
1.8 KiB
JavaScript

var _marked = /*#__PURE__*/babelHelpers.regenerator().m(f0),
_marked2 = /*#__PURE__*/babelHelpers.regenerator().m(f1),
_marked3 = /*#__PURE__*/babelHelpers.regenerator().m(f2);
function f0(x, _) {
"f0";
return babelHelpers.regenerator().w(function (_context) {
while (1) switch (_context.n) {
case 0:
return _context.a(2);
}
}, _marked);
}
function f1(_2, x) {
"f1";
return babelHelpers.regenerator().w(function (_context2) {
while (1) switch (_context2.n) {
case 0:
return _context2.a(2);
}
}, _marked2);
}
function f2(_3) {
"f2";
return babelHelpers.regenerator().w(function (_context3) {
while (1) switch (_context3.n) {
case 0:
return _context3.a(2);
}
}, _marked3);
}
let C = /*#__PURE__*/function () {
"use strict";
function C() {
babelHelpers.classCallCheck(this, C);
}
return babelHelpers.createClass(C, null, [{
key: "m0",
value: /*#__PURE__*/babelHelpers.regenerator().m(function m0(x, _4) {
"m0";
return babelHelpers.regenerator().w(function (_context4) {
while (1) switch (_context4.n) {
case 0:
return _context4.a(2);
}
}, m0);
})
}, {
key: "m1",
value: /*#__PURE__*/babelHelpers.regenerator().m(function m1(_5, x) {
"m1";
return babelHelpers.regenerator().w(function (_context5) {
while (1) switch (_context5.n) {
case 0:
return _context5.a(2);
}
}, m1);
})
}, {
key: "m2",
value: /*#__PURE__*/babelHelpers.regenerator().m(function m2(_6) {
"m2";
return babelHelpers.regenerator().w(function (_context6) {
while (1) switch (_context6.n) {
case 0:
return _context6.a(2);
}
}, m2);
})
}]);
}();