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

15 lines
240 B
TypeScript

// @strict: true
// @target: es6
class A1 {
#method(param: string): string {
return "";
}
constructor(name: string) {
this.#method("")
this.#method(1) // Error
this.#method() // Error
}
}