swc/crates/swc_ecma_parser/tests/tsc/privateNameStaticAccessors.ts
2022-02-04 17:08:38 +09:00

17 lines
326 B
TypeScript

// @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);
}
}