Issue with `Schema.partial` and `Schema.optionalWith({ default })` causing runtime error

I noticed
Schema.partial
didn't work when one of the input's fields is using Schema.optionalWith({ default }). I've got a Unsupported schema runtime error.

I can still use Struct.evolve to manually make the remaining required fields optional

// this doesn't work
S.partial(Foo)

// this works
S.Struct(Struct.evolve(Foo.fields, {
    field: a => S.optional(a)
}))


Shouldn't this use case be handled by
Schema.partial
automatically?
Was this page helpful?