overloadOnConstConstraintChecks1.ts(20,9): error TS2322: Type 'null' is not assignable to type 'Base'.


==== overloadOnConstConstraintChecks1.ts (1 errors) ====
    class Base { foo() { } }
    class Derived1 extends Base { bar() { } }
    class Derived2 extends Base { baz() { } }
    class Derived3 extends Base { biz() { } }
    
    interface MyDoc { // Document
        createElement(tagName: string): Base;
        createElement(tagName: 'canvas'): Derived1;
        createElement(tagName: 'div'): Derived2;
        createElement(tagName: 'span'): Derived3;
        // + 100 more
    }
    
    class D implements MyDoc {
        createElement(tagName:string): Base;
        createElement(tagName: 'canvas'): Derived1;
        createElement(tagName: 'div'): Derived2;
        createElement(tagName: 'span'): Derived3;
        createElement(tagName:any): Base {
            return null;
            ~~~~~~
!!! error TS2322: Type 'null' is not assignable to type 'Base'.
        }
    }