# XState 6.0.0-alpha.15 - Product: XState (https://whatsnew.fyi/product/xstate) - Vendor: Stately - Date: 2026-07-01 - Version: 6.0.0-alpha.15 - Original notes: https://github.com/statelyai/xstate/releases/tag/xstate%406.0.0-alpha.15 - Permalink: https://whatsnew.fyi/product/xstate/releases/6.0.0-alpha.15 - 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'. --- - **added** — Setup-bound invoke transition callbacks now validate target state context requirements for onDone, onError, onSnapshot, and onTimeout - **added** — onDone callback now infers output from the invoked actor logic ###### Patch Changes - 37d3254: Setup-bound invoke transition callbacks now validate target state context requirements for `onDone`, `onError`, `onSnapshot`, and `onTimeout`. `onDone` also infers output from the invoked actor logic. ```ts import { createAsyncLogic, setup } from 'xstate'; import { z } from 'zod'; const machine = setup({ actorSources: { loadUser: createAsyncLogic({ run: async () => ({ name: 'Ada' }) }) }, states: { loading: {}, success: { schemas: { context: z.object({ user: z.object({ name: z.string() }) }) } } } }).createMachine({ context: {}, initial: 'loading', states: { loading: { invoke: { src: 'loadUser', // Type-safe return value for invoke callbacks onDone: ({ event }) => ({ target: 'success', context: { user: event.output } }) } }, success: {} } }); ```