typebox 1.0.43 → 1.0.45
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/build/schema/build.d.mts +6 -6
- package/build/schema/build.mjs +6 -4
- package/build/schema/check.d.mts +3 -3
- package/build/schema/check.mjs +4 -2
- package/build/schema/engine/_context.d.mts +6 -16
- package/build/schema/engine/_context.mjs +11 -34
- package/build/schema/engine/_externals.d.mts +1 -1
- package/build/schema/engine/_externals.mjs +2 -2
- package/build/schema/engine/_functions.d.mts +3 -2
- package/build/schema/engine/_functions.mjs +6 -5
- package/build/schema/engine/_guard.d.mts +5 -4
- package/build/schema/engine/_guard.mjs +5 -5
- package/build/schema/engine/_reducer.d.mts +2 -1
- package/build/schema/engine/_reducer.mjs +3 -3
- package/build/schema/engine/_refine.d.mts +4 -3
- package/build/schema/engine/_refine.mjs +4 -4
- package/build/schema/engine/_stack.d.mts +18 -0
- package/build/schema/engine/_stack.mjs +73 -0
- package/build/schema/engine/_unique.d.mts +2 -0
- package/build/schema/engine/_unique.mjs +5 -0
- package/build/schema/engine/additionalItems.d.mts +5 -4
- package/build/schema/engine/additionalItems.mjs +15 -13
- package/build/schema/engine/additionalProperties.d.mts +5 -4
- package/build/schema/engine/additionalProperties.mjs +19 -16
- package/build/schema/engine/allOf.d.mts +5 -4
- package/build/schema/engine/allOf.mjs +15 -15
- package/build/schema/engine/anyOf.d.mts +5 -4
- package/build/schema/engine/anyOf.mjs +15 -15
- package/build/schema/engine/boolean.d.mts +4 -3
- package/build/schema/engine/boolean.mjs +4 -4
- package/build/schema/engine/const.d.mts +5 -4
- package/build/schema/engine/const.mjs +6 -6
- package/build/schema/engine/contains.d.mts +5 -4
- package/build/schema/engine/contains.mjs +10 -8
- package/build/schema/engine/dependencies.d.mts +5 -4
- package/build/schema/engine/dependencies.mjs +6 -6
- package/build/schema/engine/dependentRequired.d.mts +5 -4
- package/build/schema/engine/dependentRequired.mjs +3 -3
- package/build/schema/engine/dependentSchemas.d.mts +5 -4
- package/build/schema/engine/dependentSchemas.mjs +6 -6
- package/build/schema/engine/enum.d.mts +5 -4
- package/build/schema/engine/enum.mjs +6 -6
- package/build/schema/engine/exclusiveMaximum.d.mts +5 -4
- package/build/schema/engine/exclusiveMaximum.mjs +4 -4
- package/build/schema/engine/exclusiveMinimum.d.mts +5 -4
- package/build/schema/engine/exclusiveMinimum.mjs +4 -4
- package/build/schema/engine/format.d.mts +5 -4
- package/build/schema/engine/format.mjs +5 -5
- package/build/schema/engine/if.d.mts +5 -4
- package/build/schema/engine/if.mjs +19 -19
- package/build/schema/engine/index.d.mts +12 -11
- package/build/schema/engine/index.mjs +13 -12
- package/build/schema/engine/items.d.mts +5 -4
- package/build/schema/engine/items.mjs +22 -22
- package/build/schema/engine/maxContains.d.mts +5 -4
- package/build/schema/engine/maxContains.mjs +11 -9
- package/build/schema/engine/maxItems.d.mts +5 -4
- package/build/schema/engine/maxItems.mjs +4 -4
- package/build/schema/engine/maxLength.d.mts +5 -4
- package/build/schema/engine/maxLength.mjs +4 -4
- package/build/schema/engine/maxProperties.d.mts +5 -4
- package/build/schema/engine/maxProperties.mjs +4 -4
- package/build/schema/engine/maximum.d.mts +5 -4
- package/build/schema/engine/maximum.mjs +4 -4
- package/build/schema/engine/minContains.d.mts +5 -4
- package/build/schema/engine/minContains.mjs +10 -8
- package/build/schema/engine/minItems.d.mts +5 -4
- package/build/schema/engine/minItems.mjs +4 -4
- package/build/schema/engine/minLength.d.mts +5 -4
- package/build/schema/engine/minLength.mjs +4 -4
- package/build/schema/engine/minProperties.d.mts +5 -4
- package/build/schema/engine/minProperties.mjs +4 -4
- package/build/schema/engine/minimum.d.mts +5 -4
- package/build/schema/engine/minimum.mjs +4 -4
- package/build/schema/engine/multipleOf.d.mts +5 -4
- package/build/schema/engine/multipleOf.mjs +4 -4
- package/build/schema/engine/not.d.mts +5 -4
- package/build/schema/engine/not.mjs +14 -13
- package/build/schema/engine/oneOf.d.mts +5 -4
- package/build/schema/engine/oneOf.mjs +14 -14
- package/build/schema/engine/pattern.d.mts +5 -4
- package/build/schema/engine/pattern.mjs +6 -6
- package/build/schema/engine/patternProperties.d.mts +5 -4
- package/build/schema/engine/patternProperties.mjs +14 -12
- package/build/schema/engine/prefixItems.d.mts +5 -4
- package/build/schema/engine/prefixItems.mjs +6 -6
- package/build/schema/engine/properties.d.mts +5 -4
- package/build/schema/engine/properties.mjs +10 -10
- package/build/schema/engine/propertyNames.d.mts +5 -4
- package/build/schema/engine/propertyNames.mjs +11 -9
- package/build/schema/engine/recursiveRef.d.mts +5 -4
- package/build/schema/engine/recursiveRef.mjs +11 -22
- package/build/schema/engine/ref.d.mts +5 -4
- package/build/schema/engine/ref.mjs +44 -29
- package/build/schema/engine/required.d.mts +5 -4
- package/build/schema/engine/required.mjs +3 -3
- package/build/schema/engine/schema.d.mts +5 -4
- package/build/schema/engine/schema.mjs +216 -207
- package/build/schema/engine/type.d.mts +5 -4
- package/build/schema/engine/type.mjs +12 -12
- package/build/schema/engine/unevaluatedItems.d.mts +5 -4
- package/build/schema/engine/unevaluatedItems.mjs +15 -13
- package/build/schema/engine/unevaluatedProperties.d.mts +5 -4
- package/build/schema/engine/unevaluatedProperties.mjs +15 -13
- package/build/schema/engine/uniqueItems.d.mts +5 -4
- package/build/schema/engine/uniqueItems.mjs +3 -3
- package/build/schema/errors.d.mts +3 -3
- package/build/schema/errors.mjs +4 -4
- package/build/schema/resolve/index.d.mts +1 -0
- package/build/schema/resolve/index.mjs +1 -0
- package/build/schema/resolve/ref.d.mts +2 -0
- package/build/schema/{resolver → resolve}/ref.mjs +43 -45
- package/build/schema/resolve/resolve.d.mts +1 -0
- package/build/schema/resolve/resolve.mjs +1 -0
- package/build/schema/schema.d.mts +1 -1
- package/build/schema/schema.mjs +1 -1
- package/build/schema/types/recursiveAnchor.d.mts +4 -0
- package/build/schema/types/recursiveAnchor.mjs +7 -0
- package/build/type/types/_codec.d.mts +1 -1
- package/build/type/types/_codec.mjs +1 -0
- package/build/type/types/static.d.mts +4 -4
- package/package.json +1 -1
- package/readme.md +1 -76
- package/build/schema/resolver/index.d.mts +0 -1
- package/build/schema/resolver/index.mjs +0 -1
- package/build/schema/resolver/recursiveRef.d.mts +0 -2
- package/build/schema/resolver/recursiveRef.mjs +0 -47
- package/build/schema/resolver/ref.d.mts +0 -1
- package/build/schema/resolver/resolver.d.mts +0 -2
- package/build/schema/resolver/resolver.mjs +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
|
-
import * as
|
|
3
|
-
import { EmitGuard as E, Guard as G } from '../../guard/index.mjs';
|
|
2
|
+
import * as Schema from '../types/index.mjs';
|
|
4
3
|
import { BuildRefine, CheckRefine, ErrorRefine } from './_refine.mjs';
|
|
5
4
|
import { BuildGuard, CheckGuard, ErrorGuard } from './_guard.mjs';
|
|
5
|
+
import { EmitGuard as E, Guard as G } from '../../guard/index.mjs';
|
|
6
6
|
import { BuildAdditionalItems, CheckAdditionalItems, ErrorAdditionalItems } from './additionalItems.mjs';
|
|
7
7
|
import { BuildAdditionalProperties, CheckAdditionalProperties, ErrorAdditionalProperties } from './additionalProperties.mjs';
|
|
8
8
|
import { BuildAllOf, CheckAllOf, ErrorAllOf } from './allOf.mjs';
|
|
@@ -48,7 +48,7 @@ import { BuildUniqueItems, CheckUniqueItems, ErrorUniqueItems } from './uniqueIt
|
|
|
48
48
|
// HasTypeName
|
|
49
49
|
// ----------------------------------------------------------------
|
|
50
50
|
function HasTypeName(schema, typename) {
|
|
51
|
-
return
|
|
51
|
+
return Schema.IsType(schema) &&
|
|
52
52
|
(G.IsArray(schema.type) && schema.type.includes(typename) ||
|
|
53
53
|
G.IsEqual(schema.type, typename));
|
|
54
54
|
}
|
|
@@ -59,17 +59,17 @@ function HasObjectType(schema) {
|
|
|
59
59
|
return HasTypeName(schema, 'object');
|
|
60
60
|
}
|
|
61
61
|
function HasObjectKeywords(schema) {
|
|
62
|
-
return
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
return Schema.IsSchemaObject(schema) && (Schema.IsAdditionalProperties(schema) ||
|
|
63
|
+
Schema.IsDependencies(schema) ||
|
|
64
|
+
Schema.IsDependentRequired(schema) ||
|
|
65
|
+
Schema.IsDependentSchemas(schema) ||
|
|
66
|
+
Schema.IsProperties(schema) ||
|
|
67
|
+
Schema.IsPatternProperties(schema) ||
|
|
68
|
+
Schema.IsPropertyNames(schema) ||
|
|
69
|
+
Schema.IsMinProperties(schema) ||
|
|
70
|
+
Schema.IsMaxProperties(schema) ||
|
|
71
|
+
Schema.IsRequired(schema) ||
|
|
72
|
+
Schema.IsUnevaluatedProperties(schema));
|
|
73
73
|
}
|
|
74
74
|
// ----------------------------------------------------------------
|
|
75
75
|
// HasArray
|
|
@@ -78,16 +78,16 @@ function HasArrayType(schema) {
|
|
|
78
78
|
return HasTypeName(schema, 'array');
|
|
79
79
|
}
|
|
80
80
|
function HasArrayKeywords(schema) {
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
81
|
+
return Schema.IsSchemaObject(schema) && (Schema.IsAdditionalItems(schema) ||
|
|
82
|
+
Schema.IsItems(schema) ||
|
|
83
|
+
Schema.IsContains(schema) ||
|
|
84
|
+
Schema.IsMaxContains(schema) ||
|
|
85
|
+
Schema.IsMaxItems(schema) ||
|
|
86
|
+
Schema.IsMinContains(schema) ||
|
|
87
|
+
Schema.IsMinItems(schema) ||
|
|
88
|
+
Schema.IsPrefixItems(schema) ||
|
|
89
|
+
Schema.IsUnevaluatedItems(schema) ||
|
|
90
|
+
Schema.IsUniqueItems(schema));
|
|
91
91
|
}
|
|
92
92
|
// ----------------------------------------------------------------
|
|
93
93
|
// HasString
|
|
@@ -96,10 +96,10 @@ function HasStringType(schema) {
|
|
|
96
96
|
return HasTypeName(schema, 'string');
|
|
97
97
|
}
|
|
98
98
|
function HasStringKeywords(schema) {
|
|
99
|
-
return
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
return Schema.IsSchemaObject(schema) && (Schema.IsMinLength(schema) ||
|
|
100
|
+
Schema.IsMaxLength(schema) ||
|
|
101
|
+
Schema.IsFormat(schema) ||
|
|
102
|
+
Schema.IsPattern(schema));
|
|
103
103
|
}
|
|
104
104
|
// ----------------------------------------------------------------
|
|
105
105
|
// HasNumber
|
|
@@ -108,220 +108,229 @@ function HasNumberType(schema) {
|
|
|
108
108
|
return HasTypeName(schema, 'number') || HasTypeName(schema, 'bigint');
|
|
109
109
|
}
|
|
110
110
|
function HasNumberKeywords(schema) {
|
|
111
|
-
return
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
return Schema.IsSchemaObject(schema) && (Schema.IsMinimum(schema) ||
|
|
112
|
+
Schema.IsMaximum(schema) ||
|
|
113
|
+
Schema.IsExclusiveMaximum(schema) ||
|
|
114
|
+
Schema.IsExclusiveMinimum(schema) ||
|
|
115
|
+
Schema.IsMultipleOf(schema));
|
|
116
116
|
}
|
|
117
117
|
// ----------------------------------------------------------------
|
|
118
118
|
// Build
|
|
119
119
|
// ----------------------------------------------------------------
|
|
120
|
-
export function BuildSchema(context, schema, value) {
|
|
120
|
+
export function BuildSchema(stack, context, schema, value) {
|
|
121
|
+
stack.Push(schema);
|
|
121
122
|
const conditions = [];
|
|
122
|
-
if (
|
|
123
|
-
return BuildBooleanSchema(context, schema, value);
|
|
124
|
-
if (
|
|
125
|
-
conditions.push(BuildType(context, schema, value));
|
|
123
|
+
if (Schema.IsBooleanSchema(schema))
|
|
124
|
+
return BuildBooleanSchema(stack, context, schema, value);
|
|
125
|
+
if (Schema.IsType(schema))
|
|
126
|
+
conditions.push(BuildType(stack, context, schema, value));
|
|
126
127
|
if (HasObjectKeywords(schema)) {
|
|
127
128
|
const constraints = [];
|
|
128
|
-
if (
|
|
129
|
-
constraints.push(BuildRequired(context, schema, value));
|
|
130
|
-
if (
|
|
131
|
-
constraints.push(BuildAdditionalProperties(context, schema, value));
|
|
132
|
-
if (
|
|
133
|
-
constraints.push(BuildDependencies(context, schema, value));
|
|
134
|
-
if (
|
|
135
|
-
constraints.push(BuildDependentRequired(context, schema, value));
|
|
136
|
-
if (
|
|
137
|
-
constraints.push(BuildDependentSchemas(context, schema, value));
|
|
138
|
-
if (
|
|
139
|
-
constraints.push(BuildPatternProperties(context, schema, value));
|
|
140
|
-
if (
|
|
141
|
-
constraints.push(BuildProperties(context, schema, value));
|
|
142
|
-
if (
|
|
143
|
-
constraints.push(BuildPropertyNames(context, schema, value));
|
|
144
|
-
if (
|
|
145
|
-
constraints.push(BuildMinProperties(context, schema, value));
|
|
146
|
-
if (
|
|
147
|
-
constraints.push(BuildMaxProperties(context, schema, value));
|
|
129
|
+
if (Schema.IsRequired(schema))
|
|
130
|
+
constraints.push(BuildRequired(stack, context, schema, value));
|
|
131
|
+
if (Schema.IsAdditionalProperties(schema))
|
|
132
|
+
constraints.push(BuildAdditionalProperties(stack, context, schema, value));
|
|
133
|
+
if (Schema.IsDependencies(schema))
|
|
134
|
+
constraints.push(BuildDependencies(stack, context, schema, value));
|
|
135
|
+
if (Schema.IsDependentRequired(schema))
|
|
136
|
+
constraints.push(BuildDependentRequired(stack, context, schema, value));
|
|
137
|
+
if (Schema.IsDependentSchemas(schema))
|
|
138
|
+
constraints.push(BuildDependentSchemas(stack, context, schema, value));
|
|
139
|
+
if (Schema.IsPatternProperties(schema))
|
|
140
|
+
constraints.push(BuildPatternProperties(stack, context, schema, value));
|
|
141
|
+
if (Schema.IsProperties(schema))
|
|
142
|
+
constraints.push(BuildProperties(stack, context, schema, value));
|
|
143
|
+
if (Schema.IsPropertyNames(schema))
|
|
144
|
+
constraints.push(BuildPropertyNames(stack, context, schema, value));
|
|
145
|
+
if (Schema.IsMinProperties(schema))
|
|
146
|
+
constraints.push(BuildMinProperties(stack, context, schema, value));
|
|
147
|
+
if (Schema.IsMaxProperties(schema))
|
|
148
|
+
constraints.push(BuildMaxProperties(stack, context, schema, value));
|
|
148
149
|
const reduced = E.ReduceAnd(constraints);
|
|
149
150
|
const guarded = E.Or(E.Not(E.IsObjectNotArray(value)), reduced);
|
|
150
151
|
conditions.push(HasObjectType(schema) ? reduced : guarded);
|
|
151
152
|
}
|
|
152
153
|
if (HasArrayKeywords(schema)) {
|
|
153
154
|
const constraints = [];
|
|
154
|
-
if (
|
|
155
|
-
constraints.push(BuildAdditionalItems(context, schema, value));
|
|
156
|
-
if (
|
|
157
|
-
constraints.push(BuildContains(context, schema, value));
|
|
158
|
-
if (
|
|
159
|
-
constraints.push(BuildItems(context, schema, value));
|
|
160
|
-
if (
|
|
161
|
-
constraints.push(BuildMaxContains(context, schema, value));
|
|
162
|
-
if (
|
|
163
|
-
constraints.push(BuildMaxItems(context, schema, value));
|
|
164
|
-
if (
|
|
165
|
-
constraints.push(BuildMinContains(context, schema, value));
|
|
166
|
-
if (
|
|
167
|
-
constraints.push(BuildMinItems(context, schema, value));
|
|
168
|
-
if (
|
|
169
|
-
constraints.push(BuildPrefixItems(context, schema, value));
|
|
170
|
-
if (
|
|
171
|
-
constraints.push(BuildUniqueItems(context, schema, value));
|
|
155
|
+
if (Schema.IsAdditionalItems(schema))
|
|
156
|
+
constraints.push(BuildAdditionalItems(stack, context, schema, value));
|
|
157
|
+
if (Schema.IsContains(schema))
|
|
158
|
+
constraints.push(BuildContains(stack, context, schema, value));
|
|
159
|
+
if (Schema.IsItems(schema))
|
|
160
|
+
constraints.push(BuildItems(stack, context, schema, value));
|
|
161
|
+
if (Schema.IsMaxContains(schema))
|
|
162
|
+
constraints.push(BuildMaxContains(stack, context, schema, value));
|
|
163
|
+
if (Schema.IsMaxItems(schema))
|
|
164
|
+
constraints.push(BuildMaxItems(stack, context, schema, value));
|
|
165
|
+
if (Schema.IsMinContains(schema))
|
|
166
|
+
constraints.push(BuildMinContains(stack, context, schema, value));
|
|
167
|
+
if (Schema.IsMinItems(schema))
|
|
168
|
+
constraints.push(BuildMinItems(stack, context, schema, value));
|
|
169
|
+
if (Schema.IsPrefixItems(schema))
|
|
170
|
+
constraints.push(BuildPrefixItems(stack, context, schema, value));
|
|
171
|
+
if (Schema.IsUniqueItems(schema))
|
|
172
|
+
constraints.push(BuildUniqueItems(stack, context, schema, value));
|
|
172
173
|
const reduced = E.ReduceAnd(constraints);
|
|
173
174
|
const guarded = E.Or(E.Not(E.IsArray(value)), reduced);
|
|
174
175
|
conditions.push(HasArrayType(schema) ? reduced : guarded);
|
|
175
176
|
}
|
|
176
177
|
if (HasStringKeywords(schema)) {
|
|
177
178
|
const constraints = [];
|
|
178
|
-
if (
|
|
179
|
-
constraints.push(BuildFormat(context, schema, value));
|
|
180
|
-
if (
|
|
181
|
-
constraints.push(BuildMaxLength(context, schema, value));
|
|
182
|
-
if (
|
|
183
|
-
constraints.push(BuildMinLength(context, schema, value));
|
|
184
|
-
if (
|
|
185
|
-
constraints.push(BuildPattern(context, schema, value));
|
|
179
|
+
if (Schema.IsFormat(schema))
|
|
180
|
+
constraints.push(BuildFormat(stack, context, schema, value));
|
|
181
|
+
if (Schema.IsMaxLength(schema))
|
|
182
|
+
constraints.push(BuildMaxLength(stack, context, schema, value));
|
|
183
|
+
if (Schema.IsMinLength(schema))
|
|
184
|
+
constraints.push(BuildMinLength(stack, context, schema, value));
|
|
185
|
+
if (Schema.IsPattern(schema))
|
|
186
|
+
constraints.push(BuildPattern(stack, context, schema, value));
|
|
186
187
|
const reduced = E.ReduceAnd(constraints);
|
|
187
188
|
const guarded = E.Or(E.Not(E.IsString(value)), reduced);
|
|
188
189
|
conditions.push(HasStringType(schema) ? reduced : guarded);
|
|
189
190
|
}
|
|
190
191
|
if (HasNumberKeywords(schema)) {
|
|
191
192
|
const constraints = [];
|
|
192
|
-
if (
|
|
193
|
-
constraints.push(BuildExclusiveMaximum(context, schema, value));
|
|
194
|
-
if (
|
|
195
|
-
constraints.push(BuildExclusiveMinimum(context, schema, value));
|
|
196
|
-
if (
|
|
197
|
-
constraints.push(BuildMaximum(context, schema, value));
|
|
198
|
-
if (
|
|
199
|
-
constraints.push(BuildMinimum(context, schema, value));
|
|
200
|
-
if (
|
|
201
|
-
constraints.push(BuildMultipleOf(context, schema, value));
|
|
193
|
+
if (Schema.IsExclusiveMaximum(schema))
|
|
194
|
+
constraints.push(BuildExclusiveMaximum(stack, context, schema, value));
|
|
195
|
+
if (Schema.IsExclusiveMinimum(schema))
|
|
196
|
+
constraints.push(BuildExclusiveMinimum(stack, context, schema, value));
|
|
197
|
+
if (Schema.IsMaximum(schema))
|
|
198
|
+
constraints.push(BuildMaximum(stack, context, schema, value));
|
|
199
|
+
if (Schema.IsMinimum(schema))
|
|
200
|
+
constraints.push(BuildMinimum(stack, context, schema, value));
|
|
201
|
+
if (Schema.IsMultipleOf(schema))
|
|
202
|
+
constraints.push(BuildMultipleOf(stack, context, schema, value));
|
|
202
203
|
const reduced = E.ReduceAnd(constraints);
|
|
203
204
|
const guarded = E.Or(E.Not(E.Or(E.IsNumber(value), E.IsBigInt(value))), reduced);
|
|
204
205
|
conditions.push(HasNumberType(schema) ? reduced : guarded);
|
|
205
206
|
}
|
|
206
|
-
if (
|
|
207
|
-
conditions.push(BuildRecursiveRef(context, schema, value));
|
|
208
|
-
if (
|
|
209
|
-
conditions.push(BuildRef(context, schema, value));
|
|
210
|
-
if (
|
|
211
|
-
conditions.push(BuildGuard(context, schema, value));
|
|
212
|
-
if (
|
|
213
|
-
conditions.push(BuildConst(context, schema, value));
|
|
214
|
-
if (
|
|
215
|
-
conditions.push(BuildEnum(context, schema, value));
|
|
216
|
-
if (
|
|
217
|
-
conditions.push(BuildIf(context, schema, value));
|
|
218
|
-
if (
|
|
219
|
-
conditions.push(BuildNot(context, schema, value));
|
|
220
|
-
if (
|
|
221
|
-
conditions.push(BuildAllOf(context, schema, value));
|
|
222
|
-
if (
|
|
223
|
-
conditions.push(BuildAnyOf(context, schema, value));
|
|
224
|
-
if (
|
|
225
|
-
conditions.push(BuildOneOf(context, schema, value));
|
|
226
|
-
if (
|
|
227
|
-
conditions.push(E.Or(E.Not(E.IsArray(value)), BuildUnevaluatedItems(context, schema, value)));
|
|
228
|
-
if (
|
|
229
|
-
conditions.push(E.Or(E.Not(E.IsObject(value)), BuildUnevaluatedProperties(context, schema, value)));
|
|
230
|
-
if (
|
|
231
|
-
conditions.push(BuildRefine(context, schema, value));
|
|
232
|
-
|
|
207
|
+
if (Schema.IsRecursiveRef(schema))
|
|
208
|
+
conditions.push(BuildRecursiveRef(stack, context, schema, value));
|
|
209
|
+
if (Schema.IsRef(schema))
|
|
210
|
+
conditions.push(BuildRef(stack, context, schema, value));
|
|
211
|
+
if (Schema.IsGuard(schema))
|
|
212
|
+
conditions.push(BuildGuard(stack, context, schema, value));
|
|
213
|
+
if (Schema.IsConst(schema))
|
|
214
|
+
conditions.push(BuildConst(stack, context, schema, value));
|
|
215
|
+
if (Schema.IsEnum(schema))
|
|
216
|
+
conditions.push(BuildEnum(stack, context, schema, value));
|
|
217
|
+
if (Schema.IsIf(schema))
|
|
218
|
+
conditions.push(BuildIf(stack, context, schema, value));
|
|
219
|
+
if (Schema.IsNot(schema))
|
|
220
|
+
conditions.push(BuildNot(stack, context, schema, value));
|
|
221
|
+
if (Schema.IsAllOf(schema))
|
|
222
|
+
conditions.push(BuildAllOf(stack, context, schema, value));
|
|
223
|
+
if (Schema.IsAnyOf(schema))
|
|
224
|
+
conditions.push(BuildAnyOf(stack, context, schema, value));
|
|
225
|
+
if (Schema.IsOneOf(schema))
|
|
226
|
+
conditions.push(BuildOneOf(stack, context, schema, value));
|
|
227
|
+
if (Schema.IsUnevaluatedItems(schema))
|
|
228
|
+
conditions.push(E.Or(E.Not(E.IsArray(value)), BuildUnevaluatedItems(stack, context, schema, value)));
|
|
229
|
+
if (Schema.IsUnevaluatedProperties(schema))
|
|
230
|
+
conditions.push(E.Or(E.Not(E.IsObject(value)), BuildUnevaluatedProperties(stack, context, schema, value)));
|
|
231
|
+
if (Schema.IsRefine(schema))
|
|
232
|
+
conditions.push(BuildRefine(stack, context, schema, value));
|
|
233
|
+
const result = E.ReduceAnd(conditions);
|
|
234
|
+
stack.Pop(schema);
|
|
235
|
+
return result;
|
|
233
236
|
}
|
|
234
237
|
// ----------------------------------------------------------------
|
|
235
238
|
// Check
|
|
236
239
|
// ----------------------------------------------------------------
|
|
237
|
-
export function CheckSchema(context, schema, value) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
(!
|
|
242
|
-
(!
|
|
243
|
-
(!
|
|
244
|
-
(!
|
|
245
|
-
(!
|
|
246
|
-
(!
|
|
247
|
-
(!
|
|
248
|
-
(!
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
(!
|
|
252
|
-
(!
|
|
253
|
-
(!
|
|
254
|
-
(!
|
|
255
|
-
(!
|
|
256
|
-
(!
|
|
257
|
-
(!
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
(!
|
|
261
|
-
(!
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
(!
|
|
265
|
-
(!
|
|
266
|
-
(!
|
|
267
|
-
|
|
268
|
-
(!
|
|
269
|
-
(!
|
|
270
|
-
(!
|
|
271
|
-
(!
|
|
272
|
-
(!
|
|
273
|
-
(!
|
|
274
|
-
(!
|
|
275
|
-
(!
|
|
276
|
-
(!
|
|
277
|
-
(!
|
|
278
|
-
(!
|
|
279
|
-
(!
|
|
240
|
+
export function CheckSchema(stack, context, schema, value) {
|
|
241
|
+
stack.Push(schema);
|
|
242
|
+
const result = Schema.IsBooleanSchema(schema) ? CheckBooleanSchema(stack, context, schema, value) : ((!Schema.IsType(schema) || CheckType(stack, context, schema, value)) &&
|
|
243
|
+
(!(G.IsObject(value) && !G.IsArray(value)) || ((!Schema.IsRequired(schema) || CheckRequired(stack, context, schema, value)) &&
|
|
244
|
+
(!Schema.IsAdditionalProperties(schema) || CheckAdditionalProperties(stack, context, schema, value)) &&
|
|
245
|
+
(!Schema.IsDependencies(schema) || CheckDependencies(stack, context, schema, value)) &&
|
|
246
|
+
(!Schema.IsDependentRequired(schema) || CheckDependentRequired(stack, context, schema, value)) &&
|
|
247
|
+
(!Schema.IsDependentSchemas(schema) || CheckDependentSchemas(stack, context, schema, value)) &&
|
|
248
|
+
(!Schema.IsPatternProperties(schema) || CheckPatternProperties(stack, context, schema, value)) &&
|
|
249
|
+
(!Schema.IsProperties(schema) || CheckProperties(stack, context, schema, value)) &&
|
|
250
|
+
(!Schema.IsPropertyNames(schema) || CheckPropertyNames(stack, context, schema, value)) &&
|
|
251
|
+
(!Schema.IsMinProperties(schema) || CheckMinProperties(stack, context, schema, value)) &&
|
|
252
|
+
(!Schema.IsMaxProperties(schema) || CheckMaxProperties(stack, context, schema, value)))) &&
|
|
253
|
+
(!G.IsArray(value) || ((!Schema.IsAdditionalItems(schema) || CheckAdditionalItems(stack, context, schema, value)) &&
|
|
254
|
+
(!Schema.IsContains(schema) || CheckContains(stack, context, schema, value)) &&
|
|
255
|
+
(!Schema.IsItems(schema) || CheckItems(stack, context, schema, value)) &&
|
|
256
|
+
(!Schema.IsMaxContains(schema) || CheckMaxContains(stack, context, schema, value)) &&
|
|
257
|
+
(!Schema.IsMaxItems(schema) || CheckMaxItems(stack, context, schema, value)) &&
|
|
258
|
+
(!Schema.IsMinContains(schema) || CheckMinContains(stack, context, schema, value)) &&
|
|
259
|
+
(!Schema.IsMinItems(schema) || CheckMinItems(stack, context, schema, value)) &&
|
|
260
|
+
(!Schema.IsPrefixItems(schema) || CheckPrefixItems(stack, context, schema, value)) &&
|
|
261
|
+
(!Schema.IsUniqueItems(schema) || CheckUniqueItems(stack, context, schema, value)))) &&
|
|
262
|
+
(!G.IsString(value) || ((!Schema.IsFormat(schema) || CheckFormat(stack, context, schema, value)) &&
|
|
263
|
+
(!Schema.IsMaxLength(schema) || CheckMaxLength(stack, context, schema, value)) &&
|
|
264
|
+
(!Schema.IsMinLength(schema) || CheckMinLength(stack, context, schema, value)) &&
|
|
265
|
+
(!Schema.IsPattern(schema) || CheckPattern(stack, context, schema, value)))) &&
|
|
266
|
+
(!(G.IsNumber(value) || G.IsBigInt(value)) || ((!Schema.IsExclusiveMaximum(schema) || CheckExclusiveMaximum(stack, context, schema, value)) &&
|
|
267
|
+
(!Schema.IsExclusiveMinimum(schema) || CheckExclusiveMinimum(stack, context, schema, value)) &&
|
|
268
|
+
(!Schema.IsMaximum(schema) || CheckMaximum(stack, context, schema, value)) &&
|
|
269
|
+
(!Schema.IsMinimum(schema) || CheckMinimum(stack, context, schema, value)) &&
|
|
270
|
+
(!Schema.IsMultipleOf(schema) || CheckMultipleOf(stack, context, schema, value)))) &&
|
|
271
|
+
(!Schema.IsRecursiveRef(schema) || CheckRecursiveRef(stack, context, schema, value)) &&
|
|
272
|
+
(!Schema.IsRef(schema) || CheckRef(stack, context, schema, value)) &&
|
|
273
|
+
(!Schema.IsGuard(schema) || CheckGuard(stack, context, schema, value)) &&
|
|
274
|
+
(!Schema.IsConst(schema) || CheckConst(stack, context, schema, value)) &&
|
|
275
|
+
(!Schema.IsEnum(schema) || CheckEnum(stack, context, schema, value)) &&
|
|
276
|
+
(!Schema.IsIf(schema) || CheckIf(stack, context, schema, value)) &&
|
|
277
|
+
(!Schema.IsNot(schema) || CheckNot(stack, context, schema, value)) &&
|
|
278
|
+
(!Schema.IsAllOf(schema) || CheckAllOf(stack, context, schema, value)) &&
|
|
279
|
+
(!Schema.IsAnyOf(schema) || CheckAnyOf(stack, context, schema, value)) &&
|
|
280
|
+
(!Schema.IsOneOf(schema) || CheckOneOf(stack, context, schema, value)) &&
|
|
281
|
+
(!Schema.IsUnevaluatedItems(schema) || (!G.IsArray(value) || CheckUnevaluatedItems(stack, context, schema, value))) &&
|
|
282
|
+
(!Schema.IsUnevaluatedProperties(schema) || (!G.IsObject(value) || CheckUnevaluatedProperties(stack, context, schema, value))) &&
|
|
283
|
+
(!Schema.IsRefine(schema) || CheckRefine(stack, context, schema, value)));
|
|
284
|
+
stack.Pop(schema);
|
|
285
|
+
return result;
|
|
280
286
|
}
|
|
281
287
|
// ----------------------------------------------------------------
|
|
282
288
|
// Error
|
|
283
289
|
// ----------------------------------------------------------------
|
|
284
|
-
export function ErrorSchema(context, schemaPath, instancePath, schema, value) {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
+(!
|
|
289
|
-
+(!
|
|
290
|
-
+(!
|
|
291
|
-
+(!
|
|
292
|
-
+(!
|
|
293
|
-
+(!
|
|
294
|
-
+(!
|
|
295
|
-
+(!
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
+(!
|
|
299
|
-
+(!
|
|
300
|
-
+(!
|
|
301
|
-
+(!
|
|
302
|
-
+(!
|
|
303
|
-
+(!
|
|
304
|
-
+(!
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
+(!
|
|
308
|
-
+(!
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
+(!
|
|
312
|
-
+(!
|
|
313
|
-
+(!
|
|
314
|
-
|
|
315
|
-
+(!
|
|
316
|
-
+(!
|
|
317
|
-
+(!
|
|
318
|
-
+(!
|
|
319
|
-
+(!
|
|
320
|
-
+(!
|
|
321
|
-
+(!
|
|
322
|
-
+(!
|
|
323
|
-
+(!
|
|
324
|
-
+(!
|
|
325
|
-
+(!
|
|
326
|
-
(!
|
|
290
|
+
export function ErrorSchema(stack, context, schemaPath, instancePath, schema, value) {
|
|
291
|
+
stack.Push(schema);
|
|
292
|
+
const result = (Schema.IsBooleanSchema(schema)) ? ErrorBooleanSchema(stack, context, schemaPath, instancePath, schema, value) : (!!(+(!Schema.IsType(schema) || ErrorType(stack, context, schemaPath, instancePath, schema, value)) &
|
|
293
|
+
+(!(G.IsObject(value) && !G.IsArray(value)) || !!(+(!Schema.IsRequired(schema) || ErrorRequired(stack, context, schemaPath, instancePath, schema, value)) &
|
|
294
|
+
+(!Schema.IsAdditionalProperties(schema) || ErrorAdditionalProperties(stack, context, schemaPath, instancePath, schema, value)) &
|
|
295
|
+
+(!Schema.IsDependencies(schema) || ErrorDependencies(stack, context, schemaPath, instancePath, schema, value)) &
|
|
296
|
+
+(!Schema.IsDependentRequired(schema) || ErrorDependentRequired(stack, context, schemaPath, instancePath, schema, value)) &
|
|
297
|
+
+(!Schema.IsDependentSchemas(schema) || ErrorDependentSchemas(stack, context, schemaPath, instancePath, schema, value)) &
|
|
298
|
+
+(!Schema.IsPatternProperties(schema) || ErrorPatternProperties(stack, context, schemaPath, instancePath, schema, value)) &
|
|
299
|
+
+(!Schema.IsProperties(schema) || ErrorProperties(stack, context, schemaPath, instancePath, schema, value)) &
|
|
300
|
+
+(!Schema.IsPropertyNames(schema) || ErrorPropertyNames(stack, context, schemaPath, instancePath, schema, value)) &
|
|
301
|
+
+(!Schema.IsMinProperties(schema) || ErrorMinProperties(stack, context, schemaPath, instancePath, schema, value)) &
|
|
302
|
+
+(!Schema.IsMaxProperties(schema) || ErrorMaxProperties(stack, context, schemaPath, instancePath, schema, value)))) &
|
|
303
|
+
+(!G.IsArray(value) || !!(+(!Schema.IsAdditionalItems(schema) || ErrorAdditionalItems(stack, context, schemaPath, instancePath, schema, value)) &
|
|
304
|
+
+(!Schema.IsContains(schema) || ErrorContains(stack, context, schemaPath, instancePath, schema, value)) &
|
|
305
|
+
+(!Schema.IsItems(schema) || ErrorItems(stack, context, schemaPath, instancePath, schema, value)) &
|
|
306
|
+
+(!Schema.IsMaxContains(schema) || ErrorMaxContains(stack, context, schemaPath, instancePath, schema, value)) &
|
|
307
|
+
+(!Schema.IsMaxItems(schema) || ErrorMaxItems(stack, context, schemaPath, instancePath, schema, value)) &
|
|
308
|
+
+(!Schema.IsMinContains(schema) || ErrorMinContains(stack, context, schemaPath, instancePath, schema, value)) &
|
|
309
|
+
+(!Schema.IsMinItems(schema) || ErrorMinItems(stack, context, schemaPath, instancePath, schema, value)) &
|
|
310
|
+
+(!Schema.IsPrefixItems(schema) || ErrorPrefixItems(stack, context, schemaPath, instancePath, schema, value)) &
|
|
311
|
+
+(!Schema.IsUniqueItems(schema) || ErrorUniqueItems(stack, context, schemaPath, instancePath, schema, value)))) &
|
|
312
|
+
+(!G.IsString(value) || !!(+(!Schema.IsFormat(schema) || ErrorFormat(stack, context, schemaPath, instancePath, schema, value)) &
|
|
313
|
+
+(!Schema.IsMaxLength(schema) || ErrorMaxLength(stack, context, schemaPath, instancePath, schema, value)) &
|
|
314
|
+
+(!Schema.IsMinLength(schema) || ErrorMinLength(stack, context, schemaPath, instancePath, schema, value)) &
|
|
315
|
+
+(!Schema.IsPattern(schema) || ErrorPattern(stack, context, schemaPath, instancePath, schema, value)))) &
|
|
316
|
+
+(!(G.IsNumber(value) || G.IsBigInt(value)) || !!(+(!Schema.IsExclusiveMaximum(schema) || ErrorExclusiveMaximum(stack, context, schemaPath, instancePath, schema, value)) &
|
|
317
|
+
+(!Schema.IsExclusiveMinimum(schema) || ErrorExclusiveMinimum(stack, context, schemaPath, instancePath, schema, value)) &
|
|
318
|
+
+(!Schema.IsMaximum(schema) || ErrorMaximum(stack, context, schemaPath, instancePath, schema, value)) &
|
|
319
|
+
+(!Schema.IsMinimum(schema) || ErrorMinimum(stack, context, schemaPath, instancePath, schema, value)) &
|
|
320
|
+
+(!Schema.IsMultipleOf(schema) || ErrorMultipleOf(stack, context, schemaPath, instancePath, schema, value)))) &
|
|
321
|
+
+(!Schema.IsRecursiveRef(schema) || ErrorRecursiveRef(stack, context, schemaPath, instancePath, schema, value)) &
|
|
322
|
+
+(!Schema.IsRef(schema) || ErrorRef(stack, context, schemaPath, instancePath, schema, value)) &
|
|
323
|
+
+(!Schema.IsGuard(schema) || ErrorGuard(stack, context, schemaPath, instancePath, schema, value)) &
|
|
324
|
+
+(!Schema.IsConst(schema) || ErrorConst(stack, context, schemaPath, instancePath, schema, value)) &
|
|
325
|
+
+(!Schema.IsEnum(schema) || ErrorEnum(stack, context, schemaPath, instancePath, schema, value)) &
|
|
326
|
+
+(!Schema.IsIf(schema) || ErrorIf(stack, context, schemaPath, instancePath, schema, value)) &
|
|
327
|
+
+(!Schema.IsNot(schema) || ErrorNot(stack, context, schemaPath, instancePath, schema, value)) &
|
|
328
|
+
+(!Schema.IsAllOf(schema) || ErrorAllOf(stack, context, schemaPath, instancePath, schema, value)) &
|
|
329
|
+
+(!Schema.IsAnyOf(schema) || ErrorAnyOf(stack, context, schemaPath, instancePath, schema, value)) &
|
|
330
|
+
+(!Schema.IsOneOf(schema) || ErrorOneOf(stack, context, schemaPath, instancePath, schema, value)) &
|
|
331
|
+
+(!Schema.IsUnevaluatedItems(schema) || (!G.IsArray(value) || ErrorUnevaluatedItems(stack, context, schemaPath, instancePath, schema, value))) &
|
|
332
|
+
+(!Schema.IsUnevaluatedProperties(schema) || (!G.IsObject(value) || ErrorUnevaluatedProperties(stack, context, schemaPath, instancePath, schema, value)))) &&
|
|
333
|
+
(!Schema.IsRefine(schema) || ErrorRefine(stack, context, schemaPath, instancePath, schema, value)));
|
|
334
|
+
stack.Pop(schema);
|
|
335
|
+
return result;
|
|
327
336
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as Schema from '../types/index.mjs';
|
|
2
|
+
import { Stack } from './_stack.mjs';
|
|
2
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
3
|
-
export declare function BuildType(context: BuildContext, schema:
|
|
4
|
-
export declare function CheckType(context: CheckContext, schema:
|
|
5
|
-
export declare function ErrorType(context: ErrorContext, schemaPath: string, instancePath: string, schema:
|
|
4
|
+
export declare function BuildType(stack: Stack, context: BuildContext, schema: Schema.XType, value: string): string;
|
|
5
|
+
export declare function CheckType(stack: Stack, context: CheckContext, schema: Schema.XType, value: unknown): boolean;
|
|
6
|
+
export declare function ErrorType(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XType, value: unknown): boolean;
|
|
@@ -3,7 +3,7 @@ import { Guard as G, EmitGuard as E } from '../../guard/index.mjs';
|
|
|
3
3
|
// ------------------------------------------------------------------
|
|
4
4
|
// TypeName
|
|
5
5
|
// ------------------------------------------------------------------
|
|
6
|
-
function BuildTypeName(context, type, value) {
|
|
6
|
+
function BuildTypeName(stack, context, type, value) {
|
|
7
7
|
return (
|
|
8
8
|
// jsonschema
|
|
9
9
|
G.IsEqual(type, 'object') ? E.IsObjectNotArray(value) :
|
|
@@ -24,7 +24,7 @@ function BuildTypeName(context, type, value) {
|
|
|
24
24
|
G.IsEqual(type, 'void') ? E.IsUndefined(value) :
|
|
25
25
|
E.Constant(true));
|
|
26
26
|
}
|
|
27
|
-
function CheckTypeName(context, type, schema, value) {
|
|
27
|
+
function CheckTypeName(stack, context, type, schema, value) {
|
|
28
28
|
return (
|
|
29
29
|
// jsonschema
|
|
30
30
|
G.IsEqual(type, 'object') ? G.IsObjectNotArray(value) :
|
|
@@ -48,23 +48,23 @@ function CheckTypeName(context, type, schema, value) {
|
|
|
48
48
|
// ------------------------------------------------------------------
|
|
49
49
|
// TypeNames
|
|
50
50
|
// ------------------------------------------------------------------
|
|
51
|
-
function BuildTypeNames(context, typenames, value) {
|
|
52
|
-
return E.ReduceOr(typenames.map(type => BuildTypeName(context, type, value)));
|
|
51
|
+
function BuildTypeNames(stack, context, typenames, value) {
|
|
52
|
+
return E.ReduceOr(typenames.map(type => BuildTypeName(stack, context, type, value)));
|
|
53
53
|
}
|
|
54
|
-
function CheckTypeNames(context, types, schema, value) {
|
|
55
|
-
return types.some(type => CheckTypeName(context, type, schema, value));
|
|
54
|
+
function CheckTypeNames(stack, context, types, schema, value) {
|
|
55
|
+
return types.some(type => CheckTypeName(stack, context, type, schema, value));
|
|
56
56
|
}
|
|
57
57
|
// ------------------------------------------------------------------
|
|
58
58
|
// Type
|
|
59
59
|
// ------------------------------------------------------------------
|
|
60
|
-
export function BuildType(context, schema, value) {
|
|
61
|
-
return G.IsArray(schema.type) ? BuildTypeNames(context, schema.type, value) : BuildTypeName(context, schema.type, value);
|
|
60
|
+
export function BuildType(stack, context, schema, value) {
|
|
61
|
+
return G.IsArray(schema.type) ? BuildTypeNames(stack, context, schema.type, value) : BuildTypeName(stack, context, schema.type, value);
|
|
62
62
|
}
|
|
63
|
-
export function CheckType(context, schema, value) {
|
|
64
|
-
return G.IsArray(schema.type) ? CheckTypeNames(context, schema.type, schema, value) : CheckTypeName(context, schema.type, schema, value);
|
|
63
|
+
export function CheckType(stack, context, schema, value) {
|
|
64
|
+
return G.IsArray(schema.type) ? CheckTypeNames(stack, context, schema.type, schema, value) : CheckTypeName(stack, context, schema.type, schema, value);
|
|
65
65
|
}
|
|
66
|
-
export function ErrorType(context, schemaPath, instancePath, schema, value) {
|
|
67
|
-
const isType = G.IsArray(schema.type) ? CheckTypeNames(context, schema.type, schema, value) : CheckTypeName(context, schema.type, schema, value);
|
|
66
|
+
export function ErrorType(stack, context, schemaPath, instancePath, schema, value) {
|
|
67
|
+
const isType = G.IsArray(schema.type) ? CheckTypeNames(stack, context, schema.type, schema, value) : CheckTypeName(stack, context, schema.type, schema, value);
|
|
68
68
|
return isType || context.AddError({
|
|
69
69
|
keyword: 'type',
|
|
70
70
|
schemaPath,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as Schema from '../types/index.mjs';
|
|
2
|
+
import { Stack } from './_stack.mjs';
|
|
2
3
|
import { BuildContext, CheckContext, ErrorContext } from './_context.mjs';
|
|
3
|
-
export declare function BuildUnevaluatedItems(context: BuildContext, schema:
|
|
4
|
-
export declare function CheckUnevaluatedItems(context: CheckContext, schema:
|
|
5
|
-
export declare function ErrorUnevaluatedItems(context: ErrorContext, schemaPath: string, instancePath: string, schema:
|
|
4
|
+
export declare function BuildUnevaluatedItems(stack: Stack, context: BuildContext, schema: Schema.XUnevaluatedItems, value: string): string;
|
|
5
|
+
export declare function CheckUnevaluatedItems(stack: Stack, context: CheckContext, schema: Schema.XUnevaluatedItems, value: unknown[]): boolean;
|
|
6
|
+
export declare function ErrorUnevaluatedItems(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XUnevaluatedItems, value: unknown[]): boolean;
|