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

23 lines
398 B
TypeScript

// @target: esnext, es2022
// @useDefineForClassFields: false
class C {
a = 123;
#a = 10;
c = "hello";
#b;
method() {
console.log(this.#a);
this.#a = "hello";
console.log(this.#b);
}
static #m = "test";
static #x;
static test() {
console.log(this.#m);
console.log(this.#x = "test");
}
#something = () => 1234;
}