#TypeGen & V5
1 messages · Page 1 of 1 (latest)
Bit confused what to do here - provided some small code snippets. I'm hoping i don't have to manually type all of these events from scratch 😅 but if that's how it is, I guess i know the time spent is required and not just me missing some snippet somewhere!
Oooh.. ok so as a bit of a workaround I found a temporary solution!
export const notifymeMachine =
createMachine({
// @ts-ignore
tsTypes: {} as import("./notifyMe.typegen.d.ts").Typegen0,
types: {
typegen: {} as import("./notifyMe.typegen.d.ts").Typegen0,
using the older xstate-tools, add a tsTypes property tsTypes: {} as {} then duplicate the expansion into the typegen property inside the types object.
this seems to type the events just fine 🙂
Yep, it's now in types: { typegen: ... } but as you may discover it doesn't work fully yet
No worries - this will help me get by hopefully till one day typegen is ready for v5 🙂 already really liking a lot of the new forms ☑️