Skip to content

Commit ee59cee

Browse files
committed
Add regression test
1 parent 46a278d commit ee59cee

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/cases/conformance/types/conditional/conditionalTypes2.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,9 @@ type ProductComplementComplement = {
190190
};
191191
type PCCA = ProductComplementComplement['a'];
192192
type PCCB = ProductComplementComplement['b'];
193+
194+
// Repro from #31326
195+
196+
type Hmm<T, U extends T> = U extends T ? { [K in keyof U]: number } : never;
197+
type What = Hmm<{}, { a: string }>
198+
const w: What = { a: 4 };

0 commit comments

Comments
 (0)