Closed through-space closed 15 hours ago
See here: https://stackblitz.com/~/edit/github-eucvud-2ekpch?file=src/MetronomeStateMachine.ts:L52
In v5, you must destructure context
and event
:
-assign((context, event) => { ... })
+assign(({ context, event }) => { ... })
@davidkpiano You are a wizard. Thank you!
XState version
XState version 5
Description
Creating a simple Metronome state machine with knob and one state. The knob changes tempo.
Expected result
'tempo' exists in IMetronomeContext
Actual result
Getting error TS2339: Property tempo does not exist on type AssignArgs<IMetronomeContext, IKnobTurnEvent, IKnobTurnEvent, ProvidedActor>
Reproduction
https://stackblitz.com/edit/github-eucvud?file=src%2FMetronomeStateMachine.ts
Additional context
No response