UNPKG

zod-to-ts

Version:

generate TypeScript types from your Zod schema

7 lines (6 loc) 524 B
import ts from 'typescript'; export declare function createTypeReferenceFromString(identifier: string): ts.TypeReferenceNode; export declare function createTypeAlias(node: ts.TypeNode, identifier: string, comment?: string): ts.TypeAliasDeclaration; export declare function printNode(node: ts.Node, printerOptions?: ts.PrinterOptions): string; export declare function getIdentifierOrStringLiteral(string_: string): ts.Identifier | ts.StringLiteral; export declare function addJsDocComment(node: ts.Node, text: string): void;