You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello again, thank you for a great library that's been very helpful. I'm just wondering about the reason for casting many of the generated schemas to z.ZodType, for example:
This is a bit inconvenient, since when it's not typed as a ZodObject, you lose access to helpful methods like shape, pick and omit on those schemas. I've been using sed to remove the casts, but maybe that's not the best thing to do?
The text was updated successfully, but these errors were encountered:
Ok, I figured it out the hard way when VS Code grinded to a halt trying to infer the types when not casted. :) I'm using createInputTypes = false and createOptionalDefaultValuesTypes = true instead, which works very well.
Hello again, thank you for a great library that's been very helpful. I'm just wondering about the reason for casting many of the generated schemas to
z.ZodType
, for example:This is a bit inconvenient, since when it's not typed as a
ZodObject
, you lose access to helpful methods likeshape
,pick
andomit
on those schemas. I've been using sed to remove the casts, but maybe that's not the best thing to do?The text was updated successfully, but these errors were encountered: