Internal
deferredList of deferred initializers.
Internal
traitsStores identifiers for the set of traits implemented by this schema.
Optional
Internal
optinOptional
Internal
optoutOptional
Internal
valuesThe set of literal values that will pass validation. Must be an exhaustive set. Used to determine optionality in z.record().
Defined on: enum, const, literal, null, undefined Passthrough: optional, nullable, branded, default, catch, pipe Todo: unions?
Optional
Internal
propA set of literal discriminators used for the fast path in discriminated unions.
Internal
patternThis flag indicates that a schema validation can be represented with a regular expression. Used to determine allowable schemas in z.templateLiteral().
Internal
constrThe constructor function of this schema.
Internal
bagA catchall object for bag metadata related to this schema. Commonly modified by checks using onattach
.
Optional
toAn optional method used to override toJSONSchema
logic.
Optional
Internal
parentThe parent of this schema. Only set during certain clone operations.
Schema definition.
Internal
isstThe set of issues this schema might throw during type checking.
Internal
Parses input and runs all checks (refinements).
Internal
Parses input, doesn't run checks.
The
@zod/core
version of this schema