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