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

x/zod/index.ts>z.util.arrayToEnum

TypeScript-first schema validation with static type inference
Very Popular
Go to Latest
variable z.util.arrayToEnum
import { z } from "https://deno.land/x/zod@v3.21.2/index.ts";
const { arrayToEnum } = z.util;

type

<T extends string, U extends [T, ...T[]]>(items: U) => [k in U[number]]: k