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
Types of parameters 'arg' and 'arg' are incompatible.
16
16
Type 'string' is not assignable to type 'T'.
17
-
'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'.
17
+
'T' could be instantiated with an arbitrary type which could be unrelated to 'string'.
18
18
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures3.ts(62,1): error TS2322: Type '(x: (arg: Base) => Derived) => Base' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U) => T'.
19
19
Types of parameters 'x' and 'x' are incompatible.
20
20
Types of parameters 'arg' and 'arg' are incompatible.
'Base' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'Base'.
20
20
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(58,9): error TS2322: Type '(...x: Base[]) => Base' is not assignable to type '<T extends Derived>(...x: T[]) => T'.
21
21
Type 'Base' is not assignable to type 'T'.
22
+
'T' could be instantiated with an arbitrary type which could be unrelated to 'Base'.
22
23
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(62,9): error TS2322: Type '(x: { foo: string; }, y: { foo: string; bar: string; }) => Base' is not assignable to type '<T extends Derived>(x: T, y: T) => T'.
23
24
Type 'Base' is not assignable to type 'T'.
25
+
'T' could be instantiated with an arbitrary type which could be unrelated to 'Base'.
24
26
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(66,9): error TS2322: Type '(x: Base[], y: Derived2[]) => Derived[]' is not assignable to type '<T extends Derived2[]>(x: Base[], y: Base[]) => T'.
25
27
Type 'Derived[]' is not assignable to type 'T'.
28
+
'T' could be instantiated with an arbitrary type which could be unrelated to 'Derived[]'.
26
29
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(69,9): error TS2322: Type '<T>(x: { a: T; b: T; }) => T' is not assignable to type '(x: { a: string; b: number; }) => number'.
27
30
Types of parameters 'x' and 'x' are incompatible.
28
31
Type '{ a: string; b: number; }' is not assignable to type '{ a: string; b: string; }'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(89,9): error TS2322: Type '<T>(x: T) => string[]' is not assignable to type '<T>(x: T) => T[]'.
48
51
Type 'string[]' is not assignable to type 'T[]'.
49
52
Type 'string' is not assignable to type 'T'.
50
-
'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'.
53
+
'T' could be instantiated with an arbitrary type which could be unrelated to 'string'.
51
54
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(90,9): error TS2322: Type '<T>(x: T) => T[]' is not assignable to type '<T>(x: T) => string[]'.
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(96,9): error TS2322: Type '<T>(x: T) => string[]' is not assignable to type '<T>(x: T) => T[]'.
58
61
Type 'string[]' is not assignable to type 'T[]'.
59
62
Type 'string' is not assignable to type 'T'.
60
-
'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'.
63
+
'T' could be instantiated with an arbitrary type which could be unrelated to 'string'.
Copy file name to clipboardExpand all lines: tests/baselines/reference/assignmentCompatWithCallSignatures5.errors.txt
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,18 @@
1
1
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts(40,1): error TS2322: Type '<T>(x: T) => void' is not assignable to type '<T>(x: T) => T'.
2
2
Type 'void' is not assignable to type 'T'.
3
+
'T' could be instantiated with an arbitrary type which could be unrelated to 'void'.
3
4
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts(52,1): error TS2322: Type '<T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base' is not assignable to type '<T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base'.
4
5
Types of parameters 'y' and 'y' are incompatible.
5
6
Type '{ foo: U; bar: U; }' is not assignable to type '{ foo: T; bar: T; }'.
6
7
Types of property 'foo' are incompatible.
7
8
Type 'U' is not assignable to type 'T'.
8
-
'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'.
9
+
'T' could be instantiated with an arbitrary type which could be unrelated to 'U'.
9
10
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts(55,1): error TS2322: Type '<T>(x: { a: T; b: T; }) => T[]' is not assignable to type '<U, V>(x: { a: U; b: V; }) => U[]'.
10
11
Types of parameters 'x' and 'x' are incompatible.
11
12
Type '{ a: U; b: V; }' is not assignable to type '{ a: U; b: U; }'.
12
13
Types of property 'b' are incompatible.
13
14
Type 'V' is not assignable to type 'U'.
14
-
'V' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'.
15
+
'U' could be instantiated with an arbitrary type which could be unrelated to 'V'.
15
16
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures5.ts(58,1): error TS2322: Type '<T extends Base>(x: { a: T; b: T; }) => T[]' is not assignable to type '<U, V>(x: { a: U; b: V; }) => U[]'.
16
17
Types of parameters 'x' and 'x' are incompatible.
17
18
Type '{ a: U; b: V; }' is not assignable to type '{ a: Base; b: Base; }'.
Copy file name to clipboardExpand all lines: tests/baselines/reference/assignmentCompatWithCallSignatures6.errors.txt
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,12 @@
1
1
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts(30,1): error TS2322: Type '<T>(x: T) => void' is not assignable to type '<T>(x: T) => T'.
2
2
Type 'void' is not assignable to type 'T'.
3
+
'T' could be instantiated with an arbitrary type which could be unrelated to 'void'.
3
4
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts(39,1): error TS2322: Type '<T>(x: { foo: T; }, y: { foo: T; bar: T; }) => Base' is not assignable to type '<T, U>(x: { foo: T; }, y: { foo: U; bar: U; }) => Base'.
4
5
Types of parameters 'y' and 'y' are incompatible.
5
6
Type '{ foo: U; bar: U; }' is not assignable to type '{ foo: T; bar: T; }'.
6
7
Types of property 'foo' are incompatible.
7
8
Type 'U' is not assignable to type 'T'.
8
-
'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'.
9
+
'T' could be instantiated with an arbitrary type which could be unrelated to 'U'.
9
10
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures6.ts(42,1): error TS2322: Type '<T extends Base>(x: { a: T; b: T; }) => T[]' is not assignable to type '<T>(x: { a: T; b: T; }) => T[]'.
10
11
Types of parameters 'x' and 'x' are incompatible.
11
12
Type '{ a: T; b: T; }' is not assignable to type '{ a: Base; b: Base; }'.
Types of parameters 'arg' and 'arg' are incompatible.
16
16
Type 'string' is not assignable to type 'T'.
17
-
'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'.
17
+
'T' could be instantiated with an arbitrary type which could be unrelated to 'string'.
18
18
tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures3.ts(62,1): error TS2322: Type 'new (x: (arg: Base) => Derived) => Base' is not assignable to type 'new <T extends Base, U extends Derived>(x: (arg: T) => U) => T'.
19
19
Types of parameters 'x' and 'x' are incompatible.
20
20
Types of parameters 'arg' and 'arg' are incompatible.
0 commit comments