Skip to content

Commit 4a368c9

Browse files
committed
Accept new baselines
1 parent 92f5f1d commit 4a368c9

File tree

4 files changed

+78
-0
lines changed

4 files changed

+78
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
tests/cases/compiler/recursiveResolveTypeMembers.ts(4,58): error TS2304: Cannot find name 'H'.
2+
tests/cases/compiler/recursiveResolveTypeMembers.ts(4,62): error TS2574: A rest element type must be an array type.
3+
tests/cases/compiler/recursiveResolveTypeMembers.ts(4,79): error TS2304: Cannot find name 'R'.
4+
5+
6+
==== tests/cases/compiler/recursiveResolveTypeMembers.ts (3 errors) ====
7+
// Repro from #25291
8+
9+
type PromisedTuple<L extends any[], U = (...args: L) => void> =
10+
U extends (h: infer H, ...args: infer R) => [Promise<H>, ...PromisedTuple<R>] ? [] : []
11+
~
12+
!!! error TS2304: Cannot find name 'H'.
13+
~~~~~~~~~~~~~~~~~~~
14+
!!! error TS2574: A rest element type must be an array type.
15+
~
16+
!!! error TS2304: Cannot find name 'R'.
17+
18+
type Promised = PromisedTuple<[1, 2, 3]>
19+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//// [recursiveResolveTypeMembers.ts]
2+
// Repro from #25291
3+
4+
type PromisedTuple<L extends any[], U = (...args: L) => void> =
5+
U extends (h: infer H, ...args: infer R) => [Promise<H>, ...PromisedTuple<R>] ? [] : []
6+
7+
type Promised = PromisedTuple<[1, 2, 3]>
8+
9+
10+
//// [recursiveResolveTypeMembers.js]
11+
// Repro from #25291
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
=== tests/cases/compiler/recursiveResolveTypeMembers.ts ===
2+
// Repro from #25291
3+
4+
type PromisedTuple<L extends any[], U = (...args: L) => void> =
5+
>PromisedTuple : Symbol(PromisedTuple, Decl(recursiveResolveTypeMembers.ts, 0, 0))
6+
>L : Symbol(L, Decl(recursiveResolveTypeMembers.ts, 2, 19))
7+
>U : Symbol(U, Decl(recursiveResolveTypeMembers.ts, 2, 35))
8+
>args : Symbol(args, Decl(recursiveResolveTypeMembers.ts, 2, 41))
9+
>L : Symbol(L, Decl(recursiveResolveTypeMembers.ts, 2, 19))
10+
11+
U extends (h: infer H, ...args: infer R) => [Promise<H>, ...PromisedTuple<R>] ? [] : []
12+
>U : Symbol(U, Decl(recursiveResolveTypeMembers.ts, 2, 35))
13+
>h : Symbol(h, Decl(recursiveResolveTypeMembers.ts, 3, 15))
14+
>H : Symbol(H, Decl(recursiveResolveTypeMembers.ts, 3, 23))
15+
>args : Symbol(args, Decl(recursiveResolveTypeMembers.ts, 3, 26))
16+
>R : Symbol(R, Decl(recursiveResolveTypeMembers.ts, 3, 41))
17+
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --))
18+
>PromisedTuple : Symbol(PromisedTuple, Decl(recursiveResolveTypeMembers.ts, 0, 0))
19+
20+
type Promised = PromisedTuple<[1, 2, 3]>
21+
>Promised : Symbol(Promised, Decl(recursiveResolveTypeMembers.ts, 3, 91))
22+
>PromisedTuple : Symbol(PromisedTuple, Decl(recursiveResolveTypeMembers.ts, 0, 0))
23+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
=== tests/cases/compiler/recursiveResolveTypeMembers.ts ===
2+
// Repro from #25291
3+
4+
type PromisedTuple<L extends any[], U = (...args: L) => void> =
5+
>PromisedTuple : PromisedTuple<L, U>
6+
>L : L
7+
>U : U
8+
>args : L
9+
>L : L
10+
11+
U extends (h: infer H, ...args: infer R) => [Promise<H>, ...PromisedTuple<R>] ? [] : []
12+
>U : U
13+
>h : H
14+
>H : H
15+
>args : R
16+
>R : R
17+
>Promise : Promise<T>
18+
>H : No type information available!
19+
>PromisedTuple : PromisedTuple<L, U>
20+
>R : No type information available!
21+
22+
type Promised = PromisedTuple<[1, 2, 3]>
23+
>Promised : []
24+
>PromisedTuple : PromisedTuple<L, U>
25+

0 commit comments

Comments
 (0)