Socket
Socket
Sign inDemoInstall

@conform-to/zod

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@conform-to/zod - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

18

coercion.d.ts

@@ -7,3 +7,6 @@ import { ZodEffects } from 'zod';

*/
export declare function coerceString(value: unknown, transform?: (text: string) => unknown): unknown;
export declare function coerceString(
value: unknown,
transform?: (text: string) => unknown,
): unknown;
/**

@@ -19,7 +22,11 @@ * Helpers for coercing file

*/
export declare function isFileSchema(schema: ZodEffects<any, any, any>): boolean;
export declare function isFileSchema(
schema: ZodEffects<any, any, any>,
): boolean;
/**
* @deprecated Conform coerce empty strings to undefined by default
*/
export declare function ifNonEmptyString(fn: (text: string) => unknown): (value: unknown) => unknown;
export declare function ifNonEmptyString(
fn: (text: string) => unknown,
): (value: unknown) => unknown;
/**

@@ -29,2 +36,5 @@ * Reconstruct the provided schema with additional preprocessing steps

*/
export declare function enableTypeCoercion<Schema extends ZodTypeAny>(type: Schema, cache?: Map<ZodTypeAny, ZodTypeAny>): ZodType<output<Schema>>;
export declare function enableTypeCoercion<Schema extends ZodTypeAny>(
type: Schema,
cache?: Map<ZodTypeAny, ZodTypeAny>,
): ZodType<output<Schema>>;
import type { Constraint } from '@conform-to/dom';
import type { ZodTypeAny } from 'zod';
export declare function getZodConstraint(schema: ZodTypeAny): Record<string, Constraint>;
export declare function getZodConstraint(
schema: ZodTypeAny,
): Record<string, Constraint>;

@@ -6,3 +6,3 @@ {

"license": "MIT",
"version": "1.1.4",
"version": "1.1.5",
"main": "index.js",

@@ -29,3 +29,3 @@ "module": "index.mjs",

"dependencies": {
"@conform-to/dom": "1.1.4"
"@conform-to/dom": "1.1.5"
},

@@ -32,0 +32,0 @@ "peerDependencies": {

import { type Intent, type Submission } from '@conform-to/dom';
import { type ZodTypeAny, type ZodErrorMap, type input, type output, type ZodIssue } from 'zod';
export declare function parseWithZod<Schema extends ZodTypeAny>(payload: FormData | URLSearchParams, options: {
schema: Schema | ((intent: Intent | null) => Schema);
async?: false;
errorMap?: ZodErrorMap;
}): Submission<input<Schema>, string[], output<Schema>>;
export declare function parseWithZod<Schema extends ZodTypeAny, FormError>(payload: FormData | URLSearchParams, options: {
schema: Schema | ((intent: Intent | null) => Schema);
async?: false;
errorMap?: ZodErrorMap;
formatError: (issues: Array<ZodIssue>) => FormError;
}): Submission<input<Schema>, FormError, output<Schema>>;
export declare function parseWithZod<Schema extends ZodTypeAny>(payload: FormData | URLSearchParams, options: {
schema: Schema | ((intent: Intent | null) => Schema);
async: true;
errorMap?: ZodErrorMap;
}): Promise<Submission<input<Schema>, string[], output<Schema>>>;
export declare function parseWithZod<Schema extends ZodTypeAny, FormError>(payload: FormData | URLSearchParams, options: {
schema: Schema | ((intent: Intent | null) => Schema);
async: true;
errorMap?: ZodErrorMap;
formatError: (issues: Array<ZodIssue>) => FormError;
}): Promise<Submission<input<Schema>, FormError, output<Schema>>>;
import {
type ZodTypeAny,
type ZodErrorMap,
type input,
type output,
type ZodIssue,
} from 'zod';
export declare function parseWithZod<Schema extends ZodTypeAny>(
payload: FormData | URLSearchParams,
options: {
schema: Schema | ((intent: Intent | null) => Schema);
async?: false;
errorMap?: ZodErrorMap;
},
): Submission<input<Schema>, string[], output<Schema>>;
export declare function parseWithZod<Schema extends ZodTypeAny, FormError>(
payload: FormData | URLSearchParams,
options: {
schema: Schema | ((intent: Intent | null) => Schema);
async?: false;
errorMap?: ZodErrorMap;
formatError: (issues: Array<ZodIssue>) => FormError;
},
): Submission<input<Schema>, FormError, output<Schema>>;
export declare function parseWithZod<Schema extends ZodTypeAny>(
payload: FormData | URLSearchParams,
options: {
schema: Schema | ((intent: Intent | null) => Schema);
async: true;
errorMap?: ZodErrorMap;
},
): Promise<Submission<input<Schema>, string[], output<Schema>>>;
export declare function parseWithZod<Schema extends ZodTypeAny, FormError>(
payload: FormData | URLSearchParams,
options: {
schema: Schema | ((intent: Intent | null) => Schema);
async: true;
errorMap?: ZodErrorMap;
formatError: (issues: Array<ZodIssue>) => FormError;
},
): Promise<Submission<input<Schema>, FormError, output<Schema>>>;
export declare const conformZodMessage: {
VALIDATION_SKIPPED: string;
VALIDATION_UNDEFINED: string;
VALIDATION_SKIPPED: string;
VALIDATION_UNDEFINED: string;
};
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