swc/crates/swc_ecma_parser/tests/tsc/privateNameMethod.ts

15 lines
240 B
TypeScript
Raw Normal View History

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