@@ -10,15 +10,23 @@ mappedTypeRelationships.ts(25,5): error TS2536: Type 'K' cannot be used to index
1010mappedTypeRelationships.ts(26,12): error TS2536: Type 'K' cannot be used to index type 'T'.
1111mappedTypeRelationships.ts(30,5): error TS2322: Type 'T[keyof T] | undefined' is not assignable to type 'T[keyof T]'.
1212 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'T[keyof T] | undefined'.
13+ Type 'undefined' is not assignable to type 'T[keyof T]'.
14+ 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'.
1315mappedTypeRelationships.ts(35,5): error TS2322: Type 'T[K] | undefined' is not assignable to type 'T[K]'.
1416 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'T[K] | undefined'.
17+ Type 'undefined' is not assignable to type 'T[K]'.
18+ 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'.
1519mappedTypeRelationships.ts(40,5): error TS2322: Type 'U[keyof T] | undefined' is not assignable to type 'T[keyof T]'.
1620 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'U[keyof T] | undefined'.
21+ Type 'undefined' is not assignable to type 'T[keyof T]'.
22+ 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'.
1723mappedTypeRelationships.ts(41,5): error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T] | undefined'.
1824 Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'U[keyof T] | undefined'.
1925 Type 'T[string]' is not assignable to type 'U[keyof T] | undefined'.
2026mappedTypeRelationships.ts(45,5): error TS2322: Type 'U[K] | undefined' is not assignable to type 'T[K]'.
2127 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'U[K] | undefined'.
28+ Type 'undefined' is not assignable to type 'T[K]'.
29+ 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'.
2230mappedTypeRelationships.ts(46,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K] | undefined'.
2331 Type 'T[keyof T]' is not assignable to type 'U[K] | undefined'.
2432 Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'U[K] | undefined'.
@@ -125,6 +133,8 @@ mappedTypeRelationships.ts(168,5): error TS2322: Type '{ [P in K]: T[P]; }' is n
125133 ~~~~
126134!!! error TS2322: Type 'T[keyof T] | undefined' is not assignable to type 'T[keyof T]'.
127135!!! error TS2322: 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'T[keyof T] | undefined'.
136+ !!! error TS2322: Type 'undefined' is not assignable to type 'T[keyof T]'.
137+ !!! error TS2322: 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'.
128138 y[k] = x[k];
129139 }
130140
@@ -133,6 +143,8 @@ mappedTypeRelationships.ts(168,5): error TS2322: Type '{ [P in K]: T[P]; }' is n
133143 ~~~~
134144!!! error TS2322: Type 'T[K] | undefined' is not assignable to type 'T[K]'.
135145!!! error TS2322: 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'T[K] | undefined'.
146+ !!! error TS2322: Type 'undefined' is not assignable to type 'T[K]'.
147+ !!! error TS2322: 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'.
136148 y[k] = x[k];
137149 }
138150
@@ -141,6 +153,8 @@ mappedTypeRelationships.ts(168,5): error TS2322: Type '{ [P in K]: T[P]; }' is n
141153 ~~~~
142154!!! error TS2322: Type 'U[keyof T] | undefined' is not assignable to type 'T[keyof T]'.
143155!!! error TS2322: 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'U[keyof T] | undefined'.
156+ !!! error TS2322: Type 'undefined' is not assignable to type 'T[keyof T]'.
157+ !!! error TS2322: 'T[keyof T]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'.
144158 y[k] = x[k]; // Error
145159 ~~~~
146160!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T] | undefined'.
@@ -153,6 +167,8 @@ mappedTypeRelationships.ts(168,5): error TS2322: Type '{ [P in K]: T[P]; }' is n
153167 ~~~~
154168!!! error TS2322: Type 'U[K] | undefined' is not assignable to type 'T[K]'.
155169!!! error TS2322: 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'U[K] | undefined'.
170+ !!! error TS2322: Type 'undefined' is not assignable to type 'T[K]'.
171+ !!! error TS2322: 'T[K]' could be instantiated with an arbitrary type which could be unrelated to 'undefined'.
156172 y[k] = x[k]; // Error
157173 ~~~~
158174!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K] | undefined'.
0 commit comments