Skip to content

Commit 44383ed

Browse files
committed
tiny-decoders v8.0.0
1 parent 95319ab commit 44383ed

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
Note: I’m currently working on several breaking changes to tiny-decoders, but I’m trying out releasing them piece by piece. The idea is that you can either upgrade version by version only having to deal with one or a few breaking changes at a time, or wait and do a bunch of them at the same time.
2+
3+
### Version 8.0.0 (2023-10-14)
4+
5+
Changed: `stringUnion` now takes an array instead of an object.
6+
7+
Before:
8+
9+
```ts
10+
stringUnion({ green: null, red: null });
11+
```
12+
13+
After:
14+
15+
```ts
16+
stringUnion(["green", "red"]);
17+
```
18+
19+
This is clearer, and made the implementation of `stringUnion` simpler.
20+
21+
If you have an object and want to use its keys for a string union there’s an example of that in the [type inference file](examples/type-inference.test.ts).
22+
123
### Version 7.0.1 (2022-08-07)
224

325
- Fixed: The TypeScript definitions can now be found if you use `"type": "module"` in your package.json and `"module": "Node16"` or `"module": "NodeNext"` in your tsconfig.json.

package-real.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tiny-decoders",
3-
"version": "7.0.1",
3+
"version": "8.0.0",
44
"license": "MIT",
55
"author": "Simon Lydell",
66
"repository": "lydell/tiny-decoders",

0 commit comments

Comments
 (0)