@foormjs/atscript 0.2.0 → 0.2.1
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/README.md +34 -1
- package/dist/index.cjs +576 -88
- package/dist/index.d.ts +5 -2
- package/dist/index.mjs +576 -88
- package/dist/plugin.cjs +49 -0
- package/dist/plugin.mjs +49 -0
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ import { TAtscriptAnnotatedType, TAtscriptTypeObject } from '@atscript/typescrip
|
|
|
8
8
|
* compiles each function string, and executes it with the current value
|
|
9
9
|
* and form data/context from validator options.
|
|
10
10
|
*
|
|
11
|
+
* Evaluates computed constraints (disabled, optional, hidden, readonly) and
|
|
12
|
+
* options (static or computed) to build an entry object passed to validators.
|
|
13
|
+
*
|
|
11
14
|
* Usage:
|
|
12
15
|
* import { foormValidatorPlugin } from '@foormjs/atscript'
|
|
13
16
|
*
|
|
@@ -53,10 +56,10 @@ declare function compileTopFn<R = unknown>(fnStr: string): (scope: TFoormFnScope
|
|
|
53
56
|
* Compiles a validator function string from a @foorm.validate annotation.
|
|
54
57
|
*
|
|
55
58
|
* The function string should be:
|
|
56
|
-
* "(v, data, ctx) => boolean | string"
|
|
59
|
+
* "(v, data, ctx, entry) => boolean | string"
|
|
57
60
|
*
|
|
58
61
|
* The compiled function receives a single TFoormFnScope object:
|
|
59
|
-
* { v, data, context }
|
|
62
|
+
* { v, data, context, entry }
|
|
60
63
|
*/
|
|
61
64
|
declare function compileValidatorFn(fnStr: string): (scope: TFoormFnScope) => boolean | string;
|
|
62
65
|
|