Debian Codegraph @

packages/babel-plugin-proposal-class-properties/test/fixtures/private/optional-chain-member-optional-call-spread-arguments/exec.js

raw symbols SCIP
1 class Foo {
2 #m;
3 init() {
4 this.#m = (...args) => args;
5 }
6 static test() {
7 const f = new Foo();
8 f.init();
9 return f.#m?.(...arguments);
10 }
11
12 static testNull() {
13 const f = new Foo();
14 return f.#m?.(...arguments);
15 }
16 }
17
18 expect(Foo.test(1, 2)).toEqual([1, 2]);
19 expect(Foo.testNull(1, 2)).toBe(undefined);