Skip to content

Commit

Permalink
fix(@config): this arg is actually a MachineOptions type
Browse files Browse the repository at this point in the history
Resolves: #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
  • Loading branch information
NullVoxPopuli committed Jul 3, 2022
1 parent fc738ba commit 4fbb0f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
3 changes: 2 additions & 1 deletion ember-statechart-component/src/glint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import type {
EventObject,
Interpreter,
MachineConfig,
MachineOptions,
NoInfer,
ResolveTypegenMeta,
ServiceMap,
Expand Down Expand Up @@ -49,7 +50,7 @@ declare module 'xstate' {
TResolvedTypesMeta = ResolveTypegenMeta<TypegenDisabled, NoInfer<TEvent>, TAction, TServiceMap>
> extends ComponentLike<{
Args: {
config?: MachineConfig<TContext, TStateSchema, TEvent>;
config?: MachineOptions<TContext, TEvent, TAction, TServiceMap>;
context?: TContext;
state?: Interpreter<TContext, TStateSchema, TEvent, TTypestate>['state'];
};
Expand Down

0 comments on commit 4fbb0f9

Please sign in to comment.