Files
test-repo/tests/format/flow-repo/more_path/test.js
T

15 lines
264 B
JavaScript

class BaseClass {
baseProp: string;
}
class ChildClass extends BaseClass {
childProp: string;
}
function test(obj: BaseClass): string {
if (obj instanceof ChildClass) {
return obj.childProp_TYPO; // error (obj: ChildClass)
}
return obj.baseProp;
}