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

61 lines
879 B
JavaScript

let y;
class C {
static #p;
static #x;
static {
var _p4, _5;
function f0(x, _p, _p2) {
var _ = _p.#p,
[z,,] = _p2;
}
try {} catch (_e) {
let [, _p3] = _e,
_2 = _p3.#p,
{
...rest
} = _p3;
}
for (const _ref of []) {
const _3 = _ref.#x,
{
y
} = _ref;
;
}
for (let {
valueOf: _7,
...rest
} in {});
for (const _ref2 of []) {
var _4;
_4 = _ref2.#x, {
y
} = _ref2;
;
}
for ({
valueOf: _8,
...rest
} in {}) {
var _8;
;
}
[, _p4] = [0, {
p: 1,
q: 2,
r: 3
}], _5 = _p4.#p, {
...rest
} = _p4;
var [, _p5] = [0, {
p: 1,
q: 2,
r: 3
}],
_6 = _p5.#p,
{
...rest
} = _p5;
}
}