Closed
Description
Bug Report
π Search Terms
this, typeof this, Cannot find name 'this', 2304
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries
β― Playground Link
Playground link with relevant code
π» Code
export class A {
x = 1
a(x: typeof this.x): void {}
// ^ ^^^^ Cannot find name 'this'.(2304)
// L_____________ `x` has proper type inference nevertheless
}
const a = new A().a(1)
π Actual behavior
Throw a wrong error
π Expected behavior
To not throw this error