Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/cav/test/test_deps.ts>zod.z.ZodObject

A server framework for Deno
Go to Latest
class zod.z.ZodObject
import { zod } from "https://deno.land/x/cav@0.0.24/test/test_deps.ts";
const { ZodObject } = zod.z;

Type Parameters

T extends ZodRawShape
optional
UnknownKeys extends UnknownKeysParam = "strip"
optional
Catchall extends ZodTypeAny = ZodTypeAny
optional
Output = objectOutputType<T, Catchall>
optional
Input = objectInputType<T, Catchall>

Properties

private
_cached: { shape: T; keys: string[]; } | null
readonly
_catchall: Catchall
readonly
_shape: T
readonly
_unknownKeys: UnknownKeys
augment
extend
deprecated
nonstrict
readonly
shape

Methods

_getCached(): { shape: T; keys: string[]; }
_parse(input: ParseInput): ParseReturnType<this["_output"]>
catchall<Index extends ZodTypeAny>(index: Index): ZodObject<T, UnknownKeys, Index>
deepPartial(): partialUtil.DeepPartial<this>
merge<Incoming extends AnyZodObject>(merging: Incoming): ZodObject<extendShape<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<Omit<T, keyof Mask>, UnknownKeys, Catchall>
partial<Mask extends [k in keyof T]?: true>(mask: Mask): ZodObject<objectUtil.noNever<[k in keyof T]: k extends keyof Mask ? ZodOptional<T[k]> : T[k]>, UnknownKeys, Catchall>
passthrough(): ZodObject<T, "passthrough", Catchall>
pick<Mask extends [k in keyof T]?: true>(mask: Mask): ZodObject<Pick<T, Extract<keyof T, keyof Mask>>, 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>
strict(message?: errorUtil.ErrMessage): ZodObject<T, "strict", Catchall>
strip(): ZodObject<T, "strip", Catchall>

Static Properties

create: <T extends ZodRawShape>(shape: T, params?: RawCreateParams) => ZodObject<T>
lazycreate: <T extends ZodRawShape>(shape: () => T, params?: RawCreateParams) => ZodObject<T>
strictCreate: <T extends ZodRawShape>(shape: T, params?: RawCreateParams) => ZodObject<T, "strict">