@clementine-solutions/jane-io 1.0.0 → 1.0.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 +132 -1
- package/dist/core/analysis/diff.d.ts +35 -0
- package/dist/core/analysis/explain.d.ts +35 -0
- package/dist/core/analysis/index.d.ts +14 -0
- package/dist/core/analysis/replay.d.ts +34 -0
- package/dist/core/analysis/telemetry.d.ts +28 -0
- package/dist/core/boundary-rules/at-most-one.d.ts +17 -0
- package/dist/core/boundary-rules/conditionally-required.d.ts +18 -0
- package/dist/core/boundary-rules/date-range.d.ts +17 -0
- package/dist/core/boundary-rules/index.d.ts +18 -0
- package/dist/core/boundary-rules/mutually-exclusive.d.ts +16 -0
- package/dist/core/boundary-rules/no-unknown-fields.d.ts +17 -0
- package/dist/core/boundary-rules/require-all.d.ts +16 -0
- package/dist/core/boundary-rules/require-one.d.ts +17 -0
- package/dist/core/common/events.d.ts +37 -0
- package/dist/core/common/fluent.d.ts +151 -0
- package/dist/core/common/index.d.ts +16 -0
- package/dist/core/common/policy.d.ts +170 -0
- package/dist/core/common/utilities.d.ts +59 -0
- package/dist/core/common/wildcard.d.ts +27 -0
- package/dist/core/field-path/construct.d.ts +77 -0
- package/dist/core/field-path/format.d.ts +41 -0
- package/dist/core/field-path/index.d.ts +14 -0
- package/dist/core/field-path/utilities.d.ts +85 -0
- package/dist/core/field-path/walk.d.ts +36 -0
- package/dist/core/fluent-registry.d.ts +138 -0
- package/dist/core/normalizers/array/compact-sparse-array.d.ts +22 -0
- package/dist/core/normalizers/array/flatten-one-level.d.ts +17 -0
- package/dist/core/normalizers/array/remove-empty-string-items.d.ts +6 -0
- package/dist/core/normalizers/array/remove-null-items.d.ts +16 -0
- package/dist/core/normalizers/array/remove-undefined-items.d.ts +16 -0
- package/dist/core/normalizers/date/invalid-date-to-undefined.d.ts +17 -0
- package/dist/core/normalizers/index.d.ts +28 -0
- package/dist/core/normalizers/normalizer-register.d.ts +17 -0
- package/dist/core/normalizers/number/infinity-to-undefined.d.ts +18 -0
- package/dist/core/normalizers/number/nan-to-undefined.d.ts +17 -0
- package/dist/core/normalizers/number/normalize-negative-zero.d.ts +16 -0
- package/dist/core/normalizers/object/remove-empty-array-keys.d.ts +17 -0
- package/dist/core/normalizers/object/remove-empty-object-keys.d.ts +16 -0
- package/dist/core/normalizers/object/remove-empty-string-keys.d.ts +16 -0
- package/dist/core/normalizers/object/remove-null-keys.d.ts +16 -0
- package/dist/core/normalizers/object/remove-undefined-keys.d.ts +16 -0
- package/dist/core/normalizers/string/collapse-whitespace.d.ts +17 -0
- package/dist/core/normalizers/string/empty-to-undefined.d.ts +16 -0
- package/dist/core/normalizers/string/trim.d.ts +16 -0
- package/dist/core/parsers/index.d.ts +22 -0
- package/dist/core/parsers/parse-array-string.d.ts +16 -0
- package/dist/core/parsers/parse-bigint-string.d.ts +16 -0
- package/dist/core/parsers/parse-binary-string.d.ts +16 -0
- package/dist/core/parsers/parse-boolean-string.d.ts +16 -0
- package/dist/core/parsers/parse-date-string.d.ts +16 -0
- package/dist/core/parsers/parse-duration-string.d.ts +16 -0
- package/dist/core/parsers/parse-hex-string.d.ts +16 -0
- package/dist/core/parsers/parse-integer-string.d.ts +16 -0
- package/dist/core/parsers/parse-json-string.d.ts +17 -0
- package/dist/core/parsers/parse-numeric-string.d.ts +16 -0
- package/dist/core/parsers/parse-object-string.d.ts +16 -0
- package/dist/core/parsers/parse-octal-string.d.ts +16 -0
- package/dist/core/parsers/parse-scientific-notation-string.d.ts +16 -0
- package/dist/core/parsers/parse-url-string.d.ts +16 -0
- package/dist/core/pipeline/boundary.d.ts +36 -0
- package/dist/core/pipeline/contain.d.ts +122 -0
- package/dist/core/pipeline/index.d.ts +16 -0
- package/dist/core/pipeline/normalize.d.ts +34 -0
- package/dist/core/pipeline/parse.d.ts +40 -0
- package/dist/core/pipeline/pipeline.d.ts +23 -0
- package/dist/core/pipeline/scan.d.ts +46 -0
- package/dist/core/pipeline/validate.d.ts +40 -0
- package/dist/core/scanners/any/scan-for-sentinels.d.ts +19 -0
- package/dist/core/scanners/array/array-is-deep.d.ts +19 -0
- package/dist/core/scanners/array/array-is-heterogenous.d.ts +18 -0
- package/dist/core/scanners/array/array-is-large.d.ts +19 -0
- package/dist/core/scanners/bigint/bigint-is-large.d.ts +20 -0
- package/dist/core/scanners/bigint/bigint-not-safe.d.ts +20 -0
- package/dist/core/scanners/date/date-is-before-epoch.d.ts +19 -0
- package/dist/core/scanners/date/date-is-far-future.d.ts +19 -0
- package/dist/core/scanners/date/date-is-invalid.d.ts +19 -0
- package/dist/core/scanners/index.d.ts +31 -0
- package/dist/core/scanners/number/number-is-infinite.d.ts +19 -0
- package/dist/core/scanners/number/number-is-nan.d.ts +19 -0
- package/dist/core/scanners/number/number-is-too-large.d.ts +20 -0
- package/dist/core/scanners/number/number-is-unsafe-integer.d.ts +19 -0
- package/dist/core/scanners/object/object-has-circular-references.d.ts +20 -0
- package/dist/core/scanners/object/object-has-many-keys.d.ts +19 -0
- package/dist/core/scanners/object/object-is-deep.d.ts +20 -0
- package/dist/core/scanners/scanner-registry.d.ts +19 -0
- package/dist/core/scanners/string/string-has-unsafe-unicode.d.ts +19 -0
- package/dist/core/scanners/string/string-has-whitespace-edges.d.ts +19 -0
- package/dist/core/scanners/string/string-is-long.d.ts +19 -0
- package/dist/core/scanners/unknown/unknown-not-scannable.d.ts +21 -0
- package/dist/core/shapes/analysis.d.ts +239 -0
- package/dist/core/shapes/boundary.d.ts +126 -0
- package/dist/core/shapes/events.d.ts +83 -0
- package/dist/core/shapes/field-path.d.ts +51 -0
- package/dist/core/shapes/index.d.ts +21 -0
- package/dist/core/shapes/normalize.d.ts +59 -0
- package/dist/core/shapes/parse.d.ts +75 -0
- package/dist/core/shapes/pipeline.d.ts +149 -0
- package/dist/core/shapes/policy.d.ts +158 -0
- package/dist/core/shapes/public.d.ts +92 -0
- package/dist/core/shapes/scan.d.ts +126 -0
- package/dist/core/shapes/validate.d.ts +65 -0
- package/dist/core/validators/array/array-max-items.d.ts +25 -0
- package/dist/core/validators/array/array-min-items.d.ts +25 -0
- package/dist/core/validators/array/array.d.ts +22 -0
- package/dist/core/validators/array/excludes.d.ts +25 -0
- package/dist/core/validators/array/has-unique-items.d.ts +24 -0
- package/dist/core/validators/array/includes.d.ts +24 -0
- package/dist/core/validators/array/items-equal.d.ts +25 -0
- package/dist/core/validators/array/no-empty-string-items.d.ts +24 -0
- package/dist/core/validators/array/no-null-items.d.ts +24 -0
- package/dist/core/validators/array/no-undefined-items.d.ts +24 -0
- package/dist/core/validators/array/non-empty-array.d.ts +24 -0
- package/dist/core/validators/array/not-sparse.d.ts +25 -0
- package/dist/core/validators/bigint/bigint-equals.d.ts +24 -0
- package/dist/core/validators/bigint/bigint-max.d.ts +25 -0
- package/dist/core/validators/bigint/bigint-min.d.ts +25 -0
- package/dist/core/validators/bigint/bigint-negative.d.ts +23 -0
- package/dist/core/validators/bigint/bigint-non-negative.d.ts +24 -0
- package/dist/core/validators/bigint/bigint-non-positive.d.ts +24 -0
- package/dist/core/validators/bigint/bigint-positive.d.ts +24 -0
- package/dist/core/validators/bigint/bigint-safe.d.ts +25 -0
- package/dist/core/validators/bigint/bigint.d.ts +20 -0
- package/dist/core/validators/boolean/boolean.d.ts +21 -0
- package/dist/core/validators/boolean/is-false.d.ts +22 -0
- package/dist/core/validators/boolean/is-true.d.ts +22 -0
- package/dist/core/validators/common/is-country-code.d.ts +17 -0
- package/dist/core/validators/common/is-currency-code.d.ts +17 -0
- package/dist/core/validators/common/is-email-strict.d.ts +17 -0
- package/dist/core/validators/common/is-email.d.ts +17 -0
- package/dist/core/validators/common/is-ip.d.ts +17 -0
- package/dist/core/validators/common/is-phone-strict.d.ts +17 -0
- package/dist/core/validators/common/is-phone.d.ts +17 -0
- package/dist/core/validators/common/is-port.d.ts +17 -0
- package/dist/core/validators/common/is-postal-code.d.ts +17 -0
- package/dist/core/validators/common/is-url.d.ts +17 -0
- package/dist/core/validators/common/is-uuid.d.ts +17 -0
- package/dist/core/validators/date/before-epoch.d.ts +28 -0
- package/dist/core/validators/date/date-now-required.d.ts +22 -0
- package/dist/core/validators/date/is-date.d.ts +21 -0
- package/dist/core/validators/date/is-far-future.d.ts +23 -0
- package/dist/core/validators/date/is-future.d.ts +24 -0
- package/dist/core/validators/date/is-past.d.ts +24 -0
- package/dist/core/validators/date/not-after.d.ts +25 -0
- package/dist/core/validators/date/not-before.d.ts +25 -0
- package/dist/core/validators/date/same-day.d.ts +25 -0
- package/dist/core/validators/date/same-month.d.ts +25 -0
- package/dist/core/validators/date/same-year.d.ts +24 -0
- package/dist/core/validators/date/too-early.d.ts +25 -0
- package/dist/core/validators/date/too-late.d.ts +25 -0
- package/dist/core/validators/date/weekday.d.ts +32 -0
- package/dist/core/validators/date/weekend.d.ts +27 -0
- package/dist/core/validators/index.d.ts +112 -0
- package/dist/core/validators/nullish/is-null-or-undefined.d.ts +22 -0
- package/dist/core/validators/nullish/is-null.d.ts +21 -0
- package/dist/core/validators/nullish/is-undefined.d.ts +21 -0
- package/dist/core/validators/number/finite.d.ts +22 -0
- package/dist/core/validators/number/integer.d.ts +22 -0
- package/dist/core/validators/number/less-than.d.ts +21 -0
- package/dist/core/validators/number/max.d.ts +21 -0
- package/dist/core/validators/number/min.d.ts +21 -0
- package/dist/core/validators/number/more-than.d.ts +21 -0
- package/dist/core/validators/number/negative.d.ts +20 -0
- package/dist/core/validators/number/non-negative.d.ts +19 -0
- package/dist/core/validators/number/non-positive.d.ts +19 -0
- package/dist/core/validators/number/number.d.ts +19 -0
- package/dist/core/validators/number/positive.d.ts +20 -0
- package/dist/core/validators/number/safe-integer.d.ts +19 -0
- package/dist/core/validators/object/deep-equals.d.ts +24 -0
- package/dist/core/validators/object/has-key.d.ts +23 -0
- package/dist/core/validators/object/has-value.d.ts +27 -0
- package/dist/core/validators/object/keys-equal.d.ts +26 -0
- package/dist/core/validators/object/max-keys.d.ts +24 -0
- package/dist/core/validators/object/min-keys.d.ts +24 -0
- package/dist/core/validators/object/missing-key.d.ts +23 -0
- package/dist/core/validators/object/no-empty-array-values.d.ts +23 -0
- package/dist/core/validators/object/no-empty-object-values.d.ts +23 -0
- package/dist/core/validators/object/no-null-values.d.ts +23 -0
- package/dist/core/validators/object/no-undefined-values.d.ts +23 -0
- package/dist/core/validators/object/non-empty-object.d.ts +21 -0
- package/dist/core/validators/object/only-keys.d.ts +23 -0
- package/dist/core/validators/object/plain-object.d.ts +22 -0
- package/dist/core/validators/string/alpha-num.d.ts +23 -0
- package/dist/core/validators/string/alpha.d.ts +24 -0
- package/dist/core/validators/string/chars-equal.d.ts +23 -0
- package/dist/core/validators/string/ends-with.d.ts +23 -0
- package/dist/core/validators/string/is-ascii.d.ts +24 -0
- package/dist/core/validators/string/is-printable.d.ts +25 -0
- package/dist/core/validators/string/matches.d.ts +23 -0
- package/dist/core/validators/string/max-length.d.ts +24 -0
- package/dist/core/validators/string/min-length.d.ts +24 -0
- package/dist/core/validators/string/no-lead-space.d.ts +23 -0
- package/dist/core/validators/string/no-repeat-space.d.ts +25 -0
- package/dist/core/validators/string/no-space.d.ts +24 -0
- package/dist/core/validators/string/no-trail-space.d.ts +23 -0
- package/dist/core/validators/string/non-empty.d.ts +22 -0
- package/dist/core/validators/string/not-one-of.d.ts +24 -0
- package/dist/core/validators/string/num-string.d.ts +23 -0
- package/dist/core/validators/string/one-of.d.ts +23 -0
- package/dist/core/validators/string/starts-with.d.ts +23 -0
- package/dist/core/validators/string/string.d.ts +21 -0
- package/dist/core/validators/string/trimmed.d.ts +24 -0
- package/dist/index.d.ts +83 -0
- package/dist/test.d.ts +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Shapes | Scan
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Shapes that define how raw input is inspected and converted
|
|
7
|
+
* into safe JSON‑like form.
|
|
8
|
+
* @see https://jane-io.com
|
|
9
|
+
* ----------------------------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
import type { FieldPath, JaneEvent, Policy } from '.';
|
|
12
|
+
/**
|
|
13
|
+
* Execution context for containment.
|
|
14
|
+
*
|
|
15
|
+
* Holds structural limits, a cycle‑detection map, and the active policy.
|
|
16
|
+
* Used by containment routines to enforce depth and size limits while
|
|
17
|
+
* producing safe, JSON‑like representations of arbitrary input.
|
|
18
|
+
*/
|
|
19
|
+
export interface ContainmentContext {
|
|
20
|
+
readonly options: ContainmentOptions;
|
|
21
|
+
readonly seen: WeakMap<object, unknown>;
|
|
22
|
+
readonly policy: Policy;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Structural limits applied during containment.
|
|
26
|
+
*
|
|
27
|
+
* These bounds prevent unbounded recursion and excessive traversal by
|
|
28
|
+
* capping depth, array length, and object key count.
|
|
29
|
+
*/
|
|
30
|
+
export interface ContainmentOptions {
|
|
31
|
+
readonly maxDepth: number;
|
|
32
|
+
readonly maxArrayLength: number;
|
|
33
|
+
readonly maxObjectKeys: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* A JSON‑like object used internally during containment.
|
|
37
|
+
*
|
|
38
|
+
* Keys are plain strings and values are restricted to InternalJsonValue,
|
|
39
|
+
* ensuring the structure is safe, serializable, and cycle‑free.
|
|
40
|
+
*/
|
|
41
|
+
export type InternalJsonObject = {
|
|
42
|
+
[key: string]: InternalJsonValue;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* A JSON‑like array used internally during containment.
|
|
46
|
+
*
|
|
47
|
+
* Elements are restricted to InternalJsonValue to guarantee safe,
|
|
48
|
+
* serializable structure throughout the pipeline.
|
|
49
|
+
*/
|
|
50
|
+
export type InternalJsonArray = InternalJsonValue[];
|
|
51
|
+
/**
|
|
52
|
+
* The full set of values allowed inside internal JSON structures.
|
|
53
|
+
*
|
|
54
|
+
* Extends standard JSON with `undefined` to support partial containment
|
|
55
|
+
* and sentinel values during scanning and normalization.
|
|
56
|
+
*/
|
|
57
|
+
export type InternalJsonValue = string | number | boolean | null | InternalJsonArray | InternalJsonObject | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* A strict JSON‑serializable value.
|
|
60
|
+
*
|
|
61
|
+
* Used for public surfaces and output shapes where only standard JSON
|
|
62
|
+
* types are permitted.
|
|
63
|
+
*/
|
|
64
|
+
export type JsonValue = null | boolean | number | string | JsonValue[] | {
|
|
65
|
+
[key: string]: JsonValue;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* A function that executes the scan stage.
|
|
69
|
+
*
|
|
70
|
+
* Receives a ScanStageContext and returns a ScanStageOutput, allowing
|
|
71
|
+
* pipelines to plug in custom scanning behavior.
|
|
72
|
+
*/
|
|
73
|
+
export type ScanRule = (raw: unknown, path: FieldPath) => readonly JaneEvent[];
|
|
74
|
+
/**
|
|
75
|
+
* Groups scan rules by structural type.
|
|
76
|
+
*
|
|
77
|
+
* The scanner selects rules from these buckets based on the detected
|
|
78
|
+
* StructuralType, while `all` contains rules applied universally.
|
|
79
|
+
*/
|
|
80
|
+
export interface ScanRuleSet {
|
|
81
|
+
readonly all: readonly ScanRule[];
|
|
82
|
+
readonly string: readonly ScanRule[];
|
|
83
|
+
readonly number: readonly ScanRule[];
|
|
84
|
+
readonly boolean: readonly ScanRule[];
|
|
85
|
+
readonly array: readonly ScanRule[];
|
|
86
|
+
readonly object: readonly ScanRule[];
|
|
87
|
+
readonly date: readonly ScanRule[];
|
|
88
|
+
readonly unknown: readonly ScanRule[];
|
|
89
|
+
readonly bigint: readonly ScanRule[];
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Executes the scan stage.
|
|
93
|
+
*
|
|
94
|
+
* Accepts a ScanStageContext and returns a ScanStageOutput, allowing
|
|
95
|
+
* pipelines to plug in custom scanning behavior.
|
|
96
|
+
*/
|
|
97
|
+
export type ScanRunner = (input: ScanStageContext) => Promise<ScanStageOutput>;
|
|
98
|
+
/**
|
|
99
|
+
* Input to a scan stage execution.
|
|
100
|
+
*
|
|
101
|
+
* Provides the raw value, its current path, the active scan rules,
|
|
102
|
+
* and the policy controlling how events are interpreted.
|
|
103
|
+
*/
|
|
104
|
+
export interface ScanStageContext {
|
|
105
|
+
readonly raw: unknown;
|
|
106
|
+
readonly path?: FieldPath;
|
|
107
|
+
readonly rules: readonly ScanRule[];
|
|
108
|
+
readonly policy: Policy;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Output produced by the scan stage.
|
|
112
|
+
*
|
|
113
|
+
* Contains all emitted scan events and the safe, JSON‑like value
|
|
114
|
+
* derived from the raw input.
|
|
115
|
+
*/
|
|
116
|
+
export interface ScanStageOutput {
|
|
117
|
+
readonly events: readonly JaneEvent[];
|
|
118
|
+
readonly safe: InternalJsonValue;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* The structural categories recognized by the scanner.
|
|
122
|
+
*
|
|
123
|
+
* Used to select scan rules and classify raw input without relying
|
|
124
|
+
* on user‑defined types or schema information.
|
|
125
|
+
*/
|
|
126
|
+
export type StructuralType = 'string' | 'number' | 'boolean' | 'array' | 'object' | 'date' | 'bigint' | 'unknown';
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Shapes | Validate
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Shapes that define rule‑driven correctness checks during
|
|
7
|
+
* validation.
|
|
8
|
+
* @see https://jane-io.com
|
|
9
|
+
* ----------------------------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
import type { FieldPath, JaneEvent, PipelineBuilder } from '.';
|
|
12
|
+
import type { janeRegistry } from '../fluent-registry';
|
|
13
|
+
/**
|
|
14
|
+
* A factory that produces a validation rule.
|
|
15
|
+
*
|
|
16
|
+
* Used by registry‑backed fluent APIs to create parameterized validators
|
|
17
|
+
* from user‑supplied arguments.
|
|
18
|
+
*/
|
|
19
|
+
export type ValidatorFactory = (...args: unknown[]) => ValidationRule;
|
|
20
|
+
/**
|
|
21
|
+
* A fluent validator entry for a named validator in the registry.
|
|
22
|
+
*
|
|
23
|
+
* If the registry entry is a factory, exposes its parameters and returns
|
|
24
|
+
* a PipelineBuilder. Otherwise, returns a PipelineBuilder directly.
|
|
25
|
+
*/
|
|
26
|
+
export type ValidatorFactoryRule<Name extends ValidatorName> = (typeof janeRegistry.validators)[Name] extends ValidatorFactory ? (...args: Parameters<(typeof janeRegistry.validators)[Name]>) => PipelineBuilder : PipelineBuilder;
|
|
27
|
+
/**
|
|
28
|
+
* The fluent rule type for any validator registered in Jane.
|
|
29
|
+
*
|
|
30
|
+
* Represents either a zero‑argument validator or a parameterized factory,
|
|
31
|
+
* depending on the registry entry.
|
|
32
|
+
*/
|
|
33
|
+
export type ValidatorFluentRule = (typeof janeRegistry.validators)[ValidatorName];
|
|
34
|
+
/**
|
|
35
|
+
* The set of validator names registered in Jane.
|
|
36
|
+
*
|
|
37
|
+
* Used to index validator factories and fluent rules in the registry.
|
|
38
|
+
*/
|
|
39
|
+
export type ValidatorName = keyof typeof janeRegistry.validators;
|
|
40
|
+
/**
|
|
41
|
+
* A validation rule that inspects a value and emits correctness events.
|
|
42
|
+
*
|
|
43
|
+
* Rules return zero or more JaneEvent entries describing issues found at
|
|
44
|
+
* the given path.
|
|
45
|
+
*/
|
|
46
|
+
export type ValidationRule = (value: unknown, path: FieldPath) => readonly JaneEvent[] | Promise<readonly JaneEvent[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Input to a validation stage execution.
|
|
49
|
+
*
|
|
50
|
+
* Provides the normalized value, its current path, and the active
|
|
51
|
+
* validation rules.
|
|
52
|
+
*/
|
|
53
|
+
export interface ValidationStageContext {
|
|
54
|
+
readonly value: unknown;
|
|
55
|
+
readonly path?: FieldPath;
|
|
56
|
+
readonly rules: readonly ValidationRule[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Output produced by the validation stage.
|
|
60
|
+
*
|
|
61
|
+
* Contains all correctness‑related events emitted by the active rules.
|
|
62
|
+
*/
|
|
63
|
+
export interface ValidationStageOutput {
|
|
64
|
+
readonly events: readonly JaneEvent[];
|
|
65
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | Array Maximum Items (Array Max Items)
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Validate that an array does not exceed a maximum number of
|
|
7
|
+
* items.
|
|
8
|
+
* @see https://jane-io.com
|
|
9
|
+
* ----------------------------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
import type { ValidationRule } from '../../shapes';
|
|
12
|
+
/**
|
|
13
|
+
* Validate that an array does not exceed a maximum number of items.
|
|
14
|
+
*
|
|
15
|
+
* This rule checks:
|
|
16
|
+
* - The value is structurally an array
|
|
17
|
+
* - The array length is less than or equal to the provided maximum
|
|
18
|
+
*
|
|
19
|
+
* Emits:
|
|
20
|
+
* - array.not.array
|
|
21
|
+
* - array.too.long
|
|
22
|
+
*
|
|
23
|
+
* This rule is async-compatible and returns a readonly array of JaneEvent objects.
|
|
24
|
+
*/
|
|
25
|
+
export declare const arrayMaxItems: (max: number) => ValidationRule;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | Array Minimum Items (Array Min Items)
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Validate that an array contains at least a minimum number of
|
|
7
|
+
* items.
|
|
8
|
+
* @see https://jane-io.com
|
|
9
|
+
* ----------------------------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
import type { ValidationRule } from '../../shapes';
|
|
12
|
+
/**
|
|
13
|
+
* Validate that an array contains at least a minimum number of items.
|
|
14
|
+
*
|
|
15
|
+
* This rule checks:
|
|
16
|
+
* - The value is structurally an array
|
|
17
|
+
* - The array length is greater than or equal to the provided minimum
|
|
18
|
+
*
|
|
19
|
+
* Emits:
|
|
20
|
+
* - array.not.array
|
|
21
|
+
* - array.too.short
|
|
22
|
+
*
|
|
23
|
+
* This rule is async-compatible and returns a readonly array of JaneEvent objects.
|
|
24
|
+
*/
|
|
25
|
+
export declare const arrayMinItems: (min: number) => ValidationRule;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | Array
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Validate that a value is structurally an array.
|
|
7
|
+
* @see https://jane-io.com
|
|
8
|
+
* ----------------------------------------------------------------------------
|
|
9
|
+
*/
|
|
10
|
+
import type { ValidationRule } from '../../shapes';
|
|
11
|
+
/**
|
|
12
|
+
* Validate that a value is structurally an array.
|
|
13
|
+
*
|
|
14
|
+
* This rule checks:
|
|
15
|
+
* - The value is an array according to JavaScript semantics
|
|
16
|
+
*
|
|
17
|
+
* Emits:
|
|
18
|
+
* - array.not.array
|
|
19
|
+
*
|
|
20
|
+
* This rule is async-compatible and returns a readonly array of JaneEvent objects.
|
|
21
|
+
*/
|
|
22
|
+
export declare const array: ValidationRule;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | Excludes
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Validate that an array does not include a specific
|
|
7
|
+
* disallowed item.
|
|
8
|
+
* @see https://jane-io.com
|
|
9
|
+
* ----------------------------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
import type { ValidationRule } from '../../shapes';
|
|
12
|
+
/**
|
|
13
|
+
* Validate that an array does not include a specific disallowed item.
|
|
14
|
+
*
|
|
15
|
+
* This rule checks:
|
|
16
|
+
* - The value is structurally an array
|
|
17
|
+
* - The array does not contain the provided item (using Array.prototype.includes)
|
|
18
|
+
*
|
|
19
|
+
* Emits:
|
|
20
|
+
* - array.not.array
|
|
21
|
+
* - array.has.invalid-value
|
|
22
|
+
*
|
|
23
|
+
* This rule is async-compatible and returns a readonly array of JaneEvent objects.
|
|
24
|
+
*/
|
|
25
|
+
export declare const excludes: (item: unknown) => ValidationRule;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | Has Unique Items
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Validate that an array contains only unique items.
|
|
7
|
+
* @see https://jane-io.com
|
|
8
|
+
* ----------------------------------------------------------------------------
|
|
9
|
+
*/
|
|
10
|
+
import type { ValidationRule } from '../../shapes';
|
|
11
|
+
/**
|
|
12
|
+
* Validate that an array contains only unique items.
|
|
13
|
+
*
|
|
14
|
+
* This rule checks:
|
|
15
|
+
* - The value is structurally an array
|
|
16
|
+
* - The array does not contain duplicate items (using reference and value equality via Set)
|
|
17
|
+
*
|
|
18
|
+
* Emits:
|
|
19
|
+
* - array.not.array
|
|
20
|
+
* - array.not.unique
|
|
21
|
+
*
|
|
22
|
+
* This rule is async-compatible and returns a readonly array of JaneEvent objects.
|
|
23
|
+
*/
|
|
24
|
+
export declare const hasUniqueItems: ValidationRule;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | Includes
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Validate that an array includes a specific required item.
|
|
7
|
+
* @see https://jane-io.com
|
|
8
|
+
* ----------------------------------------------------------------------------
|
|
9
|
+
*/
|
|
10
|
+
import type { ValidationRule } from '../../shapes';
|
|
11
|
+
/**
|
|
12
|
+
* Validate that an array includes a specific required item.
|
|
13
|
+
*
|
|
14
|
+
* This rule checks:
|
|
15
|
+
* - The value is structurally an array
|
|
16
|
+
* - The array contains the provided item (using Array.prototype.includes)
|
|
17
|
+
*
|
|
18
|
+
* Emits:
|
|
19
|
+
* - array.not.array
|
|
20
|
+
* - array.is.missing-value
|
|
21
|
+
*
|
|
22
|
+
* This rule is async-compatible and returns a readonly array of JaneEvent objects.
|
|
23
|
+
*/
|
|
24
|
+
export declare const includes: (item: unknown) => ValidationRule;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | Items Equal
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Validate that an array contains exactly the specified
|
|
7
|
+
* number of items.
|
|
8
|
+
* @see https://jane-io.com
|
|
9
|
+
* ----------------------------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
import type { ValidationRule } from '../../shapes';
|
|
12
|
+
/**
|
|
13
|
+
* Validate that an array contains exactly the specified number of items.
|
|
14
|
+
*
|
|
15
|
+
* This rule checks:
|
|
16
|
+
* - The value is structurally an array
|
|
17
|
+
* - The array length matches the exact required count
|
|
18
|
+
*
|
|
19
|
+
* Emits:
|
|
20
|
+
* - array.not.array
|
|
21
|
+
* - array.has.invalid-length
|
|
22
|
+
*
|
|
23
|
+
* This rule is async-compatible and returns a readonly array of JaneEvent objects.
|
|
24
|
+
*/
|
|
25
|
+
export declare const itemsEqual: (exact: number) => ValidationRule;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | No Empty String Items
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Validate that an array does not contain empty string items.
|
|
7
|
+
* @see https://jane-io.com
|
|
8
|
+
* ----------------------------------------------------------------------------
|
|
9
|
+
*/
|
|
10
|
+
import type { ValidationRule } from '../../shapes';
|
|
11
|
+
/**
|
|
12
|
+
* Validate that an array does not contain empty string items.
|
|
13
|
+
*
|
|
14
|
+
* This rule checks:
|
|
15
|
+
* - The value is structurally an array
|
|
16
|
+
* - No element in the array is an empty string ("")
|
|
17
|
+
*
|
|
18
|
+
* Emits:
|
|
19
|
+
* - array.not.array
|
|
20
|
+
* - array.has.empty-strings
|
|
21
|
+
*
|
|
22
|
+
* This rule is async-compatible and returns a readonly array of JaneEvent objects.
|
|
23
|
+
*/
|
|
24
|
+
export declare const noEmptyStringItems: ValidationRule;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | No Null Items
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Validate that an array does not contain null items.
|
|
7
|
+
* @see https://jane-io.com
|
|
8
|
+
* ----------------------------------------------------------------------------
|
|
9
|
+
*/
|
|
10
|
+
import type { ValidationRule } from '../../shapes';
|
|
11
|
+
/**
|
|
12
|
+
* Validate that an array does not contain null items.
|
|
13
|
+
*
|
|
14
|
+
* This rule checks:
|
|
15
|
+
* - The value is structurally an array
|
|
16
|
+
* - No element in the array is strictly equal to null
|
|
17
|
+
*
|
|
18
|
+
* Emits:
|
|
19
|
+
* - array.not.array
|
|
20
|
+
* - array.has.null-items
|
|
21
|
+
*
|
|
22
|
+
* This rule is async-compatible and returns a readonly array of JaneEvent objects.
|
|
23
|
+
*/
|
|
24
|
+
export declare const noNullItems: ValidationRule;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | No Undefined Items
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Validate that an array does not contain undefined items.
|
|
7
|
+
* @see https://jane-io.com
|
|
8
|
+
* ----------------------------------------------------------------------------
|
|
9
|
+
*/
|
|
10
|
+
import type { ValidationRule } from '../../shapes';
|
|
11
|
+
/**
|
|
12
|
+
* Validate that an array does not contain undefined items.
|
|
13
|
+
*
|
|
14
|
+
* This rule checks:
|
|
15
|
+
* - The value is structurally an array
|
|
16
|
+
* - No element in the array is strictly equal to undefined
|
|
17
|
+
*
|
|
18
|
+
* Emits:
|
|
19
|
+
* - array.not.array
|
|
20
|
+
* - array.has.undefined-items
|
|
21
|
+
*
|
|
22
|
+
* This rule is async-compatible and returns a readonly array of JaneEvent objects.
|
|
23
|
+
*/
|
|
24
|
+
export declare const noUndefinedItems: ValidationRule;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | Non-Empty Array
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Validate that an array is not empty.
|
|
7
|
+
* @see https://jane-io.com
|
|
8
|
+
* ----------------------------------------------------------------------------
|
|
9
|
+
*/
|
|
10
|
+
import type { ValidationRule } from '../../shapes';
|
|
11
|
+
/**
|
|
12
|
+
* Validate that an array is not empty.
|
|
13
|
+
*
|
|
14
|
+
* This rule checks:
|
|
15
|
+
* - The value is structurally an array
|
|
16
|
+
* - The array contains at least one item
|
|
17
|
+
*
|
|
18
|
+
* Emits:
|
|
19
|
+
* - array.not.array
|
|
20
|
+
* - array.is.empty
|
|
21
|
+
*
|
|
22
|
+
* This rule is async-compatible and returns a readonly array of JaneEvent objects.
|
|
23
|
+
*/
|
|
24
|
+
export declare const nonEmptyArray: ValidationRule;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | Not Sparse
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Validate that an array does not contain empty (sparse)
|
|
7
|
+
* slots.
|
|
8
|
+
* @see https://jane-io.com
|
|
9
|
+
* ----------------------------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
import type { ValidationRule } from '../../shapes';
|
|
12
|
+
/**
|
|
13
|
+
* Validate that an array does not contain empty (sparse) slots.
|
|
14
|
+
*
|
|
15
|
+
* This rule checks:
|
|
16
|
+
* - The value is structurally an array
|
|
17
|
+
* - Every index from 0 to length - 1 exists (no holes)
|
|
18
|
+
*
|
|
19
|
+
* Emits:
|
|
20
|
+
* - array.not.array
|
|
21
|
+
* - array.is.sparse
|
|
22
|
+
*
|
|
23
|
+
* This rule is async-compatible and returns a readonly array of JaneEvent objects.
|
|
24
|
+
*/
|
|
25
|
+
export declare const notSparse: ValidationRule;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | Bigint Equals
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Validates that the value is a string representing a BigInt
|
|
7
|
+
* equal to `target`.
|
|
8
|
+
* @see https://jane-io.com
|
|
9
|
+
* ----------------------------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
import type { ValidationRule } from '../../shapes';
|
|
12
|
+
/**
|
|
13
|
+
* Validates that the value is a string representing a BigInt equal to `target`.
|
|
14
|
+
*
|
|
15
|
+
* - Non‑string values emit `bigint.not.string`.
|
|
16
|
+
* - Strings that cannot be parsed as BigInt emit `bigint.not.bigint`.
|
|
17
|
+
* - Parsed BigInt values that do not equal `target` emit `bigint.not.equal`.
|
|
18
|
+
* - Returns an empty array when the value is valid.
|
|
19
|
+
*
|
|
20
|
+
* This rule is pure, total, async‑compatible, and returns a readonly array of
|
|
21
|
+
* JaneEvent objects. It preserves the provided path and supports userMessage
|
|
22
|
+
* overrides applied at the pipeline level.
|
|
23
|
+
*/
|
|
24
|
+
export declare const bigintEquals: (target: bigint) => ValidationRule;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | Bigint Maximum (Bigint Max)
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Validates that the value is a string representing a BigInt
|
|
7
|
+
* less than or equal to the provided `max`.
|
|
8
|
+
* @see https://jane-io.com
|
|
9
|
+
* ----------------------------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
import type { ValidationRule } from '../../shapes';
|
|
12
|
+
/**
|
|
13
|
+
* Validates that the value is a string representing a BigInt less than or
|
|
14
|
+
* equal to the provided `max`.
|
|
15
|
+
*
|
|
16
|
+
* - Non‑string values emit `bigint.not.string`.
|
|
17
|
+
* - Empty strings and non‑parseable strings emit `bigint.not.bigint`.
|
|
18
|
+
* - Parsed BigInt values greater than `max` emit `bigint.too.large`.
|
|
19
|
+
* - Returns an empty array when the value is valid.
|
|
20
|
+
*
|
|
21
|
+
* This rule is pure, total, async‑compatible, and returns a readonly array of
|
|
22
|
+
* JaneEvent objects. It preserves the provided path and supports userMessage
|
|
23
|
+
* overrides applied at the pipeline level.
|
|
24
|
+
*/
|
|
25
|
+
export declare const bigintMax: (max: bigint) => ValidationRule;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | Bigint Minimum (Bigint Min)
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Ensures the input is a string representing a BigInt that is
|
|
7
|
+
* greater than or equal to the provided `min` value.
|
|
8
|
+
* @see https://jane-io.com
|
|
9
|
+
* ----------------------------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
import type { ValidationRule } from '../../shapes';
|
|
12
|
+
/**
|
|
13
|
+
* Ensures the input is a string representing a BigInt that is
|
|
14
|
+
* greater than or equal to the provided `min` value.
|
|
15
|
+
*
|
|
16
|
+
* This validator follows Jane’s standard BigInt conventions:
|
|
17
|
+
* - The input must be a string. Non‑string values emit `bigint.not.string`.
|
|
18
|
+
* - Empty strings and non‑parseable strings emit `bigint.not.bigint`.
|
|
19
|
+
* - Parsed BigInt values smaller than `min` emit `bigint.too.small`.
|
|
20
|
+
*
|
|
21
|
+
* The rule is pure, total, async‑compatible, and preserves the
|
|
22
|
+
* provided path. It also supports userMessage overrides applied
|
|
23
|
+
* at the pipeline level.
|
|
24
|
+
*/
|
|
25
|
+
export declare const bigintMin: (min: bigint) => ValidationRule;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | Bigint Negative
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Ensures the input is a string representing a negative
|
|
7
|
+
* BigInt value.
|
|
8
|
+
* @see https://jane-io.com
|
|
9
|
+
* ----------------------------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
import type { ValidationRule } from '../../shapes';
|
|
12
|
+
/**
|
|
13
|
+
* Ensures the input is a string representing a negative BigInt value.
|
|
14
|
+
*
|
|
15
|
+
* This validator follows Jane’s standard BigInt conventions:
|
|
16
|
+
* - The input must be a string. Non‑string values emit `bigint.not.string`.
|
|
17
|
+
* - Empty strings and non‑parseable strings emit `bigint.not.bigint`.
|
|
18
|
+
* - Parsed BigInt values greater than or equal to 0 emit `bigint.not.negative`.
|
|
19
|
+
*
|
|
20
|
+
* The rule is pure, total, async‑compatible, and preserves the provided path.
|
|
21
|
+
* It also supports userMessage overrides applied at the pipeline level.
|
|
22
|
+
*/
|
|
23
|
+
export declare const bigintNegative: ValidationRule;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | Bigint Non-Negative
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Ensures the input is a string representing a BigInt that is
|
|
7
|
+
* greater than or equal to zero.
|
|
8
|
+
* @see https://jane-io.com
|
|
9
|
+
* ----------------------------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
import type { ValidationRule } from '../../shapes';
|
|
12
|
+
/**
|
|
13
|
+
* Ensures the input is a string representing a BigInt that is greater than or
|
|
14
|
+
* equal to zero.
|
|
15
|
+
*
|
|
16
|
+
* - Non-string values emit `bigint.not.string`.
|
|
17
|
+
* - Empty strings and non-parseable strings emit `bigint.not.bigint`.
|
|
18
|
+
* - Parsed BigInt values < 0 emit `bigint.not.non-negative`.
|
|
19
|
+
*
|
|
20
|
+
* This rule is pure, total, async-compatible, and preserves the
|
|
21
|
+
* provided path. It supports userMessage overrides applied at the
|
|
22
|
+
* pipeline level.
|
|
23
|
+
*/
|
|
24
|
+
export declare const bigintNonNegative: ValidationRule;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* Validators | Bigint Non-Positive
|
|
4
|
+
* ----------------------------------------------------------------------------
|
|
5
|
+
* @package @clementine-solutions/jane
|
|
6
|
+
* @description Ensures the input is a string representing a BigInt that is
|
|
7
|
+
* less than or equal to zero.
|
|
8
|
+
* @see https://jane-io.com
|
|
9
|
+
* ----------------------------------------------------------------------------
|
|
10
|
+
*/
|
|
11
|
+
import type { ValidationRule } from '../../shapes';
|
|
12
|
+
/**
|
|
13
|
+
* Ensures the input is a string representing a BigInt that is less than or
|
|
14
|
+
* equal to zero.
|
|
15
|
+
*
|
|
16
|
+
* - Non-string values emit `bigint.not.string`.
|
|
17
|
+
* - Empty strings and non-parseable strings emit `bigint.not.bigint`.
|
|
18
|
+
* - Parsed BigInt values > 0 emit `bigint.not.non-positive`.
|
|
19
|
+
*
|
|
20
|
+
* This rule is pure, total, async-compatible, and preserves the
|
|
21
|
+
* provided path. It supports userMessage overrides applied at the
|
|
22
|
+
* pipeline level.
|
|
23
|
+
*/
|
|
24
|
+
export declare const bigintNonPositive: ValidationRule;
|