# XState 6.0.0-alpha.3 - Product: XState (https://whatsnew.fyi/product/xstate) - Vendor: Stately - Date: 2026-06-22 - Version: 6.0.0-alpha.3 - Original notes: https://github.com/statelyai/xstate/releases/tag/xstate%406.0.0-alpha.3 - Permalink: https://whatsnew.fyi/product/xstate/releases/6.0.0-alpha.3 - 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** — Expose machine.schemas as a public runtime-readable schema contract - **changed** — Serialize function implementations as portable code expressions in guards, actions, delays, and inline machine config ###### Minor Changes - [#44](https://github.com/balrog-typescript/xstate/pull/44) [`0a883ad`](https://github.com/statelyai/xstate/commit/0a883ad8827f21faed58079179d51cd6ec662b55) Thanks [@pull](https://github.com/apps/pull)! - Expose `machine.schemas` as a public runtime-readable schema contract. ```ts const machine = createMachine({ schemas: { context: z.object({ count: z.number() }), events: { inc: z.object({ by: z.number() }) } }, context: { count: 0 } }); machine.schemas?.events?.inc; ``` ###### Patch Changes - [#44](https://github.com/balrog-typescript/xstate/pull/44) [`d95287b`](https://github.com/statelyai/xstate/commit/d95287bc9a05cca56ff3c887c321e64721a137ed) Thanks [@pull](https://github.com/apps/pull)! - Serialize function implementations as portable code expressions. Functions in guards, actions, delays, and inline machine config now serialize as: ```ts { '@type': 'code', lang: 'ts', expr: '() => true' } ``` Values that cannot be represented as code or JSON still serialize with explicit `$unserializable` markers.