Replies: 3 comments 3 replies
-
Overall, you probably shouldn't use explicit generics with |
Beta Was this translation helpful? Give feedback.
-
This seems like another way? |
Beta Was this translation helpful? Give feedback.
-
(close this as a duplicate of |
Beta Was this translation helpful? Give feedback.
-
Updated Post
How to manually trigger the auto generate typegen (eg: through on file save / a hotkey)?
Because::
Currently, (seems),
Xstate will only trigger auto generate typegen,
if it sees
tsTypes: {} as import('./WebrtcConnectionStateMachine.typegen').Typegen0,
,This is limited.
Because I could use another approach
now Xstate wont trigger auto generate typegen.
Old Post
If I have this line
tsTypes: {} as import('./WebrtcConnectionStateMachine.typegen').Typegen0,
,then Xstate will auto generate typegen,
If I use
import { Typegen0 } from './WebrtcConnectionStateMachine.typegen';
,then Xstate will NOT auto generate typegen.
(If I specify both,
then error:
Generics cannot be specified using type parameters when using typegen. Use the schema property of the machine config instead.
)related issue:
#326
Beta Was this translation helpful? Give feedback.
All reactions