Skip to content

Commit 83276ce

Browse files
committed
Add another test
1 parent dc42feb commit 83276ce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ function f22<T>(x: T extends (infer U)[] ? U[] : never) {
219219
let e = x[0]; // {}
220220
}
221221

222+
function f23<T extends string[]>(x: T extends (infer U)[] ? U[] : never) {
223+
let e = x[0]; // string
224+
}
225+
222226
// Repros from #21664
223227

224228
type Eq<T, U> = T extends U ? U extends T ? true : false : false;

0 commit comments

Comments
 (0)