Skip to main content

Function: object()

object<T>(shape?, params?): ZodObject<{ -readonly [P in string | number | symbol]: T[P] }, $strip>

Defined in: packages/agentos/node_modules/zod/v4/classic/schemas.d.cts:490

Type Parameters

T

T extends $ZodLooseShape = Partial<Record<never, SomeType>>

Parameters

shape?

T

params?

string |

{ error?: string | $ZodErrorMap<NonNullable<$ZodIssueInvalidType<unknown> | $ZodIssueUnrecognizedKeys>>; message?: string; }

error?

string | $ZodErrorMap<NonNullable<$ZodIssueInvalidType<unknown> | $ZodIssueUnrecognizedKeys>>

message?

string

Deprecated

This parameter is deprecated. Use error instead.

Returns

ZodObject<{ -readonly [P in string | number | symbol]: T[P] }, $strip>