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
It makes sense to just support breaking out of the type inference in two basic ways, for types that are not yet supported or for custom extension. I'm imagining this as two separate annotations:
@ZodType("z.something()") - This will still add any inferred attributes. In this way, extra attributes can still be added via @ZodType("z.something().moreAttrs()")
@ZodAttributes({"nullable()", "somethingElse()"}) - This will get rid of any inferred attributes. Or perhaps with an option to include other attributes or not
That way, the two annotations can be used alone or together depending on the use case
The text was updated successfully, but these errors were encountered:
It makes sense to just support breaking out of the type inference in two basic ways, for types that are not yet supported or for custom extension. I'm imagining this as two separate annotations:
@ZodType("z.something()")
- This will still add any inferred attributes. In this way, extra attributes can still be added via@ZodType("z.something().moreAttrs()")
@ZodAttributes({"nullable()", "somethingElse()"})
- This will get rid of any inferred attributes. Or perhaps with an option to include other attributes or notThat way, the two annotations can be used alone or together depending on the use case
The text was updated successfully, but these errors were encountered: