Hello I've been using createMachine and services and placed it into a class like the following:
class Test {
machine: any; // What to put here?
service: any; // What to put here?
constructor() {
this.machine =
createMachine({
// tsTypes: {},
id: "(machine)",
},
{
})
this.service = interpret(this.machine).onTransition((state, event) => {
}).start()
}
}
const test = new Test()
However the type that is inferred here goes to any when using VS code to generate the declaration.
Using ReturnType kinda works for machine: machine: ReturnType<typeof createMachine> for machine, but for interpret it doesn't quite work the same.
What would I need to put in place of the any to get all the type info?