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/assignmentCompatWithCallSignatures5.errors.txt
+6-4
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
+
'void' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'unknown'.
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
+
'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'unknown'.
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
+
'V' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'unknown'.
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; }'.
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
+
'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'unknown'.
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.
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
144
144
!!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible.
145
145
!!! error TS2322: Type 'string' is not assignable to type 'T'.
146
-
!!! error TS2322: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'.
146
+
!!! error TS2322: 'string' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'unknown'.
147
147
var b6: new <T extends Base, U extends Derived>(x: (arg: T) => U) => T;
0 commit comments