z.ZodObject
import { z } from "https://esm.sh/zod@3.25.76/index.d.cts";
const { ZodObject } = z;class ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny, Output = objectOutputType<T, Catchall, UnknownKeys>, Input = objectInputType<T, Catchall, UnknownKeys>> extends ZodType<Output, ZodObjectDef<T, UnknownKeys, Catchall>, Input> { }
private _cached;
augment: <Augmentation extends ZodRawShape>(augmentation: Augmentation) => ZodObject<objectUtil.extendShape<T, Augmentation>, UnknownKeys, Catchall>;
nonstrict: () => ZodObject<T, "passthrough", Catchall>;
get shape(): T;
_getCached(): {
shape: T;
keys: string[];
};deepPartial(): partialUtil.DeepPartial<this>;
extend<Augmentation extends ZodRawShape>(augmentation: Augmentation): ZodObject<objectUtil.extendShape<T, Augmentation>, UnknownKeys, Catchall>;
keyof(): ZodEnum<enumUtil.UnionToTupleString<keyof T>>;
merge<Incoming extends AnyZodObject, Augmentation extends Incoming["shape"]>(merging: Incoming): ZodObject<objectUtil.extendShape<T, Augmentation>, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>;
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>;
partial<Mask extends util.Exactly<[k in keyof T]?: true, Mask>>(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 util.Exactly<[k in keyof T]?: true, Mask>>(mask: Mask): ZodObject<Pick<T, Extract<keyof T, keyof Mask>>, UnknownKeys, Catchall>;
required(): ZodObject<[k in keyof T]: deoptional<T[k]>, UnknownKeys, Catchall>;
required<Mask extends util.Exactly<[k in keyof T]?: true, Mask>>(mask: Mask): ZodObject<objectUtil.noNever<[k in keyof T]: k extends keyof Mask ? deoptional<T[k]> : T[k]>, UnknownKeys, Catchall>;
setKey<Key extends string, Schema extends ZodTypeAny>(key: Key, schema: Schema): ZodObject<T & [k in Key]: Schema, UnknownKeys, Catchall>;
strip(): ZodObject<T, "strip", Catchall>;
static create: <Shape extends ZodRawShape>(shape: Shape, params?: RawCreateParams) => ZodObject<Shape, "strip", ZodTypeAny, objectOutputType<Shape, ZodTypeAny, "strip">, objectInputType<Shape, ZodTypeAny, "strip">>;
static lazycreate: <Shape extends ZodRawShape>(shape: () => Shape, params?: RawCreateParams) => ZodObject<Shape, "strip">;
static strictCreate: <Shape extends ZodRawShape>(shape: Shape, params?: RawCreateParams) => ZodObject<Shape, "strict">;
§Type Parameters
§
T extends ZodRawShape
[src]§
UnknownKeys extends UnknownKeysParam = UnknownKeysParam
[src]§
Catchall extends ZodTypeAny = ZodTypeAny
[src]§
Output = objectOutputType<T, Catchall, UnknownKeys>
[src]§
Input = objectInputType<T, Catchall, UnknownKeys>
[src]§Extends
§
ZodType<Output, ZodObjectDef<T, UnknownKeys, Catchall>, Input>
[src]§Properties
§
augment: <Augmentation extends ZodRawShape>(augmentation: Augmentation) => ZodObject<objectUtil.extendShape<T, Augmentation>, UnknownKeys, Catchall>
[src]§Methods
§
_parse(input: ParseInput): ParseReturnType<this["_output"]>
[src]§
deepPartial(): partialUtil.DeepPartial<this> deprecated
[src]@deprecated
§
extend<Augmentation extends ZodRawShape>(augmentation: Augmentation): ZodObject<objectUtil.extendShape<T, Augmentation>, UnknownKeys, Catchall>
[src]§
keyof(): ZodEnum<enumUtil.UnionToTupleString<keyof T>>
[src]§
merge<Incoming extends AnyZodObject, Augmentation extends Incoming["shape"]>(merging: Incoming): ZodObject<objectUtil.extendShape<T, Augmentation>, Incoming["_def"]["unknownKeys"], Incoming["_def"]["catchall"]>
[src]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>
[src]§
partial(): ZodObject<[k in keyof T]: ZodOptional<T[k]>, UnknownKeys, Catchall>
[src]partial<Mask extends util.Exactly<[k in keyof T]?: true, Mask>>(mask: Mask): ZodObject<objectUtil.noNever<[k in keyof T]: k extends keyof Mask ? ZodOptional<T[k]> : T[k]>, UnknownKeys, Catchall>
[src]§
pick<Mask extends util.Exactly<[k in keyof T]?: true, Mask>>(mask: Mask): ZodObject<Pick<T, Extract<keyof T, keyof Mask>>, UnknownKeys, Catchall>
[src]§
required(): ZodObject<[k in keyof T]: deoptional<T[k]>, UnknownKeys, Catchall>
[src]required<Mask extends util.Exactly<[k in keyof T]?: true, Mask>>(mask: Mask): ZodObject<objectUtil.noNever<[k in keyof T]: k extends keyof Mask ? deoptional<T[k]> : T[k]>, UnknownKeys, Catchall>
[src]§
setKey<Key extends string, Schema extends ZodTypeAny>(key: Key, schema: Schema): ZodObject<T & [k in Key]: Schema, UnknownKeys, Catchall>
[src]§
strict(message?: errorUtil.ErrMessage): ZodObject<T, "strict", Catchall>
[src]§Static Properties
§
create: <Shape extends ZodRawShape>(shape: Shape, params?: RawCreateParams) => ZodObject<Shape, "strip", ZodTypeAny, objectOutputType<Shape, ZodTypeAny, "strip">, objectInputType<Shape, ZodTypeAny, "strip">>
[src]§
lazycreate: <Shape extends ZodRawShape>(shape: () => Shape, params?: RawCreateParams) => ZodObject<Shape, "strip">
[src]§
strictCreate: <Shape extends ZodRawShape>(shape: Shape, params?: RawCreateParams) => ZodObject<Shape, "strict">
[src]