@conform-to/zod
Advanced tools
Comparing version 0.6.1 to 0.6.2
import { type FieldsetConstraint, type Submission } from '@conform-to/dom'; | ||
import * as z from 'zod'; | ||
export declare function getFieldsetConstraint<Source extends z.ZodTypeAny>(source: Source): FieldsetConstraint<z.infer<Source>>; | ||
export declare function getFieldsetConstraint<Source extends z.ZodTypeAny>(source: Source): FieldsetConstraint<z.input<Source>>; | ||
export declare function parse<Schema extends z.ZodTypeAny>(payload: FormData | URLSearchParams, config: { | ||
@@ -5,0 +5,0 @@ schema: Schema | ((intent: string) => Schema); |
@@ -37,2 +37,4 @@ 'use strict'; | ||
return getSchemaShape(schema.unwrap()); | ||
} else if (schema instanceof z__namespace.ZodIntersection) { | ||
return _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, getSchemaShape(schema._def.left)), getSchemaShape(schema._def.right)); | ||
} | ||
@@ -39,0 +41,0 @@ return null; |
@@ -13,2 +13,4 @@ import { objectSpread2 as _objectSpread2 } from './_virtual/_rollupPluginBabelHelpers.js'; | ||
return getSchemaShape(schema.unwrap()); | ||
} else if (schema instanceof z.ZodIntersection) { | ||
return _objectSpread2(_objectSpread2({}, getSchemaShape(schema._def.left)), getSchemaShape(schema._def.right)); | ||
} | ||
@@ -15,0 +17,0 @@ return null; |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"main": "index.js", | ||
@@ -19,3 +19,3 @@ "module": "module/index.js", | ||
"peerDependencies": { | ||
"@conform-to/dom": "0.6.1", | ||
"@conform-to/dom": "0.6.2", | ||
"zod": "^3.21.0" | ||
@@ -22,0 +22,0 @@ }, |
18802
409