@onetyped/zod
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -200,2 +200,11 @@ // src/from-schema.ts | ||
} | ||
case "file": { | ||
return z2.instanceof(File); | ||
} | ||
case "blob": { | ||
return z2.instanceof(Blob); | ||
} | ||
case "formData": { | ||
return z2.instanceof(FormData); | ||
} | ||
case "object": { | ||
@@ -301,3 +310,5 @@ const propertySchemas = Object.fromEntries( | ||
} from "@onetyped/core"; | ||
var createZodMethod = (method, argument_) => `z.${method}(${argument_ ?? ""})`; | ||
var createZodMethod = (method, argument_) => { | ||
return `z.${method}(${argument_ ?? ""})`; | ||
}; | ||
var toZodString = (node) => { | ||
@@ -347,2 +358,11 @@ switch (node.typeName) { | ||
} | ||
case "file": { | ||
return createZodMethod("instanceof", "File"); | ||
} | ||
case "blob": { | ||
return createZodMethod("instanceof", "Blob"); | ||
} | ||
case "formData": { | ||
return createZodMethod("instanceof", "FormData"); | ||
} | ||
case "object": { | ||
@@ -349,0 +369,0 @@ const propertySchemas = mapObjectNode2(node, toZodString).map(([key, zodType]) => `${key}: ${zodType}`).join(", "); |
{ | ||
"name": "@onetyped/zod", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"type": "module", | ||
@@ -44,3 +44,3 @@ "description": "onetyped Zod integration", | ||
"devDependencies": { | ||
"@onetyped/core": "0.0.8", | ||
"@onetyped/core": "0.0.9", | ||
"@trpc-labs/eslint-config": "0.1.1", | ||
@@ -47,0 +47,0 @@ "@trpc-labs/tsconfig": "0.1.1", |
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
28267
856