Debian Codegraph @

packages/babel-plugin-proposal-private-methods/test/fixtures/private-method-loose/reassignment/exec.js

raw
1 let counter = 0;
2 class Foo {
3 constructor() {
4 this.#privateMethod = ++counter;
5 }
6
7 #privateMethod() {
8 return 42;
9 }
10 }
11
12 expect(() => new Foo).toThrow();
13 expect(counter).toBe(1);