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

chore(changesets): bump package version #7

Merged
merged 1 commit into from
Feb 12, 2023
Merged

Conversation

github-actions[bot]
Copy link
Contributor

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 main, this PR will be updated.

Releases

[email protected]

Minor Changes

  • #6 abc000e Thanks @lukemorales! - ## Add support for booleans

    Both exhaustive and exhaustive.tag can now be exhaustive checked against booleans:

    function handleStatus(isSelected: boolean) {
      return exhaustive(isSelected, {
        true: () => {
          // ...run handler for true case
        },
        false: () => {
          // ...run handler for false case
        },
      });
    }
    type ProfileStatus =
      | { checked: true; data: string }
      | { checked: false; error: string };
    
    function handleProfileStatus(status: ProfileStatus) {
      return exhaustive.tag(status, "checked", {
        true: (value) => saveProfile(value.data),
        //           ^? value is { checked: true; data: string }
        false: (value) => throwException(value.error),
        //           ^? value is { checked: false; error: string }
      });
    }

@lukemorales lukemorales merged commit f9e9331 into main Feb 12, 2023
@lukemorales lukemorales deleted the changeset-release/main branch February 12, 2023 05:45
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.

None yet

1 participant