undefinedInferentialTyping.ts(2,5): error TS2322: Type 'null' is not assignable to type 'T'.
  'T' could be instantiated with an arbitrary type which could be unrelated to 'null'.


==== undefinedInferentialTyping.ts (1 errors) ====
    function f<T>(arr: T[], elemnt: T): T {
        return null;
        ~~~~~~
!!! error TS2322: Type 'null' is not assignable to type 'T'.
!!! error TS2322:   'T' could be instantiated with an arbitrary type which could be unrelated to 'null'.
    }
    
    var a = f([], 3); // should be number