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
tests/cases/compiler/contextualTupleTypeParameterReadonly.ts(10,8): error TS2345: Argument of type '(a: 1 | 2, b: "1" | "2") => void' is not assignable to parameter of type '(...args: readonly [1, "1"] | readonly [2, "2"]) => any'.
2
+
Types of parameters 'a' and 'args' are incompatible.
3
+
Type 'readonly [1, "1"] | readonly [2, "2"]' is not assignable to type '[a: 1 | 2, b: "1" | "2"]'.
4
+
The type 'readonly [1, "1"]' is 'readonly' and cannot be assigned to the mutable type '[a: 1 | 2, b: "1" | "2"]'.
!!! error TS2345: Argument of type '(a: 1 | 2, b: "1" | "2") => void' is not assignable to parameter of type '(...args: readonly [1, "1"] | readonly [2, "2"]) => any'.
20
+
!!! error TS2345: Types of parameters 'a' and 'args' are incompatible.
21
+
!!! error TS2345: Type 'readonly [1, "1"] | readonly [2, "2"]' is not assignable to type '[a: 1 | 2, b: "1" | "2"]'.
22
+
!!! error TS2345: The type 'readonly [1, "1"]' is 'readonly' and cannot be assigned to the mutable type '[a: 1 | 2, b: "1" | "2"]'.
tests/cases/conformance/types/rest/genericRestParameters3.ts(23,1): error TS2322: Type '(x: string, y: string) => void' is not assignable to type '(x: string, ...args: [string] | [number, boolean]) => void'.
8
8
Types of parameters 'y' and 'args' are incompatible.
9
-
Type '[string] | [number, boolean]' is not assignable to type 'readonly [y: string]'.
10
-
Type '[number, boolean]' is not assignable to type 'readonly [y: string]'.
9
+
Type '[string] | [number, boolean]' is not assignable to type '[y: string]'.
10
+
Type '[number, boolean]' is not assignable to type '[y: string]'.
11
11
Source has 2 element(s) but target allows only 1.
12
12
tests/cases/conformance/types/rest/genericRestParameters3.ts(24,1): error TS2322: Type '(x: string, y: number, z: boolean) => void' is not assignable to type '(x: string, ...args: [string] | [number, boolean]) => void'.
13
13
Types of parameters 'y' and 'args' are incompatible.
14
-
Type '[string] | [number, boolean]' is not assignable to type 'readonly [y: number, z: boolean]'.
15
-
Type '[string]' is not assignable to type 'readonly [y: number, z: boolean]'.
14
+
Type '[string] | [number, boolean]' is not assignable to type '[y: number, z: boolean]'.
15
+
Type '[string]' is not assignable to type '[y: number, z: boolean]'.
16
16
Source has 1 element(s) but target requires 2.
17
17
tests/cases/conformance/types/rest/genericRestParameters3.ts(35,1): error TS2554: Expected 1 arguments, but got 0.
18
18
tests/cases/conformance/types/rest/genericRestParameters3.ts(36,21): error TS2345: Argument of type 'number' is not assignable to parameter of type '(...args: CoolArray<any>) => void'.
19
19
tests/cases/conformance/types/rest/genericRestParameters3.ts(37,21): error TS2345: Argument of type '<T extends any[]>(cb: (...args: T) => void) => void' is not assignable to parameter of type '(...args: CoolArray<any>) => void'.
20
20
Types of parameters 'cb' and 'args' are incompatible.
21
-
Property '0' is missing in type 'CoolArray<any>' but required in type 'readonly [cb: (...args: any[]) => void]'.
21
+
Property '0' is missing in type 'CoolArray<any>' but required in type '[cb: (...args: any[]) => void]'.
22
22
tests/cases/conformance/types/rest/genericRestParameters3.ts(44,32): error TS2345: Argument of type '[10, 20]' is not assignable to parameter of type 'CoolArray<number>'.
23
23
Property 'hello' is missing in type '[10, 20]' but required in type 'CoolArray<number>'.
24
24
tests/cases/conformance/types/rest/genericRestParameters3.ts(49,1): error TS2345: Argument of type '[]' is not assignable to parameter of type 'CoolArray<never>'.
!!! error TS2345: Argument of type '<T extends any[]>(cb: (...args: T) => void) => void' is not assignable to parameter of type '(...args: CoolArray<any>) => void'.
102
102
!!! error TS2345: Types of parameters 'cb' and 'args' are incompatible.
103
-
!!! error TS2345: Property '0' is missing in type 'CoolArray<any>' but required in type 'readonly [cb: (...args: any[]) => void]'.
103
+
!!! error TS2345: Property '0' is missing in type 'CoolArray<any>' but required in type '[cb: (...args: any[]) => void]'.
Copy file name to clipboardExpand all lines: tests/baselines/reference/restTuplesFromContextualTypes.errors.txt
+4-4
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
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 'readonly [b: T[0], ...x: T[number][]]'.
4
-
Type 'any[]' is not assignable to type 'readonly [b: T[0], ...x: T[number][]]'.
3
+
Type 'T' is not assignable to type '[b: T[0], ...x: T[number][]]'.
4
+
Type 'any[]' is not assignable to type '[b: T[0], ...x: T[number][]]'.
5
5
Source provides no match for required element at position 0 in target.
!!! 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'.
67
67
!!! error TS2345: Types of parameters 'b' and 'args' are incompatible.
68
-
!!! error TS2345: Type 'T' is not assignable to type 'readonly [b: T[0], ...x: T[number][]]'.
69
-
!!! error TS2345: Type 'any[]' is not assignable to type 'readonly [b: T[0], ...x: T[number][]]'.
68
+
!!! error TS2345: Type 'T' is not assignable to type '[b: T[0], ...x: T[number][]]'.
69
+
!!! error TS2345: Type 'any[]' is not assignable to type '[b: T[0], ...x: T[number][]]'.
70
70
!!! error TS2345: Source provides no match for required element at position 0 in target.
0 commit comments