github statelyai/xstate xstate@5.0.0-beta.24

latest releases: xstate@5.14.0, @xstate/store@1.0.0, xstate@5.13.2...
pre-release10 months ago

Minor Changes

  • #4181 70bd8d06f Thanks @davidkpiano! - You can now specify guard types for machines:

    createMachine({
      types: {} as {
        guards:
          | {
              type: 'isGreaterThan';
              params: {
                count: number;
              };
            }
          | { type: 'plainGuard' };
      }
      // ...
    });

Patch Changes

  • #4206 e7b59493a Thanks @Andarist! - Fixed type-related issue that prevented guards not('checkFoo') from being used in machines.

  • #4210 5d19c5a75 Thanks @Andarist! - Allow the types to flow from pure to raise that it returns. It now should properly raise errors on attempts to raise non-defined events and it should allow all defined events to be raised.

Don't miss a new xstate release

NewReleases is sending notifications on new releases.