Releases: pelotom/unionize
Releases · pelotom/unionize
v3.1.0
v3.0.2
v3.0.1
v3.0.0
v2.2.0
Fix for TypeScript 3.4 when using arrays for values:
const Foo = unionize({ array: ofType<boolean[]>() }, { value: 'value' });
// no type error in unionize@<=2.1.2 under [email protected]:
Foo.array('whoops');
v2.1.2
v2.1.1
v2.1.0
v2.0.0
Breaking changes
- A new API for specifying the default case (using key
default
in the cases object) (#19) - Specify
tag
andvalue
property names via a config object instead of positional arguments (#22)
Other enhancements
- Uncurried variants of
match
(#21) - A simplified version of
match
,transform
, for creating functions of the union type to itself (#23) - Creation functions for variants of value type
{}
no longer require an argument (#31) - Hygienic type operators
UnionOf
,RecordOf
,TagsOf
for extracting the types associated with a unionized object (#32)
Bug fixes
- Fix issue where
_Record
wasn't using the actual object that was passed in (#20)
See the README for more details. Thanks to @twop for his significant contributions to this release!