typebox 1.0.43 → 1.0.44
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/static.d.mts +4 -4
- package/package.json +1 -1
- 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,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 BuildPropertyNames(context: BuildContext, schema:
|
|
4
|
-
export declare function CheckPropertyNames(context: CheckContext, schema:
|
|
5
|
-
export declare function ErrorPropertyNames(context: ErrorContext, schemaPath: string, instancePath: string, schema:
|
|
4
|
+
export declare function BuildPropertyNames(stack: Stack, context: BuildContext, schema: Schema.XPropertyNames, value: string): string;
|
|
5
|
+
export declare function CheckPropertyNames(stack: Stack, context: CheckContext, schema: Schema.XPropertyNames, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
+
export declare function ErrorPropertyNames(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XPropertyNames, value: Record<PropertyKey, unknown>): boolean;
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
|
-
import {
|
|
2
|
+
import { Unique } from './_unique.mjs';
|
|
3
3
|
import { AccumulatedErrorContext } from './_context.mjs';
|
|
4
|
+
import { EmitGuard as E, Guard as G } from '../../guard/index.mjs';
|
|
4
5
|
import { BuildSchema, CheckSchema, ErrorSchema } from './schema.mjs';
|
|
5
6
|
// ------------------------------------------------------------------
|
|
6
7
|
// Build
|
|
7
8
|
// ------------------------------------------------------------------
|
|
8
|
-
export function BuildPropertyNames(context, schema, value) {
|
|
9
|
-
|
|
9
|
+
export function BuildPropertyNames(stack, context, schema, value) {
|
|
10
|
+
const [key, _index] = [Unique(), Unique()];
|
|
11
|
+
return E.Every(E.Keys(value), E.Constant(0), [key, _index], BuildSchema(stack, context, schema.propertyNames, key));
|
|
10
12
|
}
|
|
11
13
|
// ------------------------------------------------------------------
|
|
12
14
|
// Check
|
|
13
15
|
// ------------------------------------------------------------------
|
|
14
|
-
export function CheckPropertyNames(context, schema, value) {
|
|
15
|
-
return G.Every(G.Keys(value), 0, (key) => CheckSchema(context, schema.propertyNames, key));
|
|
16
|
+
export function CheckPropertyNames(stack, context, schema, value) {
|
|
17
|
+
return G.Every(G.Keys(value), 0, (key, _index) => CheckSchema(stack, context, schema.propertyNames, key));
|
|
16
18
|
}
|
|
17
19
|
// ------------------------------------------------------------------
|
|
18
20
|
// Error
|
|
19
21
|
// ------------------------------------------------------------------
|
|
20
|
-
export function ErrorPropertyNames(context, schemaPath, instancePath, schema, value) {
|
|
22
|
+
export function ErrorPropertyNames(stack, context, schemaPath, instancePath, schema, value) {
|
|
21
23
|
const propertyNames = [];
|
|
22
|
-
const isPropertyNames = G.EveryAll(G.Keys(value), 0, (key) => {
|
|
24
|
+
const isPropertyNames = G.EveryAll(G.Keys(value), 0, (key, _index) => {
|
|
23
25
|
const nextInstancePath = `${instancePath}/${key}`;
|
|
24
26
|
const nextSchemaPath = `${schemaPath}/propertyNames`;
|
|
25
|
-
const nextContext = new AccumulatedErrorContext(
|
|
26
|
-
const isPropertyName = ErrorSchema(nextContext, nextSchemaPath, nextInstancePath, schema.propertyNames, key);
|
|
27
|
+
const nextContext = new AccumulatedErrorContext();
|
|
28
|
+
const isPropertyName = ErrorSchema(stack, nextContext, nextSchemaPath, nextInstancePath, schema.propertyNames, key);
|
|
27
29
|
if (!isPropertyName)
|
|
28
30
|
propertyNames.push(key);
|
|
29
31
|
return isPropertyName;
|
|
@@ -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 BuildRecursiveRef(context: BuildContext, schema:
|
|
4
|
-
export declare function CheckRecursiveRef(context: CheckContext, schema:
|
|
5
|
-
export declare function ErrorRecursiveRef(context: ErrorContext, schemaPath: string, instancePath: string, schema:
|
|
4
|
+
export declare function BuildRecursiveRef(stack: Stack, context: BuildContext, schema: Schema.XRecursiveRef, value: string): string;
|
|
5
|
+
export declare function CheckRecursiveRef(stack: Stack, context: CheckContext, schema: Schema.XRecursiveRef, value: unknown): boolean;
|
|
6
|
+
export declare function ErrorRecursiveRef(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XRecursiveRef, value: unknown): boolean;
|
|
@@ -1,36 +1,25 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as Functions from './_functions.mjs';
|
|
3
|
+
import * as Schema from '../types/index.mjs';
|
|
4
4
|
import { CheckSchema, ErrorSchema } from './schema.mjs';
|
|
5
|
-
import { Resolver } from '../resolver/index.mjs';
|
|
6
|
-
// ------------------------------------------------------------------
|
|
7
|
-
// Resolve
|
|
8
|
-
// ------------------------------------------------------------------
|
|
9
|
-
function Resolve(context, schema) {
|
|
10
|
-
// note: it is safe to coerce to XSchema here as it wouldn't be possible
|
|
11
|
-
// to enter a ref resolution if the root schema was boolean.
|
|
12
|
-
const schemaRoot = context.GetSchema();
|
|
13
|
-
const dereferenced = Resolver.RecursiveRef(schemaRoot, schema);
|
|
14
|
-
return S.IsSchema(dereferenced) ? dereferenced : false;
|
|
15
|
-
}
|
|
16
5
|
// ------------------------------------------------------------------
|
|
17
6
|
// Build
|
|
18
7
|
// ------------------------------------------------------------------
|
|
19
|
-
export function BuildRecursiveRef(context, schema, value) {
|
|
20
|
-
const target =
|
|
21
|
-
return
|
|
8
|
+
export function BuildRecursiveRef(stack, context, schema, value) {
|
|
9
|
+
const target = stack.RecursiveRef(schema.$recursiveRef) ?? false;
|
|
10
|
+
return Functions.CreateFunction(stack, context, target, value);
|
|
22
11
|
}
|
|
23
12
|
// ------------------------------------------------------------------
|
|
24
13
|
// Check
|
|
25
14
|
// ------------------------------------------------------------------
|
|
26
|
-
export function CheckRecursiveRef(context, schema, value) {
|
|
27
|
-
const target =
|
|
28
|
-
return (
|
|
15
|
+
export function CheckRecursiveRef(stack, context, schema, value) {
|
|
16
|
+
const target = stack.RecursiveRef(schema.$recursiveRef) ?? false;
|
|
17
|
+
return (Schema.IsSchema(target) && CheckSchema(stack, context, target, value));
|
|
29
18
|
}
|
|
30
19
|
// ------------------------------------------------------------------
|
|
31
20
|
// Error
|
|
32
21
|
// ------------------------------------------------------------------
|
|
33
|
-
export function ErrorRecursiveRef(context, schemaPath, instancePath, schema, value) {
|
|
34
|
-
const target =
|
|
35
|
-
return (
|
|
22
|
+
export function ErrorRecursiveRef(stack, context, schemaPath, instancePath, schema, value) {
|
|
23
|
+
const target = stack.RecursiveRef(schema.$recursiveRef) ?? false;
|
|
24
|
+
return (Schema.IsSchema(target) && ErrorSchema(stack, context, '#', instancePath, target, value));
|
|
36
25
|
}
|
|
@@ -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 BuildRef(context: BuildContext, schema:
|
|
4
|
-
export declare function CheckRef(context: CheckContext, schema:
|
|
5
|
-
export declare function ErrorRef(context: ErrorContext, schemaPath: string, instancePath: string, schema:
|
|
4
|
+
export declare function BuildRef(stack: Stack, context: BuildContext, schema: Schema.XRef, value: string): string;
|
|
5
|
+
export declare function CheckRef(stack: Stack, context: CheckContext, schema: Schema.XRef, value: unknown): boolean;
|
|
6
|
+
export declare function ErrorRef(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XRef, value: unknown): boolean;
|
|
@@ -1,43 +1,58 @@
|
|
|
1
1
|
// deno-fmt-ignore-file
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
2
|
+
import * as Functions from './_functions.mjs';
|
|
3
|
+
import * as Schema from '../types/index.mjs';
|
|
4
|
+
import { CheckContext, AccumulatedErrorContext } from './_context.mjs';
|
|
5
|
+
import { EmitGuard as E } from '../../guard/index.mjs';
|
|
5
6
|
import { CheckSchema, ErrorSchema } from './schema.mjs';
|
|
6
|
-
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
// ------------------------------------------------------------------
|
|
8
|
+
// BuildRefStandard
|
|
9
|
+
// ------------------------------------------------------------------
|
|
10
|
+
function BuildRefStandard(stack, context, target, value) {
|
|
11
|
+
const interior = E.ArrowFunction(['context', 'value'], Functions.CreateFunction(stack, context, target, 'value'));
|
|
12
|
+
const exterior = E.ArrowFunction(['context', 'value'], E.Statements([
|
|
13
|
+
E.ConstDeclaration('nextContext', E.New('CheckContext', [])),
|
|
14
|
+
E.ConstDeclaration('result', E.Call(interior, ['nextContext', 'value'])),
|
|
15
|
+
E.If('result', context.Merge('[nextContext]')),
|
|
16
|
+
E.Return('result')
|
|
17
|
+
]));
|
|
18
|
+
return E.Call(exterior, ['context', value]);
|
|
19
|
+
}
|
|
20
|
+
// ------------------------------------------------------------------
|
|
21
|
+
// BuildRefStandard
|
|
22
|
+
// ------------------------------------------------------------------
|
|
23
|
+
function BuildRefFast(stack, context, target, value) {
|
|
24
|
+
return Functions.CreateFunction(stack, context, target, value);
|
|
22
25
|
}
|
|
23
26
|
// ------------------------------------------------------------------
|
|
24
|
-
//
|
|
27
|
+
// BuildRef
|
|
25
28
|
// ------------------------------------------------------------------
|
|
26
|
-
export function BuildRef(context, schema, value) {
|
|
27
|
-
const target =
|
|
28
|
-
return
|
|
29
|
+
export function BuildRef(stack, context, schema, value) {
|
|
30
|
+
const target = stack.Ref(schema.$ref) ?? false;
|
|
31
|
+
return context.UseUnevaluated()
|
|
32
|
+
? BuildRefStandard(stack, context, target, value)
|
|
33
|
+
: BuildRefFast(stack, context, target, value);
|
|
29
34
|
}
|
|
30
35
|
// ------------------------------------------------------------------
|
|
31
36
|
// Check
|
|
32
37
|
// ------------------------------------------------------------------
|
|
33
|
-
export function CheckRef(context, schema, value) {
|
|
34
|
-
const target =
|
|
35
|
-
|
|
38
|
+
export function CheckRef(stack, context, schema, value) {
|
|
39
|
+
const target = stack.Ref(schema.$ref) ?? false;
|
|
40
|
+
const nextContext = new CheckContext();
|
|
41
|
+
const result = (Schema.IsSchema(target) && CheckSchema(stack, nextContext, target, value));
|
|
42
|
+
if (result)
|
|
43
|
+
context.Merge([nextContext]);
|
|
44
|
+
return result;
|
|
36
45
|
}
|
|
37
46
|
// ------------------------------------------------------------------
|
|
38
47
|
// Error
|
|
39
48
|
// ------------------------------------------------------------------
|
|
40
|
-
export function ErrorRef(context, schemaPath, instancePath, schema, value) {
|
|
41
|
-
const target =
|
|
42
|
-
|
|
49
|
+
export function ErrorRef(stack, context, schemaPath, instancePath, schema, value) {
|
|
50
|
+
const target = stack.Ref(schema.$ref) ?? false;
|
|
51
|
+
const nextContext = new AccumulatedErrorContext();
|
|
52
|
+
const result = (Schema.IsSchema(target) && ErrorSchema(stack, nextContext, '#', instancePath, target, value));
|
|
53
|
+
if (result)
|
|
54
|
+
context.Merge([nextContext]);
|
|
55
|
+
if (!result)
|
|
56
|
+
nextContext.GetErrors().forEach(error => context.AddError(error));
|
|
57
|
+
return result;
|
|
43
58
|
}
|
|
@@ -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 BuildRequired(context: BuildContext, schema:
|
|
4
|
-
export declare function CheckRequired(context: CheckContext, schema:
|
|
5
|
-
export declare function ErrorRequired(context: ErrorContext, schemaPath: string, instancePath: string, schema:
|
|
4
|
+
export declare function BuildRequired(stack: Stack, context: BuildContext, schema: Schema.XRequired, value: string): string;
|
|
5
|
+
export declare function CheckRequired(stack: Stack, context: CheckContext, schema: Schema.XRequired, value: Record<PropertyKey, unknown>): boolean;
|
|
6
|
+
export declare function ErrorRequired(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XRequired, value: Record<PropertyKey, unknown>): boolean;
|
|
@@ -3,19 +3,19 @@ import { EmitGuard as E, Guard as G } from '../../guard/index.mjs';
|
|
|
3
3
|
// ------------------------------------------------------------------
|
|
4
4
|
// Build
|
|
5
5
|
// ------------------------------------------------------------------
|
|
6
|
-
export function BuildRequired(context, schema, value) {
|
|
6
|
+
export function BuildRequired(stack, context, schema, value) {
|
|
7
7
|
return E.ReduceAnd(schema.required.map((key) => E.HasPropertyKey(value, E.Constant(key))));
|
|
8
8
|
}
|
|
9
9
|
// ------------------------------------------------------------------
|
|
10
10
|
// Check
|
|
11
11
|
// ------------------------------------------------------------------
|
|
12
|
-
export function CheckRequired(context, schema, value) {
|
|
12
|
+
export function CheckRequired(stack, context, schema, value) {
|
|
13
13
|
return G.Every(schema.required, 0, (key) => G.HasPropertyKey(value, key));
|
|
14
14
|
}
|
|
15
15
|
// ------------------------------------------------------------------
|
|
16
16
|
// Error
|
|
17
17
|
// ------------------------------------------------------------------
|
|
18
|
-
export function ErrorRequired(context, schemaPath, instancePath, schema, value) {
|
|
18
|
+
export function ErrorRequired(stack, context, schemaPath, instancePath, schema, value) {
|
|
19
19
|
const requiredProperties = [];
|
|
20
20
|
const isRequired = G.EveryAll(schema.required, 0, (key) => {
|
|
21
21
|
const hasKey = G.HasPropertyKey(value, key);
|
|
@@ -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 BuildSchema(context: BuildContext, schema:
|
|
4
|
-
export declare function CheckSchema(context: CheckContext, schema:
|
|
5
|
-
export declare function ErrorSchema(context: ErrorContext, schemaPath: string, instancePath: string, schema:
|
|
4
|
+
export declare function BuildSchema(stack: Stack, context: BuildContext, schema: Schema.XSchema, value: string): string;
|
|
5
|
+
export declare function CheckSchema(stack: Stack, context: CheckContext, schema: Schema.XSchema, value: unknown): boolean;
|
|
6
|
+
export declare function ErrorSchema(stack: Stack, context: ErrorContext, schemaPath: string, instancePath: string, schema: Schema.XSchema, value: unknown): boolean;
|