swc/crates/swc_ecma_parser/tests/tsc/privateNameStaticAccessors.ts

17 lines
326 B
TypeScript
Raw Normal View History

// @strict: true
// @target: es6
class A1 {
static get #prop() { return ""; }
static set #prop(param: string) { }
static get #roProp() { return ""; }
constructor(name: string) {
A1.#prop = "";
A1.#roProp = ""; // Error
console.log(A1.#prop);
console.log(A1.#roProp);
}
}