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.
Files changed (130) hide show
  1. package/build/schema/build.d.mts +6 -6
  2. package/build/schema/build.mjs +6 -4
  3. package/build/schema/check.d.mts +3 -3
  4. package/build/schema/check.mjs +4 -2
  5. package/build/schema/engine/_context.d.mts +6 -16
  6. package/build/schema/engine/_context.mjs +11 -34
  7. package/build/schema/engine/_externals.d.mts +1 -1
  8. package/build/schema/engine/_externals.mjs +2 -2
  9. package/build/schema/engine/_functions.d.mts +3 -2
  10. package/build/schema/engine/_functions.mjs +6 -5
  11. package/build/schema/engine/_guard.d.mts +5 -4
  12. package/build/schema/engine/_guard.mjs +5 -5
  13. package/build/schema/engine/_reducer.d.mts +2 -1
  14. package/build/schema/engine/_reducer.mjs +3 -3
  15. package/build/schema/engine/_refine.d.mts +4 -3
  16. package/build/schema/engine/_refine.mjs +4 -4
  17. package/build/schema/engine/_stack.d.mts +18 -0
  18. package/build/schema/engine/_stack.mjs +73 -0
  19. package/build/schema/engine/_unique.d.mts +2 -0
  20. package/build/schema/engine/_unique.mjs +5 -0
  21. package/build/schema/engine/additionalItems.d.mts +5 -4
  22. package/build/schema/engine/additionalItems.mjs +15 -13
  23. package/build/schema/engine/additionalProperties.d.mts +5 -4
  24. package/build/schema/engine/additionalProperties.mjs +19 -16
  25. package/build/schema/engine/allOf.d.mts +5 -4
  26. package/build/schema/engine/allOf.mjs +15 -15
  27. package/build/schema/engine/anyOf.d.mts +5 -4
  28. package/build/schema/engine/anyOf.mjs +15 -15
  29. package/build/schema/engine/boolean.d.mts +4 -3
  30. package/build/schema/engine/boolean.mjs +4 -4
  31. package/build/schema/engine/const.d.mts +5 -4
  32. package/build/schema/engine/const.mjs +6 -6
  33. package/build/schema/engine/contains.d.mts +5 -4
  34. package/build/schema/engine/contains.mjs +10 -8
  35. package/build/schema/engine/dependencies.d.mts +5 -4
  36. package/build/schema/engine/dependencies.mjs +6 -6
  37. package/build/schema/engine/dependentRequired.d.mts +5 -4
  38. package/build/schema/engine/dependentRequired.mjs +3 -3
  39. package/build/schema/engine/dependentSchemas.d.mts +5 -4
  40. package/build/schema/engine/dependentSchemas.mjs +6 -6
  41. package/build/schema/engine/enum.d.mts +5 -4
  42. package/build/schema/engine/enum.mjs +6 -6
  43. package/build/schema/engine/exclusiveMaximum.d.mts +5 -4
  44. package/build/schema/engine/exclusiveMaximum.mjs +4 -4
  45. package/build/schema/engine/exclusiveMinimum.d.mts +5 -4
  46. package/build/schema/engine/exclusiveMinimum.mjs +4 -4
  47. package/build/schema/engine/format.d.mts +5 -4
  48. package/build/schema/engine/format.mjs +5 -5
  49. package/build/schema/engine/if.d.mts +5 -4
  50. package/build/schema/engine/if.mjs +19 -19
  51. package/build/schema/engine/index.d.mts +12 -11
  52. package/build/schema/engine/index.mjs +13 -12
  53. package/build/schema/engine/items.d.mts +5 -4
  54. package/build/schema/engine/items.mjs +22 -22
  55. package/build/schema/engine/maxContains.d.mts +5 -4
  56. package/build/schema/engine/maxContains.mjs +11 -9
  57. package/build/schema/engine/maxItems.d.mts +5 -4
  58. package/build/schema/engine/maxItems.mjs +4 -4
  59. package/build/schema/engine/maxLength.d.mts +5 -4
  60. package/build/schema/engine/maxLength.mjs +4 -4
  61. package/build/schema/engine/maxProperties.d.mts +5 -4
  62. package/build/schema/engine/maxProperties.mjs +4 -4
  63. package/build/schema/engine/maximum.d.mts +5 -4
  64. package/build/schema/engine/maximum.mjs +4 -4
  65. package/build/schema/engine/minContains.d.mts +5 -4
  66. package/build/schema/engine/minContains.mjs +10 -8
  67. package/build/schema/engine/minItems.d.mts +5 -4
  68. package/build/schema/engine/minItems.mjs +4 -4
  69. package/build/schema/engine/minLength.d.mts +5 -4
  70. package/build/schema/engine/minLength.mjs +4 -4
  71. package/build/schema/engine/minProperties.d.mts +5 -4
  72. package/build/schema/engine/minProperties.mjs +4 -4
  73. package/build/schema/engine/minimum.d.mts +5 -4
  74. package/build/schema/engine/minimum.mjs +4 -4
  75. package/build/schema/engine/multipleOf.d.mts +5 -4
  76. package/build/schema/engine/multipleOf.mjs +4 -4
  77. package/build/schema/engine/not.d.mts +5 -4
  78. package/build/schema/engine/not.mjs +14 -13
  79. package/build/schema/engine/oneOf.d.mts +5 -4
  80. package/build/schema/engine/oneOf.mjs +14 -14
  81. package/build/schema/engine/pattern.d.mts +5 -4
  82. package/build/schema/engine/pattern.mjs +6 -6
  83. package/build/schema/engine/patternProperties.d.mts +5 -4
  84. package/build/schema/engine/patternProperties.mjs +14 -12
  85. package/build/schema/engine/prefixItems.d.mts +5 -4
  86. package/build/schema/engine/prefixItems.mjs +6 -6
  87. package/build/schema/engine/properties.d.mts +5 -4
  88. package/build/schema/engine/properties.mjs +10 -10
  89. package/build/schema/engine/propertyNames.d.mts +5 -4
  90. package/build/schema/engine/propertyNames.mjs +11 -9
  91. package/build/schema/engine/recursiveRef.d.mts +5 -4
  92. package/build/schema/engine/recursiveRef.mjs +11 -22
  93. package/build/schema/engine/ref.d.mts +5 -4
  94. package/build/schema/engine/ref.mjs +44 -29
  95. package/build/schema/engine/required.d.mts +5 -4
  96. package/build/schema/engine/required.mjs +3 -3
  97. package/build/schema/engine/schema.d.mts +5 -4
  98. package/build/schema/engine/schema.mjs +216 -207
  99. package/build/schema/engine/type.d.mts +5 -4
  100. package/build/schema/engine/type.mjs +12 -12
  101. package/build/schema/engine/unevaluatedItems.d.mts +5 -4
  102. package/build/schema/engine/unevaluatedItems.mjs +15 -13
  103. package/build/schema/engine/unevaluatedProperties.d.mts +5 -4
  104. package/build/schema/engine/unevaluatedProperties.mjs +15 -13
  105. package/build/schema/engine/uniqueItems.d.mts +5 -4
  106. package/build/schema/engine/uniqueItems.mjs +3 -3
  107. package/build/schema/errors.d.mts +3 -3
  108. package/build/schema/errors.mjs +4 -4
  109. package/build/schema/resolve/index.d.mts +1 -0
  110. package/build/schema/resolve/index.mjs +1 -0
  111. package/build/schema/resolve/ref.d.mts +2 -0
  112. package/build/schema/{resolver → resolve}/ref.mjs +43 -45
  113. package/build/schema/resolve/resolve.d.mts +1 -0
  114. package/build/schema/resolve/resolve.mjs +1 -0
  115. package/build/schema/schema.d.mts +1 -1
  116. package/build/schema/schema.mjs +1 -1
  117. package/build/schema/types/recursiveAnchor.d.mts +4 -0
  118. package/build/schema/types/recursiveAnchor.mjs +7 -0
  119. package/build/type/types/_codec.d.mts +1 -1
  120. package/build/type/types/_codec.mjs +1 -0
  121. package/build/type/types/static.d.mts +4 -4
  122. package/package.json +1 -1
  123. package/readme.md +1 -76
  124. package/build/schema/resolver/index.d.mts +0 -1
  125. package/build/schema/resolver/index.mjs +0 -1
  126. package/build/schema/resolver/recursiveRef.d.mts +0 -2
  127. package/build/schema/resolver/recursiveRef.mjs +0 -47
  128. package/build/schema/resolver/ref.d.mts +0 -1
  129. package/build/schema/resolver/resolver.d.mts +0 -2
  130. package/build/schema/resolver/resolver.mjs +0 -2
