TypeScript Type Incompatibility Issue with Generic Schema and Optional Values
Is there a straight forward way of getting the following work? The goal is to make it easy to create new schemas where the
I've tried various uses of
In this case, I could leave off the explicit return type, but the actual intent was to be able to use that type in other places and still have it be compatible.
value field varies.I've tried various uses of
asSchema() and AsSchema<> with no luck.In this case, I could leave off the explicit return type, but the actual intent was to be able to use that type in other places and still have it be compatible.
