|
1 | 1 | tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(52,9): error TS2322: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
2 | 2 | Types of parameters 'y' and 'y' are incompatible.
|
3 |
| - Types of parameters 'arg2' and 'arg2' are incompatible. |
4 |
| - Type '{ foo: number; }' is not assignable to type 'Base'. |
5 |
| - Types of property 'foo' are incompatible. |
6 |
| - Type 'number' is not assignable to type 'string'. |
| 3 | + Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'. |
| 4 | + Types of parameters 'arg2' and 'arg2' are incompatible. |
| 5 | + Type '{ foo: number; }' is not assignable to type 'Base'. |
| 6 | + Types of property 'foo' are incompatible. |
| 7 | + Type 'number' is not assignable to type 'string'. |
7 | 8 | tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts(53,9): error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
8 | 9 | Types of parameters 'y' and 'y' are incompatible.
|
9 |
| - Types of parameters 'arg2' and 'arg2' are incompatible. |
10 |
| - Type 'Base' is not assignable to type '{ foo: number; }'. |
11 |
| - Types of property 'foo' are incompatible. |
12 |
| - Type 'string' is not assignable to type 'number'. |
| 10 | + Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. |
| 11 | + Types of parameters 'arg2' and 'arg2' are incompatible. |
| 12 | + Type 'Base' is not assignable to type '{ foo: number; }'. |
| 13 | + Types of property 'foo' are incompatible. |
| 14 | + Type 'string' is not assignable to type 'number'. |
13 | 15 |
|
14 | 16 |
|
15 | 17 | ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithCallSignatures4.ts (2 errors) ====
|
@@ -68,18 +70,20 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme
|
68 | 70 | ~~
|
69 | 71 | !!! error TS2322: Type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived'.
|
70 | 72 | !!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
71 |
| -!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible. |
72 |
| -!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base'. |
73 |
| -!!! error TS2322: Types of property 'foo' are incompatible. |
74 |
| -!!! error TS2322: Type 'number' is not assignable to type 'string'. |
| 73 | +!!! error TS2322: Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any'. |
| 74 | +!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible. |
| 75 | +!!! error TS2322: Type '{ foo: number; }' is not assignable to type 'Base'. |
| 76 | +!!! error TS2322: Types of property 'foo' are incompatible. |
| 77 | +!!! error TS2322: Type 'number' is not assignable to type 'string'. |
75 | 78 | b8 = a8; // error, { foo: number } and Base are incompatible
|
76 | 79 | ~~
|
77 | 80 | !!! error TS2322: Type '(x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type '<T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U'.
|
78 | 81 | !!! error TS2322: Types of parameters 'y' and 'y' are incompatible.
|
79 |
| -!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible. |
80 |
| -!!! error TS2322: Type 'Base' is not assignable to type '{ foo: number; }'. |
81 |
| -!!! error TS2322: Types of property 'foo' are incompatible. |
82 |
| -!!! error TS2322: Type 'string' is not assignable to type 'number'. |
| 82 | +!!! error TS2322: Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived'. |
| 83 | +!!! error TS2322: Types of parameters 'arg2' and 'arg2' are incompatible. |
| 84 | +!!! error TS2322: Type 'Base' is not assignable to type '{ foo: number; }'. |
| 85 | +!!! error TS2322: Types of property 'foo' are incompatible. |
| 86 | +!!! error TS2322: Type 'string' is not assignable to type 'number'. |
83 | 87 |
|
84 | 88 |
|
85 | 89 | var b10: <T extends Derived>(...x: T[]) => T;
|
|
0 commit comments