UNPKG

zod

Version:

TypeScript-first schema declaration and validation library with static type inference

11 lines (10 loc) 531 B
import type * as JSONSchema from "../core/json-schema.js"; import type { ZodType } from "./schemas.js"; type JSONSchemaVersion = "draft-2020-12" | "draft-7" | "draft-4" | "openapi-3.0"; interface FromJSONSchemaParams { defaultTarget?: JSONSchemaVersion; } /** * Converts a JSON Schema to a Zod schema. This function should be considered semi-experimental. It's behavior is liable to change. */ export declare function fromJSONSchema(schema: JSONSchema.JSONSchema | boolean, params?: FromJSONSchemaParams): ZodType; export {};