mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
15 lines
292 B
JavaScript
15 lines
292 B
JavaScript
class Cl {
|
|
static #privateField = 0;
|
|
|
|
static get #privateFieldValue() {
|
|
return this.#privateField;
|
|
}
|
|
|
|
constructor() {
|
|
expect(() => Cl.#privateFieldValue = 1).toThrow(TypeError);
|
|
expect(() => ([Cl.#privateFieldValue] = [1])).toThrow(TypeError);
|
|
}
|
|
}
|
|
|
|
const cl = new Cl();
|