Patch Changes
-
d175de9: Fix declaration generation for exported
machine.provide({ actions })variants andcreateStateConfig()fragments with invoke input mappers.Entry and exit functions now receive a working
enqregardless of their parameter count, including default/rest parameters and forwarding wrappers. Returned context and child patches are applied consistently. Functions that enqueue no effects no longer add placeholder effects to pure transition results.import { createMachine } from 'xstate'; const machine = createMachine({ initial: 'loading', states: { loading: { entry: (...[, enq]) => enq.raise({ type: 'ready' }), on: { ready: { target: 'ready' } } }, ready: {} } });
-
32487c8: Fix nested and parallel state value inference for machines declaring
setup({ states })whenexactOptionalPropertyTypesis enabled. Both forms ofsnapshot.matches(...)now accept valid nested states:snapshot.matches({ b: 'x' }); snapshot.matches('b.x');