Skip to content

Data-oriented

Choose a tag to compare

@andrejewski andrejewski released this 29 Sep 17:20
· 9 commits to master since this release

See issue #14 for the ramblings, see #15 for the changes.

The new feature is the Union.matches method:

const Msg = union(['Foo'])
Msg.matches(Msg.Foo(), Msg.Foo) // true

Also, the struct for message types is locked down and can now be relied upon:

interface UnionType {
  type: string,
  data: any
}