|
52 | 52 | var b8: new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U; |
53 | 53 | a8 = b8; // error, type mismatch |
54 | 54 | ~~ |
55 | | -!!! Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': |
| 55 | +!!! Type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r...' is not assignable to type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived': |
56 | 56 | !!! Types of parameters 'y' and 'y' are incompatible: |
57 | 57 | !!! Type '(arg2: { foo: number; }) => any' is not assignable to type '(arg2: Base) => Derived': |
58 | 58 | !!! Types of parameters 'arg2' and 'arg2' are incompatible: |
|
61 | 61 | !!! Type 'number' is not assignable to type 'string'. |
62 | 62 | b8 = a8; // error |
63 | 63 | ~~ |
64 | | -!!! Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r: T) => U': |
| 64 | +!!! Type 'new (x: (arg: Base) => Derived, y: (arg2: Base) => Derived) => (r: Base) => Derived' is not assignable to type 'new <T extends Base, U extends Derived>(x: (arg: T) => U, y: (arg2: { foo: number; }) => U) => (r...': |
65 | 65 | !!! Types of parameters 'y' and 'y' are incompatible: |
66 | 66 | !!! Type '(arg2: Base) => Derived' is not assignable to type '(arg2: { foo: number; }) => any': |
67 | 67 | !!! Types of parameters 'arg2' and 'arg2' are incompatible: |
|
93 | 93 | var b16: new <T>(x: (a: T) => T) => T[]; |
94 | 94 | a16 = b16; // error |
95 | 95 | ~~~ |
96 | | -!!! Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }': |
| 96 | +!!! Type 'new <T>(x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: bo...': |
97 | 97 | !!! Types of parameters 'x' and 'x' are incompatible: |
98 | 98 | !!! Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'. |
99 | 99 | b16 = a16; // error |
100 | 100 | ~~~ |
101 | | -!!! Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => T[]': |
| 101 | +!!! Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: bo...' is not assignable to type 'new <T>(x: (a: T) => T) => T[]': |
102 | 102 | !!! Types of parameters 'x' and 'x' are incompatible: |
103 | 103 | !!! Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'. |
104 | 104 |
|
105 | 105 | var b17: new <T>(x: (a: T) => T) => any[]; |
106 | 106 | a17 = b17; // error |
107 | 107 | ~~~ |
108 | | -!!! Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }': |
| 108 | +!!! Type 'new <T>(x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: {...': |
109 | 109 | !!! Types of parameters 'x' and 'x' are incompatible: |
110 | 110 | !!! Type '(a: any) => any' is not assignable to type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }'. |
111 | 111 | b17 = a17; // error |
112 | 112 | ~~~ |
113 | | -!!! Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: { new <T extends Derived2>(a: T): T; new <T extends Base>(a: T): T; }): any[]; }' is not assignable to type 'new <T>(x: (a: T) => T) => any[]': |
| 113 | +!!! Type '{ new (x: { new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }): any[]; new (x: {...' is not assignable to type 'new <T>(x: (a: T) => T) => any[]': |
114 | 114 | !!! Types of parameters 'x' and 'x' are incompatible: |
115 | 115 | !!! Type '{ new <T extends Derived>(a: T): T; new <T extends Base>(a: T): T; }' is not assignable to type '(a: any) => any'. |
116 | 116 | } |
|
0 commit comments