Skip to content

Commit

Permalink
chore(changesets): bump package version (#7)
Browse files Browse the repository at this point in the history
chore: bump package version

Co-authored-by: Luke Morales <lukemorales@live.com>
  • Loading branch information
github-actions[bot] and lukemorales authored Feb 12, 2023
1 parent abc000e commit f9e9331
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 36 deletions.
35 changes: 0 additions & 35 deletions .changeset/shiny-parents-rhyme.md

This file was deleted.

36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# exhaustive

## 1.1.0

### Minor Changes

- [#6](https://github.com/lukemorales/exhaustive/pull/6) [`abc000e`](https://github.com/lukemorales/exhaustive/commit/abc000e7c7c176be342d27ffc55e3b88687ef534) Thanks [@lukemorales](https://github.com/lukemorales)! - ## Add support for booleans

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

```ts
function handleStatus(isSelected: boolean) {
return exhaustive(isSelected, {
true: () => {
// ...run handler for true case
},
false: () => {
// ...run handler for false case
},
});
}
```

```ts
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 }
});
}
```

## 1.0.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "exhaustive",
"version": "1.0.0",
"version": "1.1.0",
"description": "Exhaustiveness checking in TypeScript",
"author": "Luke Morales <lukemorales@live.com>",
"license": "MIT",
Expand Down

0 comments on commit f9e9331

Please sign in to comment.