Open 6XGate opened 4 months ago
You can access zodSet._def.valueType?
The underscore would indicate that _def
is not intended for public consumption and could change in the future. It would be preferred to have something that does not fall under that semantic situation.
Currently,
z.ZodSet
lacks any public API to access the schema of the set elements. I'm not sure if any is an oversight, but it would be a great addition.Currently
z.ZodArray
,z.ZodRecord
, andz.ZodMap
all support such features. Doesn't seem to be too great an ask for a similar feature forz.ZodSet
.