@@ -416,19 +416,85 @@ type X18<T> = T extends { [P in keyof T as infer U extends P]: 1; } ? 1 : 0; //
416416>U : Symbol(U, Decl(inferTypesWithExtends1.ts, 105, 48))
417417>P : Symbol(P, Decl(inferTypesWithExtends1.ts, 105, 27))
418418
419+ type X19<T extends string | number> = T extends (infer U extends number) ? [T, U] : never;
420+ >X19 : Symbol(X19, Decl(inferTypesWithExtends1.ts, 105, 76))
421+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 107, 9))
422+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 107, 9))
423+ >U : Symbol(U, Decl(inferTypesWithExtends1.ts, 107, 54))
424+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 107, 9))
425+ >U : Symbol(U, Decl(inferTypesWithExtends1.ts, 107, 54))
426+
427+ type X19_T1 = X19<"a">; // never
428+ >X19_T1 : Symbol(X19_T1, Decl(inferTypesWithExtends1.ts, 107, 90))
429+ >X19 : Symbol(X19, Decl(inferTypesWithExtends1.ts, 105, 76))
430+
431+ type X19_T2 = X19<1>; // [1, 1]
432+ >X19_T2 : Symbol(X19_T2, Decl(inferTypesWithExtends1.ts, 108, 23))
433+ >X19 : Symbol(X19, Decl(inferTypesWithExtends1.ts, 105, 76))
434+
435+ type X19_T3 = X19<1 | "a">; // [1, 1]
436+ >X19_T3 : Symbol(X19_T3, Decl(inferTypesWithExtends1.ts, 109, 21))
437+ >X19 : Symbol(X19, Decl(inferTypesWithExtends1.ts, 105, 76))
438+
439+ type X20<T> = T extends (infer U extends number) ? T extends (infer V extends U) ? [T, U, V] : never : never;
440+ >X20 : Symbol(X20, Decl(inferTypesWithExtends1.ts, 110, 27))
441+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 112, 9))
442+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 112, 9))
443+ >U : Symbol(U, Decl(inferTypesWithExtends1.ts, 112, 30))
444+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 112, 9))
445+ >V : Symbol(V, Decl(inferTypesWithExtends1.ts, 112, 67))
446+ >U : Symbol(U, Decl(inferTypesWithExtends1.ts, 112, 30))
447+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 112, 9))
448+ >U : Symbol(U, Decl(inferTypesWithExtends1.ts, 112, 30))
449+ >V : Symbol(V, Decl(inferTypesWithExtends1.ts, 112, 67))
450+
451+ type X20_T1 = X20<1 | "a">; // [1, 1, 1]
452+ >X20_T1 : Symbol(X20_T1, Decl(inferTypesWithExtends1.ts, 112, 109))
453+ >X20 : Symbol(X20, Decl(inferTypesWithExtends1.ts, 110, 27))
454+
455+ type X21<T, N extends number> = T extends (infer U extends N) ? [T, U] : never;
456+ >X21 : Symbol(X21, Decl(inferTypesWithExtends1.ts, 113, 27))
457+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 115, 9))
458+ >N : Symbol(N, Decl(inferTypesWithExtends1.ts, 115, 11))
459+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 115, 9))
460+ >U : Symbol(U, Decl(inferTypesWithExtends1.ts, 115, 48))
461+ >N : Symbol(N, Decl(inferTypesWithExtends1.ts, 115, 11))
462+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 115, 9))
463+ >U : Symbol(U, Decl(inferTypesWithExtends1.ts, 115, 48))
464+
465+ type X21_T1 = X21<1, 1>; // [1, 1]
466+ >X21_T1 : Symbol(X21_T1, Decl(inferTypesWithExtends1.ts, 115, 79))
467+ >X21 : Symbol(X21, Decl(inferTypesWithExtends1.ts, 113, 27))
468+
469+ type X21_T2 = X21<1 | "a", 1>; // [1, 1]
470+ >X21_T2 : Symbol(X21_T2, Decl(inferTypesWithExtends1.ts, 116, 24))
471+ >X21 : Symbol(X21, Decl(inferTypesWithExtends1.ts, 113, 27))
472+
473+ type X21_T3 = X21<1 | 2, 1>; // [1, 1]
474+ >X21_T3 : Symbol(X21_T3, Decl(inferTypesWithExtends1.ts, 117, 30))
475+ >X21 : Symbol(X21, Decl(inferTypesWithExtends1.ts, 113, 27))
476+
477+ type X21_T4 = X21<1 | 2, 2 | 3>; // [2, 2]
478+ >X21_T4 : Symbol(X21_T4, Decl(inferTypesWithExtends1.ts, 118, 28))
479+ >X21 : Symbol(X21, Decl(inferTypesWithExtends1.ts, 113, 27))
480+
481+ type X21_T5 = X21<1 | 2, 3>; // never
482+ >X21_T5 : Symbol(X21_T5, Decl(inferTypesWithExtends1.ts, 119, 32))
483+ >X21 : Symbol(X21, Decl(inferTypesWithExtends1.ts, 113, 27))
484+
419485// from mongoose
420486type IfEquals<X, Y, A, B> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? A : B;
421- >IfEquals : Symbol(IfEquals, Decl(inferTypesWithExtends1.ts, 105, 76 ))
422- >X : Symbol(X, Decl(inferTypesWithExtends1.ts, 108 , 14))
423- >Y : Symbol(Y, Decl(inferTypesWithExtends1.ts, 108 , 16))
424- >A : Symbol(A, Decl(inferTypesWithExtends1.ts, 108 , 19))
425- >B : Symbol(B, Decl(inferTypesWithExtends1.ts, 108 , 22))
426- >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 108 , 30))
427- >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 108 , 30))
428- >X : Symbol(X, Decl(inferTypesWithExtends1.ts, 108 , 14))
429- >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 108 , 68))
430- >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 108 , 68))
431- >Y : Symbol(Y, Decl(inferTypesWithExtends1.ts, 108 , 16))
432- >A : Symbol(A, Decl(inferTypesWithExtends1.ts, 108 , 19))
433- >B : Symbol(B, Decl(inferTypesWithExtends1.ts, 108 , 22))
487+ >IfEquals : Symbol(IfEquals, Decl(inferTypesWithExtends1.ts, 120, 28 ))
488+ >X : Symbol(X, Decl(inferTypesWithExtends1.ts, 123 , 14))
489+ >Y : Symbol(Y, Decl(inferTypesWithExtends1.ts, 123 , 16))
490+ >A : Symbol(A, Decl(inferTypesWithExtends1.ts, 123 , 19))
491+ >B : Symbol(B, Decl(inferTypesWithExtends1.ts, 123 , 22))
492+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 123 , 30))
493+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 123 , 30))
494+ >X : Symbol(X, Decl(inferTypesWithExtends1.ts, 123 , 14))
495+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 123 , 68))
496+ >T : Symbol(T, Decl(inferTypesWithExtends1.ts, 123 , 68))
497+ >Y : Symbol(Y, Decl(inferTypesWithExtends1.ts, 123 , 16))
498+ >A : Symbol(A, Decl(inferTypesWithExtends1.ts, 123 , 19))
499+ >B : Symbol(B, Decl(inferTypesWithExtends1.ts, 123 , 22))
434500
0 commit comments