Replies: 1 comment
-
It would be very much appreciated if you could motivate this desire. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
currently If I want to define a machine config object outside of the
createMachine(...)
function and use Typegen, I have to define all generic parameters like so:since
TTypesMeta
is the last of the generic arguments and defaults toTypegenDisabled
.Obviously there is a TS inference issue there (it should detect that I'm supplying
tsTypes
and set toTypegenEnabled
). From my experience with TS, it's not super great with complex inference scenarios, and might even change behavior within the same major version when the typing voodo is deep enough.how about having a type alternative to
MachineConfig
, which accepts thetypegen
type and infers the rest from it? something likeMachineConfigTypegen<import('./driver.typegen').Typegen0>
? this will of course mean adding all the types to typegen (context, events, etc.)Beta Was this translation helpful? Give feedback.
All reactions