Module

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

TypeScript-first schema validation with static type inference
Extremely Popular
Go to Latest
variable z.util.arrayToEnum
import { z } from "https://dotland.deno.dev/x/zod@v3.22.4/mod.ts";
const { arrayToEnum } = z.util;

type

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