swc/tests/fixture/issue-1694/case1/input/index.js
강동윤 b044d2c6dd
fix(es/transforms/compat): Support private methods (#1700)
swc_ecma_transforms_base:
 - Add some helpers.

swc_ecma_transforms_compat:
 - `class_properties`: Support private methods. (Closes #1694)
2021-05-15 20:35:24 +09:00

10 lines
195 B
JavaScript

class MyClass {
#get() {
console.log("Hi from a method with a private identifier called #get");
}
constructor() {
this.#get();
}
}
const instance = new MyClass();