Comparing version 0.2.2 to 1.0.0
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
39198
16
538
0