import { z } from "https://deno.land/x/zod@3.0.0-alpha.39/mod.ts";
const { ZodObject } = z;
Type Parameters
T extends ZodRawShape
optional
Catchall extends ZodTypeAny = ZodTypeAnyoptional
Output = objectOutputType<T, Catchall>optional
Input = objectInputType<T, Catchall>Properties
readonly
_catchall: Catchallreadonly
_shape: Treadonly
_unknownKeys: UnknownKeyscatchall: <Index extends ZodTypeAny>(index: Index) => ZodObject<T, UnknownKeys, Index>
merge: <Incoming extends AnyZodObject>(merging: Incoming) => ZodObject<extend<T, Incoming["_shape"]>, UnknownKeys, 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 [k in keyof T]?: true>(mask: Mask) => ZodObject<objectUtil.noNever<[k in keyof T]: k extends keyof Mask ? never : T[k]>, UnknownKeys, Catchall>
partial: () => ZodObject<[k in keyof T]: ReturnType<T[k]["optional"]>, UnknownKeys, Catchall>
pick: <Mask extends [k in keyof T]?: true>(mask: Mask) => ZodObject<objectUtil.noNever<[k in keyof Mask]: k extends keyof T ? T[k] : never>, UnknownKeys, 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>
Methods
_parse(ctx: ParseContext): any
Static Properties
create: <T extends ZodRawShape>(shape: T) => ZodObject<T>
lazycreate: <T extends ZodRawShape>(shape: () => T) => ZodObject<T>
strictCreate: <T extends ZodRawShape>(shape: T) => ZodObject<T, "strict">