Debian Codegraph @

packages/babel-plugin-proposal-private-methods/test/fixtures/accessors-privateFieldsAsProperties/basic/input.js

raw
1 class Cl {
2 #privateField = "top secret string";
3
4 constructor() {
5 this.publicField = "not secret string";
6 }
7
8 get #privateFieldValue() {
9 return this.#privateField;
10 }
11
12 set #privateFieldValue(newValue) {
13 this.#privateField = newValue;
14 }
15
16 publicGetPrivateField() {
17 return this.#privateFieldValue;
18 }
19
20 publicSetPrivateField(newValue) {
21 this.#privateFieldValue = newValue;
22 }
23 }