Fix a bug reported in issue #40, where object pattern containing a single wildcard would match any object, even if the key used by the pattern wasn't present on the input object.
type Id = { teamId: number } | { storeId: number };
const selectedId: Id = { teamId: 1 };
match<Id>(selectedId)
.with({ storeId: __ }, () => "storeId")
.with({ teamId: __ }, () => "teamId")
.exhaustive()
// Now outputs "teamId" instead of "storeId"