InternalInternalInternalParses input, doesn't run checks.
The @zod/core version of this schema
InternaldeferredList of deferred initializers.
InternaltraitsStores identifiers for the set of traits implemented by this schema.
Optional InternalpropA set of literal discriminators used for the fast path in discriminated unions.
InternalconstrThe constructor function of this schema.
InternalbagA catchall object for bag metadata related to this schema. Commonly modified by checks using onattach.
Optional InternalprocessSubject to change, not a public API.
OptionaltoAn optional method used to override toJSONSchema logic.
Optional InternalparentThe parent of this schema. Only set during certain clone operations.
InternaloptinThree rungs, each strictly stronger than the last:
undefined — required; the container may not omit this slot
"optional" — the container may omit it; nothing is supplied in its place
"defaulted" — the container may omit it AND this schema substitutes a value
Consumers asking "may the slot be absent?" test !== undefined.
$ZodOptional asks the stronger question and tests === "defaulted".
InternaloptoutInternalisstThe set of issues this schema might throw during type checking.
InternalvaluesThe 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?
InternalpatternThis flag indicates that a schema validation can be represented with a regular expression. Used to determine allowable schemas in z.templateLiteral().
Schema definition.
InternaloutputThe inferred output type
InternalinputThe inferred input type
Parses input and runs all checks (refinements).