|
1 | 1 | inferTypes1.ts(36,23): error TS2344: Type 'string' does not satisfy the constraint '(...args: never) => any'.
|
2 | 2 | inferTypes1.ts(37,23): error TS2344: Type 'Function' does not satisfy the constraint '(...args: never) => any'.
|
3 | 3 | Type 'Function' provides no match for the signature '(...args: never): any'.
|
4 |
| -inferTypes1.ts(43,25): error TS2344: Type 'string' does not satisfy the constraint 'abstract new (...args: any) => any'. |
5 |
| -inferTypes1.ts(44,25): error TS2344: Type 'Function' does not satisfy the constraint 'abstract new (...args: any) => any'. |
6 |
| - Type 'Function' provides no match for the signature 'new (...args: any): any'. |
| 4 | +inferTypes1.ts(43,25): error TS2344: Type 'string' does not satisfy the constraint 'abstract new (...args: never) => any'. |
| 5 | +inferTypes1.ts(44,25): error TS2344: Type 'Function' does not satisfy the constraint 'abstract new (...args: never) => any'. |
| 6 | + Type 'Function' provides no match for the signature 'new (...args: never): any'. |
7 | 7 | inferTypes1.ts(55,25): error TS2344: Type '(x: string, y: string) => number' does not satisfy the constraint '(x: any) => any'.
|
8 | 8 | Target signature provides too few arguments. Expected 2 or more, but got 1.
|
9 | 9 | inferTypes1.ts(56,25): error TS2344: Type 'Function' does not satisfy the constraint '(x: any) => any'.
|
@@ -71,11 +71,11 @@ inferTypes1.ts(153,40): error TS2322: Type 'T' is not assignable to type 'string
|
71 | 71 | type U12 = InstanceType<never>; // never
|
72 | 72 | type U13 = InstanceType<string>; // Error
|
73 | 73 | ~~~~~~
|
74 |
| -!!! error TS2344: Type 'string' does not satisfy the constraint 'abstract new (...args: any) => any'. |
| 74 | +!!! error TS2344: Type 'string' does not satisfy the constraint 'abstract new (...args: never) => any'. |
75 | 75 | type U14 = InstanceType<Function>; // Error
|
76 | 76 | ~~~~~~~~
|
77 |
| -!!! error TS2344: Type 'Function' does not satisfy the constraint 'abstract new (...args: any) => any'. |
78 |
| -!!! error TS2344: Type 'Function' provides no match for the signature 'new (...args: any): any'. |
| 77 | +!!! error TS2344: Type 'Function' does not satisfy the constraint 'abstract new (...args: never) => any'. |
| 78 | +!!! error TS2344: Type 'Function' provides no match for the signature 'new (...args: never): any'. |
79 | 79 | type U15 = InstanceType<typeof Abstract>; // Abstract
|
80 | 80 | type U16<T extends any[]> = InstanceType<new (x: string, ...args: T) => T[]>; // T[]
|
81 | 81 | type U17<T extends any[]> = InstanceType<abstract new (x: string, ...args: T) => T[]>; // T[]
|
|
0 commit comments