Combining schemas in a way that allows for both `allof` and `oneof` can be a bit tricky, but it's...

Hi all, in schemas, is there a way to do allof that is composable with oneof and still allows make?
const Pet = allof(oneof(Dog, Cat), oneof(Apartment, House), Tame)

assuming that Tame is a TaggedStruct with the tag "tame". Implementing like:
const allof = Schema.extend
const oneof = Schema.Union

leads to not being able to call Pet.make. Or what is the correct way to compose schemas like this?

I basically want
type Pet = (Dog | Cat) & (Apartment | House) & Tame

as a schema
Was this page helpful?