@conform-to/yup
Advanced tools
Comparing version 1.0.0-pre.0 to 1.0.0-pre.1
@@ -1,11 +0,11 @@ | ||
import { type Constraint, type Submission } from '@conform-to/dom'; | ||
import { type Constraint, type Intent, type Submission } from '@conform-to/dom'; | ||
import * as yup from 'yup'; | ||
export declare function getFieldsetConstraint<Source extends yup.AnyObjectSchema>(source: Source): Record<string, Constraint>; | ||
export declare function parse<Schema extends yup.AnyObjectSchema>(payload: FormData | URLSearchParams, config: { | ||
schema: Schema | ((intent: string) => Schema); | ||
schema: Schema | ((intents: Array<Intent> | null) => Schema); | ||
async?: false; | ||
}): Submission<yup.InferType<Schema>>; | ||
}): Submission<yup.InferType<Schema>, string[]>; | ||
export declare function parse<Schema extends yup.AnyObjectSchema>(payload: FormData | URLSearchParams, config: { | ||
schema: Schema | ((intent: string) => Schema); | ||
schema: Schema | ((intents: Array<Intent> | null) => Schema); | ||
async: true; | ||
}): Promise<Submission<yup.InferType<Schema>>>; | ||
}): Promise<Submission<yup.InferType<Schema>, string[]>>; |
@@ -95,4 +95,4 @@ 'use strict'; | ||
return dom.parse(payload, { | ||
resolve(payload, intent) { | ||
var schema = typeof config.schema === 'function' ? config.schema(intent) : config.schema; | ||
resolve(payload, intents) { | ||
var schema = typeof config.schema === 'function' ? config.schema(intents) : config.schema; | ||
var resolveData = value => ({ | ||
@@ -99,0 +99,0 @@ value |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "1.0.0-pre.0", | ||
"version": "1.0.0-pre.1", | ||
"main": "index.js", | ||
@@ -29,3 +29,3 @@ "module": "index.mjs", | ||
"peerDependencies": { | ||
"@conform-to/dom": "1.0.0-pre.0", | ||
"@conform-to/dom": "1.0.0-pre.1", | ||
"yup": ">=0.32.0" | ||
@@ -32,0 +32,0 @@ }, |
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
14102