Skip to content

Commit f2ca85d

Browse files
committed
More baseline-changes
1 parent 16fab8a commit f2ca85d

10 files changed

+184
-182
lines changed

Diff for: tests/baselines/reference/assignmentCompatWithCallSignatures5.errors.txt

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
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'.
22
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'.
34
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'.
45
Types of parameters 'y' and 'y' are incompatible.
56
Type '{ foo: U; bar: U; }' is not assignable to type '{ foo: T; bar: T; }'.
67
Types of property 'foo' are incompatible.
78
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'.
910
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[]'.
1011
Types of parameters 'x' and 'x' are incompatible.
1112
Type '{ a: U; b: V; }' is not assignable to type '{ a: U; b: U; }'.
1213
Types of property 'b' are incompatible.
1314
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'.
1516
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[]'.
1617
Types of parameters 'x' and 'x' are incompatible.
1718
Type '{ a: U; b: V; }' is not assignable to type '{ a: Base; b: Base; }'.
@@ -63,6 +64,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
6364
~~
6465
!!! error TS2322: Type '<T>(x: T) => void' is not assignable to type '<T>(x: T) => T'.
6566
!!! error TS2322: Type 'void' is not assignable to type 'T'.
67+
!!! error TS2322: 'void' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'unknown'.
6668
var b4: <T, U>(x: T, y: U) => string;
6769
a4 = b4; // ok
6870
b4 = a4; // ok
@@ -81,7 +83,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
8183
!!! error TS2322: Type '{ foo: U; bar: U; }' is not assignable to type '{ foo: T; bar: T; }'.
8284
!!! error TS2322: Types of property 'foo' are incompatible.
8385
!!! error TS2322: Type 'U' is not assignable to type 'T'.
84-
!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint '{}'.
86+
!!! error TS2322: 'U' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'unknown'.
8587
var b15: <U, V>(x: { a: U; b: V; }) => U[];
8688
a15 = b15; // ok, T = U, T = V
8789
b15 = a15; // ok
@@ -91,7 +93,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
9193
!!! error TS2322: Type '{ a: U; b: V; }' is not assignable to type '{ a: U; b: U; }'.
9294
!!! error TS2322: Types of property 'b' are incompatible.
9395
!!! error TS2322: Type 'V' is not assignable to type 'U'.
94-
!!! error TS2322: 'V' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint '{}'.
96+
!!! error TS2322: 'V' is assignable to the constraint of type 'U', but 'U' could be instantiated with a different subtype of constraint 'unknown'.
9597
var b16: <T>(x: { a: T; b: T }) => T[];
9698
a15 = b16; // ok
9799
b15 = a16; // ok

Diff for: tests/baselines/reference/assignmentCompatWithConstructSignatures3.errors.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
1414
Types of parameters 'x' and 'x' are incompatible.
1515
Types of parameters 'arg' and 'arg' are incompatible.
1616
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'.
1818
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'.
1919
Types of parameters 'x' and 'x' are incompatible.
2020
Types of parameters 'arg' and 'arg' are incompatible.
@@ -143,7 +143,7 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
143143
!!! error TS2322: Types of parameters 'x' and 'x' are incompatible.
144144
!!! error TS2322: Types of parameters 'arg' and 'arg' are incompatible.
145145
!!! 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'.
147147
var b6: new <T extends Base, U extends Derived>(x: (arg: T) => U) => T;
148148
a6 = b6; // ok
149149
b6 = a6; // ok

0 commit comments

Comments
 (0)