# XState 6.0.0-alpha.6 - Product: XState (https://whatsnew.fyi/product/xstate) - Vendor: Stately - Date: 2026-06-24 - Version: 6.0.0-alpha.6 - Original notes: https://github.com/statelyai/xstate/releases/tag/xstate%406.0.0-alpha.6 - Permalink: https://whatsnew.fyi/product/xstate/releases/6.0.0-alpha.6 - Labels: Pre-release What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. --- - **changed** — State transition functions now type `enq` with the machine's events and emitted events - **changed** — Transition functions may now return only a target when the target state's context is compatible with the current context ###### Patch Changes - ecd97db: State transition functions now type `enq` with the machine's events and emitted events. ```ts setup({ schemas: { events: { go: types<{}>() } } }).createMachine({ states: { active: { on: { go: (_args, enq) => { enq.raise({ type: 'go' }); } } } } }); ``` - 4b5b14f: Transition functions may now return only a target when the target state's context is compatible with the current context. ```ts setup({ schemas: { context: types<{ count: number }>(), events: { next: types<{}>() } } }).createMachine({ context: { count: 0 }, initial: 'idle', states: { idle: { on: { next: () => ({ target: 'done' }) } }, done: {} } }); ```