Here's an example which demonstrates (tested on 1.6.2 and current playground):
classFoo{a: number;foo(): string{if(thisinstanceofBar){returnthis.b;// not okay - `this` typed as Foo}return'';}bar(): string{letthat=this;if(thatinstanceofBar){returnthat.b;// okay - `that` typed as Bar}return''}}classBarextendsFoo{b: string;}
Here's an example which demonstrates (tested on 1.6.2 and current playground):