You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/baselines/reference/variadicTuples2.errors.txt
+10-10
Original file line number
Diff line number
Diff line change
@@ -36,12 +36,12 @@ tests/cases/conformance/types/tuple/variadicTuples2.ts(71,5): error TS2322: Type
36
36
tests/cases/conformance/types/tuple/variadicTuples2.ts(72,5): error TS2322: Type '[number, ...number[]]' is not assignable to type '[number, ...T]'.
37
37
Target requires 2 element(s) but source may have fewer.
38
38
tests/cases/conformance/types/tuple/variadicTuples2.ts(73,5): error TS2322: Type '[number, ...T]' is not assignable to type '[number, number]'.
39
-
Variadic element at position 1 in source does not match element at position 1 in target.
39
+
Type '[number, ...unknown[]]' is not assignable to type '[number, number]'.
40
+
Target requires 2 element(s) but source may have fewer.
40
41
tests/cases/conformance/types/tuple/variadicTuples2.ts(74,5): error TS2322: Type '[number, ...T]' is not assignable to type '[number, ...number[]]'.
41
-
Type at position 1 in source is not compatible with type at position 1 in target.
42
-
Type 'T' is not assignable to type 'number[]'.
43
-
Type 'unknown[]' is not assignable to type 'number[]'.
44
-
Type 'unknown' is not assignable to type 'number'.
42
+
Type '[number, ...unknown[]]' is not assignable to type '[number, ...number[]]'.
43
+
Type at position 1 in source is not compatible with type at position 1 in target.
44
+
Type 'unknown' is not assignable to type 'number'.
45
45
tests/cases/conformance/types/tuple/variadicTuples2.ts(79,5): error TS2322: Type '[number, string, ...any[]]' is not assignable to type '[number, ...number[]]'.
46
46
Type at positions 1 through 2 in source is not compatible with type at position 1 in target.
47
47
Type 'string' is not assignable to type 'number'.
@@ -195,14 +195,14 @@ tests/cases/conformance/types/tuple/variadicTuples2.ts(134,25): error TS2345: Ar
195
195
y = x; // Error
196
196
~
197
197
!!! error TS2322: Type '[number, ...T]' is not assignable to type '[number, number]'.
198
-
!!! error TS2322: Variadic element at position 1 in source does not match element at position 1 in target.
198
+
!!! error TS2322: Type '[number, ...unknown[]]' is not assignable to type '[number, number]'.
199
+
!!! error TS2322: Target requires 2 element(s) but source may have fewer.
199
200
z = x; // Error
200
201
~
201
202
!!! error TS2322: Type '[number, ...T]' is not assignable to type '[number, ...number[]]'.
202
-
!!! error TS2322: Type at position 1 in source is not compatible with type at position 1 in target.
203
-
!!! error TS2322: Type 'T' is not assignable to type 'number[]'.
204
-
!!! error TS2322: Type 'unknown[]' is not assignable to type 'number[]'.
205
-
!!! error TS2322: Type 'unknown' is not assignable to type 'number'.
203
+
!!! error TS2322: Type '[number, ...unknown[]]' is not assignable to type '[number, ...number[]]'.
204
+
!!! error TS2322: Type at position 1 in source is not compatible with type at position 1 in target.
205
+
!!! error TS2322: Type 'unknown' is not assignable to type 'number'.
0 commit comments