|
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'. |
2 | 2 | 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][]]'. |
5 | 5 |
|
6 | 6 |
|
7 | 7 | ==== tests/cases/conformance/types/rest/restTuplesFromContextualTypes.ts (1 errors) ====
|
@@ -62,10 +62,10 @@ tests/cases/conformance/types/rest/restTuplesFromContextualTypes.ts(56,7): error
|
62 | 62 | f((a, ...x) => {});
|
63 | 63 | f((a, b, ...x) => {});
|
64 | 64 | ~~~~~~~~~~~~~~~~~~
|
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'. |
66 | 66 | !!! 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][]]'. |
69 | 69 | }
|
70 | 70 |
|
71 | 71 | // Repro from #25288
|
|
0 commit comments