recursiveIntersectionTypes.ts(12,9): error TS2454: Variable 'entityList' is used before being assigned.
recursiveIntersectionTypes.ts(13,9): error TS2454: Variable 'entityList' is used before being assigned.
recursiveIntersectionTypes.ts(14,9): error TS2454: Variable 'entityList' is used before being assigned.
recursiveIntersectionTypes.ts(15,9): error TS2454: Variable 'entityList' is used before being assigned.
recursiveIntersectionTypes.ts(18,14): error TS2454: Variable 'productList' is used before being assigned.
recursiveIntersectionTypes.ts(19,1): error TS2322: Type 'LinkedList<Entity>' is not assignable to type 'LinkedList<Product>'.
  Property 'price' is missing in type 'LinkedList<Entity>' but required in type 'Product'.


==== recursiveIntersectionTypes.ts (6 errors) ====
    type LinkedList<T> = T & { next: LinkedList<T> };
    
    interface Entity {
        name: string;
    }
    
    interface Product extends Entity {
        price: number;
    }
    
    var entityList: LinkedList<Entity>;
    var s = entityList.name;
            ~~~~~~~~~~
!!! error TS2454: Variable 'entityList' is used before being assigned.
    var s = entityList.next.name;
            ~~~~~~~~~~
!!! error TS2454: Variable 'entityList' is used before being assigned.
    var s = entityList.next.next.name;
            ~~~~~~~~~~
!!! error TS2454: Variable 'entityList' is used before being assigned.
    var s = entityList.next.next.next.name;
            ~~~~~~~~~~
!!! error TS2454: Variable 'entityList' is used before being assigned.
    
    var productList: LinkedList<Product>;
    entityList = productList;
                 ~~~~~~~~~~~
!!! error TS2454: Variable 'productList' is used before being assigned.
    productList = entityList;  // Error
    ~~~~~~~~~~~
!!! error TS2322: Type 'LinkedList<Entity>' is not assignable to type 'LinkedList<Product>'.
!!! error TS2322:   Property 'price' is missing in type 'LinkedList<Entity>' but required in type 'Product'.
!!! related TS2728 recursiveIntersectionTypes.ts:8:5: 'price' is declared here.
    