UNPKG

zod-to-json-schema

Version:
10 lines (9 loc) 340 B
import { ZodLiteralDef } from "zod"; import { Refs } from "../Refs.js"; export type JsonSchema7LiteralType = { type: "string" | "number" | "integer" | "boolean"; const: string | number | boolean; } | { type: "object" | "array"; }; export declare function parseLiteralDef(def: ZodLiteralDef, refs: Refs): JsonSchema7LiteralType;