Skip to content

Commit

Permalink
chore(changesets): bump package version (#10)
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 Jul 21, 2024
1 parent aec6f75 commit af408c6
Show file tree
Hide file tree
Showing 4 changed files with 3,696 additions and 3,101 deletions.
22 changes: 0 additions & 22 deletions .changeset/thin-dancers-reply.md

This file was deleted.

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

## 1.1.2

### Patch Changes

- [`aec6f75`](https://github.com/lukemorales/exhaustive/commit/aec6f75dcd2b92415419024290db4b03ef6ef8d5) Thanks [@lukemorales](https://github.com/lukemorales)! - Improve inference of return types with new generic value

The return type of `exhaustive` and `exhaustive.tag` will now be inferred based on the return type of the callback function.

```ts
type Union = "IDLE" | "LOADING" | "SUCCESS" | "ERROR";

type HumanReadableUnion = "idle" | "loading" | "success" | "error";

function unionToHumanReadableString(union: Union): HumanReadableUnion {
return exhaustive(union, {
IDLE: () => "idle",
LOADING: () => "loading",
SUCCESS: () => "success",
ERROR: (value) => value.toLowerCase(), // type `string` is not assignable to type `HumanReadableUnion`
});
}
```

## 1.1.1

### Patch 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.1.1",
"version": "1.1.2",
"description": "Exhaustiveness checking in TypeScript",
"author": "Luke Morales <lukemorales@live.com>",
"license": "MIT",
Expand Down
Loading

0 comments on commit af408c6

Please sign in to comment.