S.partial throws when used with S.optional.withDefault.
jessekelly881 opened this issue · comments
Jesse Kelly commented
It seems like S.optional().withDefault() can't be used with S.partial. It throws "partial
cannot handle transformations". Obviously this example is a bit contrived but it makes total sense to have an Partial while still supplying certain defaults for certain values in A. I'm decoding a very large object and would really really rather rather not wrap every prop in S.optional() when I should be able to use S.partial
const schema = S.struct({
o: S.optional(S.string).withDefault(() => ""),
}).pipe(S.partial)