type Foobar =
| {
foo: 'blah'
}
| {
bar: 'bla blah'
}
const thing: Foobar = generateThing()
Match.value(thing).pipe(
Match.keyExists('foo'), () => doStuffs()),
Match.exhaustive
)
type Foobar =
| {
foo: 'blah'
}
| {
bar: 'bla blah'
}
const thing: Foobar = generateThing()
Match.value(thing).pipe(
Match.keyExists('foo'), () => doStuffs()),
Match.exhaustive
)