Debian Codegraph @

packages/babel-plugin-proposal-private-methods/test/fixtures/accessors/set-only-getter/input.js

raw
1 class Cl {
2 #privateField = 0;
3 counter = 0;
4
5 get #privateFieldValue() {
6 return this.#privateField;
7 }
8
9 get self() {
10 this.counter++;
11 return this;
12 }
13
14 constructor() {
15 this.self.#privateFieldValue = 1
16 ([this.self.#privateFieldValue] = [1]);
17 }
18 }
19
20 const cl = new Cl();