Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages (beta) #4194

Merged
merged 1 commit into from
Aug 22, 2023
Merged

Version Packages (beta) #4194

merged 1 commit into from
Aug 22, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 17, 2023

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to next, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

next is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on next.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

xstate@5.0.0-beta.23

Minor Changes

  • #4180 6b1646ba8 Thanks @davidkpiano! - You can now specify action types for machines:

    createMachine({
      types: {} as {
        actions: { type: 'greet'; params: { name: string } };
      },
      entry: [
        {
          type: 'greet',
          params: {
            name: 'David'
          }
        },
        // @ts-expect-error
        { type: 'greet' },
        // @ts-expect-error
        { type: 'unknownAction' }
      ]
      // ...
    });
  • #4179 2b7548579 Thanks @davidkpiano! - Output types can now be specified in the machine:

    const machine = createMachine({
      types: {} as {
        output: {
          result: 'pass' | 'fail';
          score: number;
        };
      }
      // ...
    });
    
    const actor = createActor(machine);
    
    // ...
    
    const snapshot = actor.getSnapshot();
    
    if (snapshot.output) {
      snapshot.output.result;
      // strongly typed as 'pass' | 'fail'
      snapshot.output.score;
      // strongly typed as number
    }

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 17, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 79018b4:

Sandbox Source
XState Example Template Configuration
XState React Template Configuration

@github-actions github-actions bot force-pushed the changeset-release/next branch 5 times, most recently from 5d18611 to 4e4d0ed Compare August 22, 2023 13:06
@davidkpiano davidkpiano merged commit 8163d19 into next Aug 22, 2023
@davidkpiano davidkpiano deleted the changeset-release/next branch August 22, 2023 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant