-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code
Description
Bug Report
π Search Terms
thisType is not narrowed
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
β― Playground Link
Playground link with relevant code
π» Code
class Base {
f() {
if (this instanceof D1) {
const s: this = this;
s.f1();
this.f1();
}
}
}
class D1 {
f1() {}
}π Actual behavior
compiler throws an error on s.f1(): Property 'f1' does not exist on type 'Base'.
π Expected behavior
should have no error.
Metadata
Metadata
Assignees
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code