zod-to-ts
Version:
generate TypeScript types from your Zod schema
10 lines (9 loc) • 481 B
TypeScript
import ts from 'typescript';
import type * as z4 from 'zod/v4/core';
import { type ZodToTsOptions } from "./types.js";
export declare function zodToTs(zod: z4.$ZodType, options: ZodToTsOptions): {
node: ts.TypeNode;
};
export { createTypeAlias, printNode } from "./ast-helpers.js";
export type { AuxiliaryTypeStore, OptionalTypeOverrideFunction, TypeOverrideFunction, TypeOverrideMap, ZodToTsOptions, } from "./types.js";
export { createAuxiliaryTypeStore } from "./utils.js";