@conform-to/yup 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +21 -0
- package/package.json +2 -2
package/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type FieldsetConstraint, type Submission } from '@conform-to/dom';
|
|
2
|
+
import * as yup from 'yup';
|
|
3
|
+
export declare function getFieldsetConstraint<Source extends yup.AnyObjectSchema>(source: Source): FieldsetConstraint<yup.InferType<Source>>;
|
|
4
|
+
export declare function parse<Schema extends yup.AnyObjectSchema>(payload: FormData | URLSearchParams, config: {
|
|
5
|
+
schema: Schema | ((intent: string) => Schema);
|
|
6
|
+
acceptMultipleErrors?: ({ name, intent, payload, }: {
|
|
7
|
+
name: string;
|
|
8
|
+
intent: string;
|
|
9
|
+
payload: Record<string, any>;
|
|
10
|
+
}) => boolean;
|
|
11
|
+
async?: false;
|
|
12
|
+
}): Submission<yup.InferType<Schema>>;
|
|
13
|
+
export declare function parse<Schema extends yup.AnyObjectSchema>(payload: FormData | URLSearchParams, config: {
|
|
14
|
+
schema: Schema | ((intent: string) => Schema);
|
|
15
|
+
acceptMultipleErrors?: ({ name, intent, payload, }: {
|
|
16
|
+
name: string;
|
|
17
|
+
intent: string;
|
|
18
|
+
payload: Record<string, any>;
|
|
19
|
+
}) => boolean;
|
|
20
|
+
async: true;
|
|
21
|
+
}): Promise<Submission<yup.InferType<Schema>>>;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Conform helpers for integrating with yup",
|
|
4
4
|
"homepage": "https://conform.guide",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "0.6.
|
|
6
|
+
"version": "0.6.2",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"module": "module/index.js",
|
|
9
9
|
"repository": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"url": "https://github.com/edmundhung/conform/issues"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@conform-to/dom": "0.6.
|
|
18
|
+
"@conform-to/dom": "0.6.2",
|
|
19
19
|
"yup": ">=0.32.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|