|
1 |
| -tests/cases/conformance/types/conditional/inferTypes1.ts(31,23): error TS2344: Type 'string' does not satisfy the constraint '(...args: any) => any'. |
2 |
| -tests/cases/conformance/types/conditional/inferTypes1.ts(32,23): error TS2344: Type 'Function' does not satisfy the constraint '(...args: any) => any'. |
3 |
| - Type 'Function' provides no match for the signature '(...args: any): any'. |
4 |
| -tests/cases/conformance/types/conditional/inferTypes1.ts(38,25): error TS2344: Type 'string' does not satisfy the constraint 'new (...args: any) => any'. |
5 |
| -tests/cases/conformance/types/conditional/inferTypes1.ts(39,25): error TS2344: Type 'Function' does not satisfy the constraint 'new (...args: any) => any'. |
6 |
| - Type 'Function' provides no match for the signature 'new (...args: any): any'. |
| 1 | +tests/cases/conformance/types/conditional/inferTypes1.ts(31,23): error TS2344: Type 'string' does not satisfy the constraint '(...args: any[]) => any'. |
| 2 | +tests/cases/conformance/types/conditional/inferTypes1.ts(32,23): error TS2344: Type 'Function' does not satisfy the constraint '(...args: any[]) => any'. |
| 3 | + Type 'Function' provides no match for the signature '(...args: any[]): any'. |
| 4 | +tests/cases/conformance/types/conditional/inferTypes1.ts(38,25): error TS2344: Type 'string' does not satisfy the constraint 'new (...args: any[]) => any'. |
| 5 | +tests/cases/conformance/types/conditional/inferTypes1.ts(39,25): error TS2344: Type 'Function' does not satisfy the constraint 'new (...args: any[]) => any'. |
| 6 | + Type 'Function' provides no match for the signature 'new (...args: any[]): any'. |
7 | 7 | tests/cases/conformance/types/conditional/inferTypes1.ts(47,25): error TS2344: Type '(x: string, y: string) => number' does not satisfy the constraint '(x: any) => any'.
|
8 | 8 | tests/cases/conformance/types/conditional/inferTypes1.ts(48,25): error TS2344: Type 'Function' does not satisfy the constraint '(x: any) => any'.
|
9 | 9 | Type 'Function' provides no match for the signature '(x: any): any'.
|
@@ -54,23 +54,23 @@ tests/cases/conformance/types/conditional/inferTypes1.ts(145,40): error TS2322:
|
54 | 54 | type T16 = ReturnType<never>; // never
|
55 | 55 | type T17 = ReturnType<string>; // Error
|
56 | 56 | ~~~~~~
|
57 |
| -!!! error TS2344: Type 'string' does not satisfy the constraint '(...args: any) => any'. |
| 57 | +!!! error TS2344: Type 'string' does not satisfy the constraint '(...args: any[]) => any'. |
58 | 58 | type T18 = ReturnType<Function>; // Error
|
59 | 59 | ~~~~~~~~
|
60 |
| -!!! error TS2344: Type 'Function' does not satisfy the constraint '(...args: any) => any'. |
61 |
| -!!! error TS2344: Type 'Function' provides no match for the signature '(...args: any): any'. |
| 60 | +!!! error TS2344: Type 'Function' does not satisfy the constraint '(...args: any[]) => any'. |
| 61 | +!!! error TS2344: Type 'Function' provides no match for the signature '(...args: any[]): any'. |
62 | 62 | type T19<T extends any[]> = ReturnType<(x: string, ...args: T) => T[]>; // T[]
|
63 | 63 |
|
64 | 64 | type U10 = InstanceType<typeof C>; // C
|
65 | 65 | type U11 = InstanceType<any>; // any
|
66 | 66 | type U12 = InstanceType<never>; // never
|
67 | 67 | type U13 = InstanceType<string>; // Error
|
68 | 68 | ~~~~~~
|
69 |
| -!!! error TS2344: Type 'string' does not satisfy the constraint 'new (...args: any) => any'. |
| 69 | +!!! error TS2344: Type 'string' does not satisfy the constraint 'new (...args: any[]) => any'. |
70 | 70 | type U14 = InstanceType<Function>; // Error
|
71 | 71 | ~~~~~~~~
|
72 |
| -!!! error TS2344: Type 'Function' does not satisfy the constraint 'new (...args: any) => any'. |
73 |
| -!!! error TS2344: Type 'Function' provides no match for the signature 'new (...args: any): any'. |
| 72 | +!!! error TS2344: Type 'Function' does not satisfy the constraint 'new (...args: any[]) => any'. |
| 73 | +!!! error TS2344: Type 'Function' provides no match for the signature 'new (...args: any[]): any'. |
74 | 74 |
|
75 | 75 | type ArgumentType<T extends (x: any) => any> = T extends (a: infer A) => any ? A : any;
|
76 | 76 |
|
|
0 commit comments