Debian Codegraph @

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

raw
1 class Cl {
2 static #privateField = 0;
3
4 static get #privateFieldValue() {
5 return this.#privateField;
6 }
7
8 constructor() {
9 expect(() => Cl.#privateFieldValue = 1).toThrow(TypeError);
10 expect(() => ([Cl.#privateFieldValue] = [1])).toThrow(TypeError);
11 }
12 }
13
14 const cl = new Cl();