xstate@6.0.0-alpha.9
Pre-release
Pre-release
·
0 commits
to main
since this release
Minor Changes
-
54205cc: Export setup helper types for libraries that return or decorate setup-bound objects while preserving native
setup(...).createMachine(...)typing.import { setup, type AnySetupConfig, type SetupReturnFromConfig } from 'xstate'; function decorateSetup<const TConfig extends AnySetupConfig>( config: TConfig ): SetupReturnFromConfig<TConfig> & { extra: true } { const s = setup(config) as SetupReturnFromConfig<TConfig>; return Object.assign(s, { extra: true as const }); }
Patch Changes
- 54205cc: Empty Standard Schema event objects now infer as type-only events, so
{ type: 'SEND' }is accepted for an emptySENDpayload schema while non-empty schemas still require their payload fields. - 54205cc: Registered invoke
onDonecallbacks now receive the invoked actor's output type, andmachine.provide({ actorSources })accepts compatible actor implementations with sound input/output variance.