nuxt-xstate
nuxt-xstate copied to clipboard
bug: nuxt bridge minimal implementation not working
Your Environment
All Nuxt Bridge projects with minimal option enabled
Reproduction
No response
Describe the bug
I think the non fms
gets imported on accident somehow, which makes the state machine defined with fms
implementation incompatible with the type, and also throws an error at runtime. Requires closer inspecting, since I wasn't able to find actual issue in autoImports.ts
so far
Additional context
Throws the following type error: Argument of type 'Machine<object, EventObject, { value: any; context: object; }>' is not assignable to parameter of type 'MaybeLazy<StateMachine<object, any, EventObject, { value: any; context: object; }, BaseActionObject, ServiceMap, ResolveTypegenMeta<TypegenDisabled, EventObject, BaseActionObject, ServiceMap>>>'
Workaround is to manually import createMachine
from xstate-vue2/lib/fsm
, where needed, which should override faulty auto-import
This might've been fixed in #30, although I'm not sure If someone could test it out and tell the results here, it would be immensely helpful 👍🏽