|
1 |
| -constraintWithIndexedAccess.ts(23,90): error TS2344: Type 'TypeHardcodedAsParameterWithoutReturnType<T, F>' does not satisfy the constraint '(...args: any) => any'. |
2 |
| - Type 'DataFetchFns[T][keyof DataFetchFns[T]]' is not assignable to type '(...args: any) => any'. |
3 |
| - Type 'DataFetchFns[T][string] | DataFetchFns[T][number] | DataFetchFns[T][symbol]' is not assignable to type '(...args: any) => any'. |
4 |
| - Type 'DataFetchFns[T][string]' is not assignable to type '(...args: any) => any'. |
5 |
| -constraintWithIndexedAccess.ts(24,102): error TS2344: Type 'DataFetchFns[T][F]' does not satisfy the constraint '(...args: any) => any'. |
6 |
| - Type 'DataFetchFns[T][keyof DataFetchFns[T]]' is not assignable to type '(...args: any) => any'. |
7 |
| - Type 'DataFetchFns[T][string] | DataFetchFns[T][number] | DataFetchFns[T][symbol]' is not assignable to type '(...args: any) => any'. |
8 |
| - Type 'DataFetchFns[T][string]' is not assignable to type '(...args: any) => any'. |
9 |
| -constraintWithIndexedAccess.ts(26,103): error TS2344: Type 'VehicleSelector<T>[F]' does not satisfy the constraint '(...args: any) => any'. |
10 |
| - Type 'VehicleSelector<T>[keyof DataFetchFns[T]]' is not assignable to type '(...args: any) => any'. |
11 |
| - Type 'VehicleSelector<T>[string] | VehicleSelector<T>[number] | VehicleSelector<T>[symbol]' is not assignable to type '(...args: any) => any'. |
12 |
| - Type 'VehicleSelector<T>[string]' is not assignable to type '(...args: any) => any'. |
13 |
| -constraintWithIndexedAccess.ts(27,102): error TS2344: Type 'DataFetchFns[T][F]' does not satisfy the constraint '(...args: any) => any'. |
14 |
| - Type 'DataFetchFns[T][keyof DataFetchFns[T]]' is not assignable to type '(...args: any) => any'. |
15 |
| - Type 'DataFetchFns[T][string] | DataFetchFns[T][number] | DataFetchFns[T][symbol]' is not assignable to type '(...args: any) => any'. |
16 |
| - Type 'DataFetchFns[T][string]' is not assignable to type '(...args: any) => any'. |
17 |
| -constraintWithIndexedAccess.ts(28,102): error TS2344: Type 'DataFetchFns[T][T]' does not satisfy the constraint '(...args: any) => any'. |
18 |
| - Type 'DataFetchFns[T]["Boat"] | DataFetchFns[T]["Plane"]' is not assignable to type '(...args: any) => any'. |
19 |
| - Type 'DataFetchFns[T]["Boat"]' is not assignable to type '(...args: any) => any'. |
| 1 | +constraintWithIndexedAccess.ts(23,90): error TS2344: Type 'TypeHardcodedAsParameterWithoutReturnType<T, F>' does not satisfy the constraint '(...args: never) => any'. |
| 2 | + Type 'DataFetchFns[T][keyof DataFetchFns[T]]' is not assignable to type '(...args: never) => any'. |
| 3 | + Type 'DataFetchFns[T][string] | DataFetchFns[T][number] | DataFetchFns[T][symbol]' is not assignable to type '(...args: never) => any'. |
| 4 | + Type 'DataFetchFns[T][string]' is not assignable to type '(...args: never) => any'. |
| 5 | +constraintWithIndexedAccess.ts(24,102): error TS2344: Type 'DataFetchFns[T][F]' does not satisfy the constraint '(...args: never) => any'. |
| 6 | + Type 'DataFetchFns[T][keyof DataFetchFns[T]]' is not assignable to type '(...args: never) => any'. |
| 7 | + Type 'DataFetchFns[T][string] | DataFetchFns[T][number] | DataFetchFns[T][symbol]' is not assignable to type '(...args: never) => any'. |
| 8 | + Type 'DataFetchFns[T][string]' is not assignable to type '(...args: never) => any'. |
| 9 | +constraintWithIndexedAccess.ts(26,103): error TS2344: Type 'VehicleSelector<T>[F]' does not satisfy the constraint '(...args: never) => any'. |
| 10 | + Type 'VehicleSelector<T>[keyof DataFetchFns[T]]' is not assignable to type '(...args: never) => any'. |
| 11 | + Type 'VehicleSelector<T>[string] | VehicleSelector<T>[number] | VehicleSelector<T>[symbol]' is not assignable to type '(...args: never) => any'. |
| 12 | + Type 'VehicleSelector<T>[string]' is not assignable to type '(...args: never) => any'. |
| 13 | +constraintWithIndexedAccess.ts(27,102): error TS2344: Type 'DataFetchFns[T][F]' does not satisfy the constraint '(...args: never) => any'. |
| 14 | + Type 'DataFetchFns[T][keyof DataFetchFns[T]]' is not assignable to type '(...args: never) => any'. |
| 15 | + Type 'DataFetchFns[T][string] | DataFetchFns[T][number] | DataFetchFns[T][symbol]' is not assignable to type '(...args: never) => any'. |
| 16 | + Type 'DataFetchFns[T][string]' is not assignable to type '(...args: never) => any'. |
| 17 | +constraintWithIndexedAccess.ts(28,102): error TS2344: Type 'DataFetchFns[T][T]' does not satisfy the constraint '(...args: never) => any'. |
| 18 | + Type 'DataFetchFns[T]["Boat"] | DataFetchFns[T]["Plane"]' is not assignable to type '(...args: never) => any'. |
| 19 | + Type 'DataFetchFns[T]["Boat"]' is not assignable to type '(...args: never) => any'. |
20 | 20 | constraintWithIndexedAccess.ts(28,102): error TS2536: Type 'T' cannot be used to index type 'DataFetchFns[T]'.
|
21 | 21 | constraintWithIndexedAccess.ts(29,102): error TS2536: Type 'F' cannot be used to index type 'DataFetchFns'.
|
22 |
| -constraintWithIndexedAccess.ts(29,102): error TS2344: Type 'DataFetchFns[F][F]' does not satisfy the constraint '(...args: any) => any'. |
23 |
| - Type 'DataFetchFns[F][keyof DataFetchFns[T]]' is not assignable to type '(...args: any) => any'. |
24 |
| - Type 'DataFetchFns[F][string] | DataFetchFns[F][number] | DataFetchFns[F][symbol]' is not assignable to type '(...args: any) => any'. |
25 |
| - Type 'DataFetchFns[F][string]' is not assignable to type '(...args: any) => any'. |
26 |
| - Type 'DataFetchFns[keyof DataFetchFns[T]][string]' is not assignable to type '(...args: any) => any'. |
| 22 | +constraintWithIndexedAccess.ts(29,102): error TS2344: Type 'DataFetchFns[F][F]' does not satisfy the constraint '(...args: never) => any'. |
| 23 | + Type 'DataFetchFns[F][keyof DataFetchFns[T]]' is not assignable to type '(...args: never) => any'. |
| 24 | + Type 'DataFetchFns[F][string] | DataFetchFns[F][number] | DataFetchFns[F][symbol]' is not assignable to type '(...args: never) => any'. |
| 25 | + Type 'DataFetchFns[F][string]' is not assignable to type '(...args: never) => any'. |
| 26 | + Type 'DataFetchFns[keyof DataFetchFns[T]][string]' is not assignable to type '(...args: never) => any'. |
27 | 27 | constraintWithIndexedAccess.ts(29,102): error TS2536: Type 'F' cannot be used to index type 'DataFetchFns[F]'.
|
28 | 28 |
|
29 | 29 |
|
@@ -52,45 +52,45 @@ constraintWithIndexedAccess.ts(29,102): error TS2536: Type 'F' cannot be used to
|
52 | 52 | export type SucceedingCombo = ReturnType<TypeHardcodedAsParameterWithoutReturnType<'Boat', keyof DataFetchFns['Boat']>>;
|
53 | 53 | export type FailingCombo<T extends 'Boat', F extends keyof DataFetchFns[T]> = ReturnType<TypeHardcodedAsParameterWithoutReturnType<T,F>>;
|
54 | 54 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
55 |
| -!!! error TS2344: Type 'TypeHardcodedAsParameterWithoutReturnType<T, F>' does not satisfy the constraint '(...args: any) => any'. |
56 |
| -!!! error TS2344: Type 'DataFetchFns[T][keyof DataFetchFns[T]]' is not assignable to type '(...args: any) => any'. |
57 |
| -!!! error TS2344: Type 'DataFetchFns[T][string] | DataFetchFns[T][number] | DataFetchFns[T][symbol]' is not assignable to type '(...args: any) => any'. |
58 |
| -!!! error TS2344: Type 'DataFetchFns[T][string]' is not assignable to type '(...args: any) => any'. |
| 55 | +!!! error TS2344: Type 'TypeHardcodedAsParameterWithoutReturnType<T, F>' does not satisfy the constraint '(...args: never) => any'. |
| 56 | +!!! error TS2344: Type 'DataFetchFns[T][keyof DataFetchFns[T]]' is not assignable to type '(...args: never) => any'. |
| 57 | +!!! error TS2344: Type 'DataFetchFns[T][string] | DataFetchFns[T][number] | DataFetchFns[T][symbol]' is not assignable to type '(...args: never) => any'. |
| 58 | +!!! error TS2344: Type 'DataFetchFns[T][string]' is not assignable to type '(...args: never) => any'. |
59 | 59 | export type TypeHardcodedAsParameter<T extends 'Boat', F extends keyof DataFetchFns[T]> = ReturnType<DataFetchFns[T][F]>;
|
60 | 60 | ~~~~~~~~~~~~~~~~~~
|
61 |
| -!!! error TS2344: Type 'DataFetchFns[T][F]' does not satisfy the constraint '(...args: any) => any'. |
62 |
| -!!! error TS2344: Type 'DataFetchFns[T][keyof DataFetchFns[T]]' is not assignable to type '(...args: any) => any'. |
63 |
| -!!! error TS2344: Type 'DataFetchFns[T][string] | DataFetchFns[T][number] | DataFetchFns[T][symbol]' is not assignable to type '(...args: any) => any'. |
64 |
| -!!! error TS2344: Type 'DataFetchFns[T][string]' is not assignable to type '(...args: any) => any'. |
| 61 | +!!! error TS2344: Type 'DataFetchFns[T][F]' does not satisfy the constraint '(...args: never) => any'. |
| 62 | +!!! error TS2344: Type 'DataFetchFns[T][keyof DataFetchFns[T]]' is not assignable to type '(...args: never) => any'. |
| 63 | +!!! error TS2344: Type 'DataFetchFns[T][string] | DataFetchFns[T][number] | DataFetchFns[T][symbol]' is not assignable to type '(...args: never) => any'. |
| 64 | +!!! error TS2344: Type 'DataFetchFns[T][string]' is not assignable to type '(...args: never) => any'. |
65 | 65 | type VehicleSelector<T extends keyof DataFetchFns> = DataFetchFns[T];
|
66 | 66 | export type TypeHardcodedAsParameter2<T extends 'Boat', F extends keyof DataFetchFns[T]> = ReturnType<VehicleSelector<T>[F]>;
|
67 | 67 | ~~~~~~~~~~~~~~~~~~~~~
|
68 |
| -!!! error TS2344: Type 'VehicleSelector<T>[F]' does not satisfy the constraint '(...args: any) => any'. |
69 |
| -!!! error TS2344: Type 'VehicleSelector<T>[keyof DataFetchFns[T]]' is not assignable to type '(...args: any) => any'. |
70 |
| -!!! error TS2344: Type 'VehicleSelector<T>[string] | VehicleSelector<T>[number] | VehicleSelector<T>[symbol]' is not assignable to type '(...args: any) => any'. |
71 |
| -!!! error TS2344: Type 'VehicleSelector<T>[string]' is not assignable to type '(...args: any) => any'. |
| 68 | +!!! error TS2344: Type 'VehicleSelector<T>[F]' does not satisfy the constraint '(...args: never) => any'. |
| 69 | +!!! error TS2344: Type 'VehicleSelector<T>[keyof DataFetchFns[T]]' is not assignable to type '(...args: never) => any'. |
| 70 | +!!! error TS2344: Type 'VehicleSelector<T>[string] | VehicleSelector<T>[number] | VehicleSelector<T>[symbol]' is not assignable to type '(...args: never) => any'. |
| 71 | +!!! error TS2344: Type 'VehicleSelector<T>[string]' is not assignable to type '(...args: never) => any'. |
72 | 72 | export type TypeGeneric1<T extends keyof DataFetchFns, F extends keyof DataFetchFns[T]> = ReturnType<DataFetchFns[T][F]>;
|
73 | 73 | ~~~~~~~~~~~~~~~~~~
|
74 |
| -!!! error TS2344: Type 'DataFetchFns[T][F]' does not satisfy the constraint '(...args: any) => any'. |
75 |
| -!!! error TS2344: Type 'DataFetchFns[T][keyof DataFetchFns[T]]' is not assignable to type '(...args: any) => any'. |
76 |
| -!!! error TS2344: Type 'DataFetchFns[T][string] | DataFetchFns[T][number] | DataFetchFns[T][symbol]' is not assignable to type '(...args: any) => any'. |
77 |
| -!!! error TS2344: Type 'DataFetchFns[T][string]' is not assignable to type '(...args: any) => any'. |
| 74 | +!!! error TS2344: Type 'DataFetchFns[T][F]' does not satisfy the constraint '(...args: never) => any'. |
| 75 | +!!! error TS2344: Type 'DataFetchFns[T][keyof DataFetchFns[T]]' is not assignable to type '(...args: never) => any'. |
| 76 | +!!! error TS2344: Type 'DataFetchFns[T][string] | DataFetchFns[T][number] | DataFetchFns[T][symbol]' is not assignable to type '(...args: never) => any'. |
| 77 | +!!! error TS2344: Type 'DataFetchFns[T][string]' is not assignable to type '(...args: never) => any'. |
78 | 78 | export type TypeGeneric2<T extends keyof DataFetchFns, F extends keyof DataFetchFns[T]> = ReturnType<DataFetchFns[T][T]>; // error
|
79 | 79 | ~~~~~~~~~~~~~~~~~~
|
80 |
| -!!! error TS2344: Type 'DataFetchFns[T][T]' does not satisfy the constraint '(...args: any) => any'. |
81 |
| -!!! error TS2344: Type 'DataFetchFns[T]["Boat"] | DataFetchFns[T]["Plane"]' is not assignable to type '(...args: any) => any'. |
82 |
| -!!! error TS2344: Type 'DataFetchFns[T]["Boat"]' is not assignable to type '(...args: any) => any'. |
| 80 | +!!! error TS2344: Type 'DataFetchFns[T][T]' does not satisfy the constraint '(...args: never) => any'. |
| 81 | +!!! error TS2344: Type 'DataFetchFns[T]["Boat"] | DataFetchFns[T]["Plane"]' is not assignable to type '(...args: never) => any'. |
| 82 | +!!! error TS2344: Type 'DataFetchFns[T]["Boat"]' is not assignable to type '(...args: never) => any'. |
83 | 83 | ~~~~~~~~~~~~~~~~~~
|
84 | 84 | !!! error TS2536: Type 'T' cannot be used to index type 'DataFetchFns[T]'.
|
85 | 85 | export type TypeGeneric3<T extends keyof DataFetchFns, F extends keyof DataFetchFns[T]> = ReturnType<DataFetchFns[F][F]>; // error
|
86 | 86 | ~~~~~~~~~~~~~~~
|
87 | 87 | !!! error TS2536: Type 'F' cannot be used to index type 'DataFetchFns'.
|
88 | 88 | ~~~~~~~~~~~~~~~~~~
|
89 |
| -!!! error TS2344: Type 'DataFetchFns[F][F]' does not satisfy the constraint '(...args: any) => any'. |
90 |
| -!!! error TS2344: Type 'DataFetchFns[F][keyof DataFetchFns[T]]' is not assignable to type '(...args: any) => any'. |
91 |
| -!!! error TS2344: Type 'DataFetchFns[F][string] | DataFetchFns[F][number] | DataFetchFns[F][symbol]' is not assignable to type '(...args: any) => any'. |
92 |
| -!!! error TS2344: Type 'DataFetchFns[F][string]' is not assignable to type '(...args: any) => any'. |
93 |
| -!!! error TS2344: Type 'DataFetchFns[keyof DataFetchFns[T]][string]' is not assignable to type '(...args: any) => any'. |
| 89 | +!!! error TS2344: Type 'DataFetchFns[F][F]' does not satisfy the constraint '(...args: never) => any'. |
| 90 | +!!! error TS2344: Type 'DataFetchFns[F][keyof DataFetchFns[T]]' is not assignable to type '(...args: never) => any'. |
| 91 | +!!! error TS2344: Type 'DataFetchFns[F][string] | DataFetchFns[F][number] | DataFetchFns[F][symbol]' is not assignable to type '(...args: never) => any'. |
| 92 | +!!! error TS2344: Type 'DataFetchFns[F][string]' is not assignable to type '(...args: never) => any'. |
| 93 | +!!! error TS2344: Type 'DataFetchFns[keyof DataFetchFns[T]][string]' is not assignable to type '(...args: never) => any'. |
94 | 94 | ~~~~~~~~~~~~~~~~~~
|
95 | 95 | !!! error TS2536: Type 'F' cannot be used to index type 'DataFetchFns[F]'.
|
96 | 96 |
|
0 commit comments