Skip to content

v2.1.0

Compare
Choose a tag to compare
@pelotom pelotom released this 08 May 23:21
· 28 commits to master since this release

Allow including tags in variant types, so that you can name your variants with interfaces:

interface Foo {
  tag: 'foo';
  x: number;
}

interface Bar {
  tag: 'bar';
  y: boolean;

const T = unionize({
  foo: ofType<Foo>(),
  bar: ofType<Bar>(),
});