@conform-to/yup
Advanced tools
Comparing version 1.1.4 to 1.1.5
import { type Constraint } from '@conform-to/dom'; | ||
import type * as yup from 'yup'; | ||
export declare function getYupConstraint<Source extends yup.AnyObjectSchema>(source: Source): Record<string, Constraint>; | ||
export declare function getYupConstraint<Source extends yup.AnyObjectSchema>( | ||
source: Source, | ||
): Record<string, Constraint>; |
@@ -12,2 +12,3 @@ 'use strict'; | ||
constraint.required = true; | ||
break; | ||
} | ||
@@ -21,2 +22,3 @@ case 'min': | ||
} | ||
break; | ||
} | ||
@@ -29,2 +31,3 @@ case 'max': | ||
} | ||
break; | ||
} | ||
@@ -37,2 +40,3 @@ case 'matches': | ||
} | ||
break; | ||
} | ||
@@ -39,0 +43,0 @@ } |
import { type Intent, type Submission } from '@conform-to/dom'; | ||
import * as yup from 'yup'; | ||
export { getYupConstraint } from './constraint'; | ||
export declare function parseWithYup<Schema extends yup.AnyObjectSchema>(payload: FormData | URLSearchParams, config: { | ||
schema: Schema | ((intent: Intent | null) => Schema); | ||
async?: false; | ||
}): Submission<yup.InferType<Schema>, string[]>; | ||
export declare function parseWithYup<Schema extends yup.AnyObjectSchema>(payload: FormData | URLSearchParams, config: { | ||
schema: Schema | ((intent: Intent | null) => Schema); | ||
async: true; | ||
}): Promise<Submission<yup.InferType<Schema>, string[]>>; | ||
export declare function parseWithYup<Schema extends yup.AnyObjectSchema>( | ||
payload: FormData | URLSearchParams, | ||
config: { | ||
schema: Schema | ((intent: Intent | null) => Schema); | ||
async?: false; | ||
}, | ||
): Submission<yup.InferType<Schema>, string[]>; | ||
export declare function parseWithYup<Schema extends yup.AnyObjectSchema>( | ||
payload: FormData | URLSearchParams, | ||
config: { | ||
schema: Schema | ((intent: Intent | null) => Schema); | ||
async: true; | ||
}, | ||
): Promise<Submission<yup.InferType<Schema>, string[]>>; |
@@ -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": { |
Sorry, the diff of this file is not supported yet
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
0
20647
9
509
+ Added@conform-to/dom@1.1.5(transitive)
- Removed@conform-to/dom@1.1.4(transitive)
Updated@conform-to/dom@1.1.5