Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zod-to-ts

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zod-to-ts - npm Package Compare versions

Comparing version 0.2.2 to 1.0.0

7

dist/index.js

@@ -85,4 +85,7 @@ var __defProp = Object.defineProperty;

const members = properties.map(([key, value]) => {
const type = zodToTsNode(value, ...otherArgs);
return f2.createPropertySignature(void 0, f2.createIdentifier(key), void 0, type);
const nextZodNode = value;
const type = zodToTsNode(nextZodNode, ...otherArgs);
const { typeName: nextZodNodeTypeName } = nextZodNode._def;
const isOptional = nextZodNodeTypeName === "ZodOptional" || nextZodNode.isOptional();
return f2.createPropertySignature(void 0, f2.createIdentifier(key), isOptional ? f2.createToken(ts2.SyntaxKind.QuestionToken) : void 0, type);
});

@@ -89,0 +92,0 @@ return f2.createTypeLiteralNode(members);

{
"name": "zod-to-ts",
"version": "0.2.2",
"version": "1.0.0",
"type": "module",

@@ -47,3 +47,2 @@ "description": "generate TypeScript types from your Zod schema",

"rimraf": "3.0.2",
"ts-dedent": "2.2.0",
"tsup": "5.11.13",

@@ -50,0 +49,0 @@ "typescript": "4.5.5",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc