Module

x/zod/index.ts>ZodRecord

TypeScript-first schema validation with static type inference
Extremely Popular
Go to Latest
class ZodRecord
extends ZodType<RecordType<Key["_output"], Value["_output"]>, ZodRecordDef<Key, Value>, RecordType<Key["_input"], Value["_input"]>>
import { ZodRecord } from "https://dotland.deno.dev/x/zod@v3.22.2/index.ts";

Type Parameters

optional
Key extends KeySchema = ZodString
optional
Value extends ZodTypeAny = ZodTypeAny

Properties

readonly
element
readonly
keySchema
readonly
valueSchema

Methods

_parse(input: ParseInput): ParseReturnType<this["_output"]>

Static Methods

create<Value extends ZodTypeAny>(valueType: Value, params?: RawCreateParams): ZodRecord<ZodString, Value>
create<Keys extends KeySchema, Value extends ZodTypeAny>(
keySchema: Keys,
valueType: Value,
params?: RawCreateParams,
): ZodRecord<Keys, Value>