validUndefinedAssignments.ts(3,5): error TS2322: Type 'undefined' is not assignable to type 'number'.
validUndefinedAssignments.ts(4,5): error TS2322: Type 'undefined' is not assignable to type 'boolean'.
validUndefinedAssignments.ts(5,5): error TS2322: Type 'undefined' is not assignable to type 'string'.
validUndefinedAssignments.ts(11,11): error TS2564: Property 'foo' has no initializer and is not definitely assigned in the constructor.
validUndefinedAssignments.ts(13,1): error TS2322: Type 'undefined' is not assignable to type 'C'.
validUndefinedAssignments.ts(17,1): error TS2322: Type 'undefined' is not assignable to type 'I'.
validUndefinedAssignments.ts(19,5): error TS2322: Type 'undefined' is not assignable to type '{ f(): void; }'.
validUndefinedAssignments.ts(22,5): error TS2322: Type 'undefined' is not assignable to type 'T'.
  'T' could be instantiated with an arbitrary type which could be unrelated to 'undefined'.


==== validUndefinedAssignments.ts (8 errors) ====
    var x: typeof undefined;
    
    var a: number = x;
        ~
!!! error TS2322: Type 'undefined' is not assignable to type 'number'.
    var b: boolean = x;
        ~
!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'.
    var c: string = x;
        ~
!!! error TS2322: Type 'undefined' is not assignable to type 'string'.
    var d: void = x;
    
    var e: typeof undefined = x;
    e = x; // should work
    
    class C { foo: string }
              ~~~
!!! error TS2564: Property 'foo' has no initializer and is not definitely assigned in the constructor.
    var f: C;
    f = x;
    ~
!!! error TS2322: Type 'undefined' is not assignable to type 'C'.
    
    interface I { foo: string }
    var g: I;
    g = x;
    ~
!!! error TS2322: Type 'undefined' is not assignable to type 'I'.
    
    var h: { f(): void } = x;
        ~
!!! error TS2322: Type 'undefined' is not assignable to type '{ f(): void; }'.
    
    function i<T>(a: T) {
        a = x;
        ~
!!! error TS2322: Type 'undefined' is not assignable to type 'T'.
!!! error TS2322:   'T' could be instantiated with an arbitrary type which could be unrelated to 'undefined'.
    }