@@ -1,5 +1,6 @@
1
- import * as S from '../types/index.mjs';
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: S.XPropertyNames, value: string): string;
4
- export declare function CheckPropertyNames(context: CheckContext, schema: S.XPropertyNames, value: Record<PropertyKey, unknown>): boolean;
5
- export declare function ErrorPropertyNames(context: ErrorContext, schemaPath: string, instancePath: string, schema: S.XPropertyNames, value: Record<PropertyKey, unknown>): boolean;
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 { EmitGuard as E, Guard as G } from '../../guard/index.mjs';
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
- return E.Call(E.Member(E.Keys(value), 'every'), [E.ArrowFunction(['key'], BuildSchema(context, schema.propertyNames, 'key'))]);
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(context.GetContext(), context.GetSchema());
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 S from '../types/index.mjs';
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: S.XRecursiveRef, value: string): string;
4
- export declare function CheckRecursiveRef(context: CheckContext, schema: S.XRecursiveRef, value: unknown): boolean;
5
- export declare function ErrorRecursiveRef(context: ErrorContext, schemaPath: string, instancePath: string, schema: S.XRecursiveRef, value: unknown): boolean;
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 F from './_functions.mjs';
3
- import * as S from '../types/index.mjs';
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 = Resolve(context, schema);
21
- return F.CreateFunction(context, target, value);
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 = Resolve(context, schema);
28
- return (S.IsSchema(target) && CheckSchema(context, target, value));
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 = Resolve(context, schema);
35
- return (S.IsSchema(target) && ErrorSchema(context, '#', instancePath, target, value));
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 S from '../types/index.mjs';
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: S.XRef, value: string): string;
4
- export declare function CheckRef(context: CheckContext, schema: S.XRef, value: unknown): boolean;
5
- export declare function ErrorRef(context: ErrorContext, schemaPath: string, instancePath: string, schema: S.XRef, value: unknown): boolean;
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 F from './_functions.mjs';
3
- import * as S from '../types/index.mjs';
4
- import { Guard as G } from '../../guard/index.mjs';
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
- import { Resolver } from '../resolver/index.mjs';
7
- // ------------------------------------------------------------------
8
- // Resolve
9
- // ------------------------------------------------------------------
10
- function Resolve(context, schema) {
11
- // note: it is safe to coerce to XSchema here as it wouldn't be possible
12
- // to enter a ref resolution if the root schema was boolean.
13
- const schemaRoot = context.GetSchema();
14
- // contextual schema
15
- const schemaContext = context.GetContext();
16
- if (G.HasPropertyKey(schemaContext, schema.$ref)) {
17
- return schemaContext[schema.$ref];
18
- }
19
- // referential schema
20
- const dereferenced = Resolver.Ref(schemaRoot, schema.$ref);
21
- return S.IsSchema(dereferenced) ? dereferenced : false;
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
- // Build
27
+ // BuildRef
25
28
  // ------------------------------------------------------------------
26
- export function BuildRef(context, schema, value) {
27
- const target = Resolve(context, schema);
28
- return F.CreateFunction(context, target, value);
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 = Resolve(context, schema);
35
- return (S.IsSchema(target) && CheckSchema(context, target, value));
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 = Resolve(context, schema);
42
- return (S.IsSchema(target) && ErrorSchema(context, '#', instancePath, target, value));
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 S from '../types/index.mjs';
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: S.XRequired, value: string): string;
4
- export declare function CheckRequired(context: CheckContext, schema: S.XRequired, value: Record<PropertyKey, unknown>): boolean;
5
- export declare function ErrorRequired(context: ErrorContext, schemaPath: string, instancePath: string, schema: S.XRequired, value: Record<PropertyKey, unknown>): boolean;
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 S from '../types/index.mjs';
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: S.XSchema, value: string): string;
4
- export declare function CheckSchema(context: CheckContext, schema: S.XSchema, value: unknown): boolean;
5
- export declare function ErrorSchema(context: ErrorContext, schemaPath: string, instancePath: string, schema: S.XSchema, value: unknown): boolean;
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;