Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/frugal/dep/zod.ts>z.ZodObject#setKey

A frugal web framework
Go to Latest
method z.ZodObject.prototype.setKey
import { z } from "https://deno.land/x/frugal@0.3.0/dep/zod.ts";
const { ZodObject } = z;

Type Parameters

Key extends string
Schema extends ZodTypeAny

Parameters

key: Key
schema: Schema

Returns

ZodObject<T & [k in Key]: Schema, UnknownKeys, Catchall>