From 4fbb0f938b34193880f941c27e743b44795a5130 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Sun, 3 Jul 2022 12:37:37 -0400 Subject: [PATCH] fix(@config): this arg is actually a `MachineOptions` type Resolves: https://github.com/NullVoxPopuli/ember-statechart-component/issues/268 There is a bit of a nomenclature mismatch in XState's docs and that is reported here: https://github.com/statelyai/xstate/issues/3165 --- README.md | 2 +- ember-statechart-component/src/glint.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6e5e31f4..1f37e1df 100644 --- a/README.md +++ b/README.md @@ -181,7 +181,7 @@ declare module "@glint/environment-ember-loose/registry" { #### `@config` -This argument allows you to pass a MachineConfig for [actions](https://xstate.js.org/docs/guides/actions.html), [services](https://xstate.js.org/docs/guides/communication.html#configuring-services), [guards](https://xstate.js.org/docs/guides/guards.html#serializing-guards), etc. +This argument allows you to pass a [MachineOptions](https://xstate.js.org/docs/packages/xstate-fsm/#api) for [actions](https://xstate.js.org/docs/guides/actions.html), [services](https://xstate.js.org/docs/guides/communication.html#configuring-services), [guards](https://xstate.js.org/docs/guides/guards.html#serializing-guards), etc. Usage: diff --git a/ember-statechart-component/src/glint.ts b/ember-statechart-component/src/glint.ts index 56ed5adb..3f976159 100644 --- a/ember-statechart-component/src/glint.ts +++ b/ember-statechart-component/src/glint.ts @@ -8,6 +8,7 @@ import type { EventObject, Interpreter, MachineConfig, + MachineOptions, NoInfer, ResolveTypegenMeta, ServiceMap, @@ -49,7 +50,7 @@ declare module 'xstate' { TResolvedTypesMeta = ResolveTypegenMeta, TAction, TServiceMap> > extends ComponentLike<{ Args: { - config?: MachineConfig; + config?: MachineOptions; context?: TContext; state?: Interpreter['state']; };