generatorTypeCheck18.ts(1,13): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
generatorTypeCheck18.ts(2,13): error TS2564: Property 'z' has no initializer and is not definitely assigned in the constructor.
generatorTypeCheck18.ts(4,5): error TS2322: Type 'undefined' is not assignable to type 'Foo'.
generatorTypeCheck18.ts(5,11): error TS2741: Property 'x' is missing in type 'Baz' but required in type 'Foo'.


==== generatorTypeCheck18.ts (4 errors) ====
    class Foo { x: number }
                ~
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
    class Baz { z: number }
                ~
!!! error TS2564: Property 'z' has no initializer and is not definitely assigned in the constructor.
    function* g(): IterableIterator<Foo> {
        yield;
        ~~~~~
!!! error TS2322: Type 'undefined' is not assignable to type 'Foo'.
        yield new Baz;
              ~~~~~~~
!!! error TS2741: Property 'x' is missing in type 'Baz' but required in type 'Foo'.
!!! related TS2728 generatorTypeCheck18.ts:1:13: 'x' is declared here.
    }