Debian Codegraph @

packages/babel-plugin-proposal-destructuring-private/test/fixtures/ordering/array-pattern-with-rest/exec.js

raw
1 var log = [];
2
3 function push(x, y = x) { log.push(x); return y; }
4
5 var log = [];
6
7 function push(x, y = x) { log.push(x); return y; }
8
9 class C {
10 static get a() { push(1) }
11 static get b() { push(6) }
12 static get c() { push(10) }
13 static get d() { push(13) }
14 static get #x() { push(3) };
15 static get #y() { return push(8, C) };
16 static {
17 var [{ [push(0, "a")]: a = push(2), #x: {
18 [push(5, "b")]: b = push(7),
19 #y: y = push(-1),
20 [push(9, "c")]: c = push(11)
21 } = push(4, C), [push(12, "d")]: d = push(14) }, ...{ [push(15)]: e = push(16), ...f }] = [C];
22 }
23 }
24
25 var nums = Array.from({ length: 17 }, (_, i) => i);
26 expect(log).toStrictEqual(nums);