Closed
Description
π Search Terms
ES5, this alias
π Version & Regression Information
- This changed between versions 5.1.6 and 5.2.2
β― Playground Link
π» Code
// @target: es5
// @showEmit: true
class Wrapper {
constructor(
validate = (unsafe: {}) => this.validate(unsafe)) {
validate({});
}
private validate(typeUnsafe: any): boolean {
return true;
}
}
new Wrapper();
Target: ES5
π Actual behavior
Cannot read properties of undefined (reading 'validate')
π Expected behavior
No error (as with untranspiled version or with TS5.1.6)
Additional information about the issue
No response