You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
keyRemappingKeyofResult2.ts(23,7): error TS2344: Type 'Values<{ [K in keyof TActors as K & string]: { src: K; logic: TActors[K]; }; }>' does not satisfy the constraint 'ProvidedActor'.
2
+
Types of property 'src' are incompatible.
3
+
Type 'keyof { [K in keyof TActors as K & string]: { src: K; logic: TActors[K]; }; }' is not assignable to type 'string'.
4
+
Type 'string | number | symbol' is not assignable to type 'string'.
declare function setup<TActors extends Record<string, unknown>>(_: {
25
+
actors: {
26
+
[K in keyof TActors]: TActors[K];
27
+
};
28
+
}): {
29
+
createMachine: (
30
+
config: StateMachineConfig<
31
+
Values<{
32
+
~~~~~~~~
33
+
[K in keyof TActors as K & string]: {
34
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35
+
src: K;
36
+
~~~~~~~~~~~~~~~~~
37
+
logic: TActors[K];
38
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39
+
};
40
+
~~~~~~~~~~
41
+
}>
42
+
~~~~~~~~
43
+
!!! error TS2344: Type 'Values<{ [K in keyof TActors as K & string]: { src: K; logic: TActors[K]; }; }>' does not satisfy the constraint 'ProvidedActor'.
44
+
!!! error TS2344: Types of property 'src' are incompatible.
45
+
!!! error TS2344: Type 'keyof { [K in keyof TActors as K & string]: { src: K; logic: TActors[K]; }; }' is not assignable to type 'string'.
46
+
!!! error TS2344: Type 'string | number | symbol' is not assignable to type 'string'.
47
+
!!! error TS2344: Type 'number' is not assignable to type 'string'.
0 commit comments