inlinedAliasAssignableToConstraintSameAsAlias.ts(12,3): error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
inlinedAliasAssignableToConstraintSameAsAlias.ts(13,3): error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
inlinedAliasAssignableToConstraintSameAsAlias.ts(14,3): error TS2564: Property 'z' has no initializer and is not definitely assigned in the constructor.


==== inlinedAliasAssignableToConstraintSameAsAlias.ts (3 errors) ====
    interface RelationFields {
      x: A;
      y: A[];
      z: A[];
    }
    type Name = keyof RelationFields;
    type ShouldA<RF extends RelationFields, N extends Name> = RF[N] extends A[]
      ? RF[N][0]
      : never;
    
    class A {
      x: A;
      ~
!!! error TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor.
      y: A[];
      ~
!!! error TS2564: Property 'y' has no initializer and is not definitely assigned in the constructor.
      z: A[];
      ~
!!! error TS2564: Property 'z' has no initializer and is not definitely assigned in the constructor.
    
      whereRelated< // Works // Type is same as A1, but is not assignable to type A
        RF extends RelationFields = RelationFields,
        N extends Name = Name,
        A1 extends A = RF[N] extends A[] ? RF[N][0] : never,
        A2 extends A = ShouldA<RF, N>
      >(): number {
        return 1;
      }
    }
    