@@ -204,3 +204,51 @@ type MyObject<T> = T extends ZodObject<infer U>
204
204
205
205
: never
206
206
: never;
207
+
208
+ // Repro from #50479
209
+
210
+ type Cell<Value extends BaseValue = any, BaseValue = unknown> = {
211
+ >Cell : Symbol(Cell, Decl(inferTypeConstraintInstantiationCircularity.ts, 71, 10))
212
+ >Value : Symbol(Value, Decl(inferTypeConstraintInstantiationCircularity.ts, 75, 10))
213
+ >BaseValue : Symbol(BaseValue, Decl(inferTypeConstraintInstantiationCircularity.ts, 75, 40))
214
+ >BaseValue : Symbol(BaseValue, Decl(inferTypeConstraintInstantiationCircularity.ts, 75, 40))
215
+
216
+ id: string
217
+ >id : Symbol(id, Decl(inferTypeConstraintInstantiationCircularity.ts, 75, 65))
218
+ }
219
+
220
+ type Items<Type extends Cell = Cell> = {
221
+ >Items : Symbol(Items, Decl(inferTypeConstraintInstantiationCircularity.ts, 77, 1))
222
+ >Type : Symbol(Type, Decl(inferTypeConstraintInstantiationCircularity.ts, 79, 11))
223
+ >Cell : Symbol(Cell, Decl(inferTypeConstraintInstantiationCircularity.ts, 71, 10))
224
+ >Cell : Symbol(Cell, Decl(inferTypeConstraintInstantiationCircularity.ts, 71, 10))
225
+
226
+ type: Type
227
+ >type : Symbol(type, Decl(inferTypeConstraintInstantiationCircularity.ts, 79, 40))
228
+ >Type : Symbol(Type, Decl(inferTypeConstraintInstantiationCircularity.ts, 79, 11))
229
+
230
+ name: string
231
+ >name : Symbol(name, Decl(inferTypeConstraintInstantiationCircularity.ts, 80, 12))
232
+ }
233
+
234
+ type InferIOItemToJSType<T extends Items> =
235
+ >InferIOItemToJSType : Symbol(InferIOItemToJSType, Decl(inferTypeConstraintInstantiationCircularity.ts, 82, 1))
236
+ >T : Symbol(T, Decl(inferTypeConstraintInstantiationCircularity.ts, 84, 25))
237
+ >Items : Symbol(Items, Decl(inferTypeConstraintInstantiationCircularity.ts, 77, 1))
238
+
239
+ T extends { type: infer U }
240
+ >T : Symbol(T, Decl(inferTypeConstraintInstantiationCircularity.ts, 84, 25))
241
+ >type : Symbol(type, Decl(inferTypeConstraintInstantiationCircularity.ts, 85, 13))
242
+ >U : Symbol(U, Decl(inferTypeConstraintInstantiationCircularity.ts, 85, 25))
243
+
244
+ ? U extends Cell<infer V/**, infer _ or unknown, or any valid type **/>
245
+ >U : Symbol(U, Decl(inferTypeConstraintInstantiationCircularity.ts, 85, 25))
246
+ >Cell : Symbol(Cell, Decl(inferTypeConstraintInstantiationCircularity.ts, 71, 10))
247
+ >V : Symbol(V, Decl(inferTypeConstraintInstantiationCircularity.ts, 86, 26))
248
+
249
+ ? V
250
+ >V : Symbol(V, Decl(inferTypeConstraintInstantiationCircularity.ts, 86, 26))
251
+
252
+ : never
253
+ : never
254
+
0 commit comments