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

11 lines
158 B
TypeScript

// @target: esnext, es2022, es2015
let getX: (a: A) => number;
class A {
#x = 100;
[(getX = (a: A) => a.#x, "_")]() {}
}
console.log(getX(new A));