==== tests/cases/compiler/classIsSubtypeOfBaseType.ts (1 errors) ====
    class Base<T> {
        foo: T;
    }
    
    class Derived extends Base<{ bar: string; }> {
        foo: {
            bar: string; baz: number; // ok
        }
    }
    
    class Derived2 extends Base<{ bar: string; }> {
          ~~~~~~~~
!!! classIsSubtypeOfBaseType.ts(11,7): error TS2141: Class 'Derived2' cannot extend class 'Base<{ bar: string; }>':
!!! 	Types of property 'foo' of types 'Derived2' and 'Base<{ bar: string; }>' are incompatible:
!!! 		Property 'bar' defined as optional in type '{ bar?: string; }', but is required in type '{ bar: string; }'.
        foo: {
            bar?: string; // error
        }
    }