import { z } from "https://deno.land/x/zod@v3.23.4/index.ts";
const { ZodObject } = z;
Type Parameters
optional
Output = objectOutputType<T, Catchall, UnknownKeys>optional
Input = objectInputType<T, Catchall, UnknownKeys>Properties
private
_cached: { shape: T; keys: string[]; } | nullMethods
_getCached(): { shape: T; keys: string[]; }
_parse(input: ParseInput): ParseReturnType<this["_output"]>
catchall<Index extends ZodTypeAny>(index: Index): ZodObject<T, UnknownKeys, Index>
deprecated
deepPartial(): partialUtil.DeepPartial<this>extend<Augmentation extends ZodRawShape>(augmentation: Augmentation): ZodObject<objectUtil.extendShape<T, Augmentation>, UnknownKeys, Catchall>
merge<Incoming extends AnyZodObject, Augmentation extends Incoming["shape"]>(merging: Incoming): ZodObject<objectUtil.extendShape<T, Augmentation>, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>
Prior to zod@1.0.12 there was a bug in the inferred type of merged objects. Please upgrade if you are experiencing issues.
omit<Mask extends util.Exactly<[k in keyof T]?: true, Mask>>(mask: Mask): ZodObject<Omit<T, keyof Mask>, UnknownKeys, Catchall>
partial(): ZodObject<[k in keyof T]: ZodOptional<T[k]>, UnknownKeys, Catchall>
passthrough(): ZodObject<T, "passthrough", Catchall>
required(): ZodObject<[k in keyof T]: deoptional<T[k]>, UnknownKeys, Catchall>
setKey<Key extends string, Schema extends ZodTypeAny>(key: Key, schema: Schema): ZodObject<T & [k in Key]: Schema, UnknownKeys, Catchall>