Skip to content

Commit 36be6c8

Browse files
committed
Accept new baselines
1 parent 9a0a838 commit 36be6c8

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

tests/baselines/reference/restTuplesFromContextualTypes.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
tests/cases/conformance/types/rest/restTuplesFromContextualTypes.ts(56,7): error TS2345: Argument of type '(a: number, b: any, ...x: any[]) => void' is not assignable to parameter of type '(x: number, ...args: T) => void'.
1+
tests/cases/conformance/types/rest/restTuplesFromContextualTypes.ts(56,7): error TS2345: Argument of type '(a: number, b: T[0], ...x: T[number][]) => void' is not assignable to parameter of type '(x: number, ...args: T) => void'.
22
Types of parameters 'b' and 'args' are incompatible.
3-
Type 'T' is not assignable to type '[any, ...any[]]'.
4-
Property '0' is missing in type 'any[]' but required in type '[any, ...any[]]'.
3+
Type 'T' is not assignable to type '[T[0], ...T[number][]]'.
4+
Property '0' is missing in type 'any[]' but required in type '[T[0], ...T[number][]]'.
55

66

77
==== tests/cases/conformance/types/rest/restTuplesFromContextualTypes.ts (1 errors) ====
@@ -62,10 +62,10 @@ tests/cases/conformance/types/rest/restTuplesFromContextualTypes.ts(56,7): error
6262
f((a, ...x) => {});
6363
f((a, b, ...x) => {});
6464
~~~~~~~~~~~~~~~~~~
65-
!!! error TS2345: Argument of type '(a: number, b: any, ...x: any[]) => void' is not assignable to parameter of type '(x: number, ...args: T) => void'.
65+
!!! error TS2345: Argument of type '(a: number, b: T[0], ...x: T[number][]) => void' is not assignable to parameter of type '(x: number, ...args: T) => void'.
6666
!!! error TS2345: Types of parameters 'b' and 'args' are incompatible.
67-
!!! error TS2345: Type 'T' is not assignable to type '[any, ...any[]]'.
68-
!!! error TS2345: Property '0' is missing in type 'any[]' but required in type '[any, ...any[]]'.
67+
!!! error TS2345: Type 'T' is not assignable to type '[T[0], ...T[number][]]'.
68+
!!! error TS2345: Property '0' is missing in type 'any[]' but required in type '[T[0], ...T[number][]]'.
6969
}
7070

7171
// Repro from #25288

tests/baselines/reference/restTuplesFromContextualTypes.types

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ function f4<T extends any[]>(t: T) {
332332
f((...x) => {});
333333
>f((...x) => {}) : void
334334
>f : (cb: (x: number, ...args: T) => void) => void
335-
>(...x) => {} : (x: number, ...args: any[]) => void
336-
>x : [number, ...any[]]
335+
>(...x) => {} : (x: number, ...args: T[number][]) => void
336+
>x : [number, ...T[number][]]
337337

338338
f((a, ...x) => {});
339339
>f((a, ...x) => {}) : void
@@ -345,10 +345,10 @@ function f4<T extends any[]>(t: T) {
345345
f((a, b, ...x) => {});
346346
>f((a, b, ...x) => {}) : void
347347
>f : (cb: (x: number, ...args: T) => void) => void
348-
>(a, b, ...x) => {} : (a: number, b: any, ...x: any[]) => void
348+
>(a, b, ...x) => {} : (a: number, b: T[0], ...x: T[number][]) => void
349349
>a : number
350-
>b : any
351-
>x : any[]
350+
>b : T[0]
351+
>x : T[number][]
352352
}
353353

354354
// Repro from #25288

0 commit comments

Comments
 (0)