Consider the following example:
class A {} class B extends A { foo() { return 6; } } const variable: A = new B(); const isValid = variable i