typebox 1.0.36 → 1.0.37

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 (126) hide show
  1. package/build/schema/build.d.mts +6 -6
  2. package/build/schema/check.d.mts +3 -3
  3. package/build/schema/deref/deref.d.mts +1 -1
  4. package/build/schema/deref/deref.mjs +2 -2
  5. package/build/schema/engine/_context.d.mts +7 -7
  6. package/build/schema/engine/_functions.d.mts +1 -1
  7. package/build/schema/engine/_reducer.d.mts +1 -1
  8. package/build/schema/engine/ref.mjs +3 -3
  9. package/build/schema/engine/schema.d.mts +3 -3
  10. package/build/schema/engine/schema.mjs +4 -4
  11. package/build/schema/errors.d.mts +3 -3
  12. package/build/schema/schema.d.mts +1 -0
  13. package/build/schema/schema.mjs +1 -0
  14. package/build/schema/static/additionalProperties.d.mts +7 -0
  15. package/build/schema/static/allOf.d.mts +3 -0
  16. package/build/schema/static/allOf.mjs +2 -0
  17. package/build/schema/static/anyOf.d.mts +3 -0
  18. package/build/schema/static/anyOf.mjs +2 -0
  19. package/build/schema/static/const.d.mts +1 -0
  20. package/build/schema/static/const.mjs +2 -0
  21. package/build/schema/static/enum.d.mts +1 -0
  22. package/build/schema/static/enum.mjs +2 -0
  23. package/build/schema/static/index.d.mts +1 -0
  24. package/build/schema/static/index.mjs +1 -0
  25. package/build/schema/static/items.d.mts +6 -0
  26. package/build/schema/static/items.mjs +2 -0
  27. package/build/schema/static/oneOf.d.mts +3 -0
  28. package/build/schema/static/oneOf.mjs +2 -0
  29. package/build/schema/static/patternProperties.d.mts +7 -0
  30. package/build/schema/static/patternProperties.mjs +2 -0
  31. package/build/schema/static/prefixItems.d.mts +3 -0
  32. package/build/schema/static/prefixItems.mjs +2 -0
  33. package/build/schema/static/properties.d.mts +11 -0
  34. package/build/schema/static/properties.mjs +2 -0
  35. package/build/schema/static/required.d.mts +13 -0
  36. package/build/schema/static/required.mjs +2 -0
  37. package/build/schema/static/schema.d.mts +48 -0
  38. package/build/schema/static/schema.mjs +2 -0
  39. package/build/schema/static/static.d.mts +5 -0
  40. package/build/schema/static/static.mjs +2 -0
  41. package/build/schema/static/type.d.mts +4 -0
  42. package/build/schema/static/type.mjs +2 -0
  43. package/build/schema/static/unevaluatedProperties.d.mts +7 -0
  44. package/build/schema/static/unevaluatedProperties.mjs +2 -0
  45. package/build/schema/static/~mutable.d.mts +7 -0
  46. package/build/schema/static/~mutable.mjs +2 -0
  47. package/build/schema/static/~readonly.d.mts +6 -0
  48. package/build/schema/static/~readonly.mjs +2 -0
  49. package/build/schema/types/_guard.d.mts +2 -2
  50. package/build/schema/types/_refine.d.mts +2 -2
  51. package/build/schema/types/additionalItems.d.mts +3 -3
  52. package/build/schema/types/additionalItems.mjs +2 -2
  53. package/build/schema/types/additionalProperties.d.mts +3 -3
  54. package/build/schema/types/additionalProperties.mjs +2 -2
  55. package/build/schema/types/allOf.d.mts +3 -3
  56. package/build/schema/types/allOf.mjs +2 -2
  57. package/build/schema/types/anyOf.d.mts +3 -3
  58. package/build/schema/types/anyOf.mjs +2 -2
  59. package/build/schema/types/const.d.mts +2 -2
  60. package/build/schema/types/contains.d.mts +3 -3
  61. package/build/schema/types/contains.mjs +2 -2
  62. package/build/schema/types/contentEncoding.d.mts +2 -2
  63. package/build/schema/types/contentMediaType.d.mts +2 -2
  64. package/build/schema/types/default.d.mts +2 -2
  65. package/build/schema/types/defs.d.mts +3 -3
  66. package/build/schema/types/defs.mjs +2 -2
  67. package/build/schema/types/dependencies.d.mts +2 -2
  68. package/build/schema/types/dependencies.mjs +2 -2
  69. package/build/schema/types/dependentRequired.d.mts +2 -2
  70. package/build/schema/types/dependentSchemas.d.mts +3 -3
  71. package/build/schema/types/dependentSchemas.mjs +2 -2
  72. package/build/schema/types/else.d.mts +3 -3
  73. package/build/schema/types/else.mjs +2 -2
  74. package/build/schema/types/enum.d.mts +2 -2
  75. package/build/schema/types/exclusiveMaximum.d.mts +2 -2
  76. package/build/schema/types/exclusiveMinimum.d.mts +2 -2
  77. package/build/schema/types/format.d.mts +2 -2
  78. package/build/schema/types/id.d.mts +2 -2
  79. package/build/schema/types/if.d.mts +3 -3
  80. package/build/schema/types/if.mjs +2 -2
  81. package/build/schema/types/index.d.mts +0 -1
  82. package/build/schema/types/index.mjs +0 -1
  83. package/build/schema/types/items.d.mts +7 -7
  84. package/build/schema/types/items.mjs +3 -3
  85. package/build/schema/types/maxContains.d.mts +2 -2
  86. package/build/schema/types/maxItems.d.mts +2 -2
  87. package/build/schema/types/maxLength.d.mts +2 -2
  88. package/build/schema/types/maxProperties.d.mts +2 -2
  89. package/build/schema/types/maximum.d.mts +2 -2
  90. package/build/schema/types/minContains.d.mts +2 -2
  91. package/build/schema/types/minItems.d.mts +2 -2
  92. package/build/schema/types/minLength.d.mts +2 -2
  93. package/build/schema/types/minProperties.d.mts +2 -2
  94. package/build/schema/types/minimum.d.mts +2 -2
  95. package/build/schema/types/multipleOf.d.mts +2 -2
  96. package/build/schema/types/not.d.mts +3 -3
  97. package/build/schema/types/not.mjs +2 -2
  98. package/build/schema/types/oneOf.d.mts +3 -3
  99. package/build/schema/types/oneOf.mjs +2 -2
  100. package/build/schema/types/pattern.d.mts +2 -2
  101. package/build/schema/types/patternProperties.d.mts +3 -3
  102. package/build/schema/types/patternProperties.mjs +2 -2
  103. package/build/schema/types/prefixItems.d.mts +3 -3
  104. package/build/schema/types/prefixItems.mjs +2 -2
  105. package/build/schema/types/properties.d.mts +3 -3
  106. package/build/schema/types/properties.mjs +2 -2
  107. package/build/schema/types/propertyNames.d.mts +3 -3
  108. package/build/schema/types/propertyNames.mjs +2 -2
  109. package/build/schema/types/ref.d.mts +2 -2
  110. package/build/schema/types/required.d.mts +2 -2
  111. package/build/schema/types/schema.d.mts +4 -4
  112. package/build/schema/types/schema.mjs +3 -3
  113. package/build/schema/types/then.d.mts +3 -3
  114. package/build/schema/types/then.mjs +2 -2
  115. package/build/schema/types/type.d.mts +2 -2
  116. package/build/schema/types/unevaluatedItems.d.mts +4 -4
  117. package/build/schema/types/unevaluatedItems.mjs +2 -2
  118. package/build/schema/types/unevaluatedProperties.d.mts +3 -3
  119. package/build/schema/types/unevaluatedProperties.mjs +2 -2
  120. package/build/schema/types/uniqueItems.d.mts +2 -2
  121. package/build/type/types/base.d.mts +1 -7
  122. package/build/type/types/base.mjs +1 -15
  123. package/build/type/types/static.d.mts +3 -2
  124. package/package.json +27 -27
  125. package/build/schema/types/static.d.mts +0 -113
  126. /package/build/schema/{types/static.mjs → static/additionalProperties.mjs} +0 -0
@@ -1,6 +1,6 @@
1
1
  // deno-fmt-ignore-file
2
2
  import { Guard } from '../../guard/index.mjs';
3
- import { IsSchemaLike } from './schema.mjs';
3
+ import { IsSchema } from './schema.mjs';
4
4
  // ------------------------------------------------------------------
5
5
  // Guard
6
6
  // ------------------------------------------------------------------
@@ -11,5 +11,5 @@ import { IsSchemaLike } from './schema.mjs';
11
11
  export function IsAnyOf(schema) {
12
12
  return Guard.HasPropertyKey(schema, 'anyOf')
13
13
  && Guard.IsArray(schema.anyOf)
14
- && schema.anyOf.every(value => IsSchemaLike(value));
14
+ && schema.anyOf.every(value => IsSchema(value));
15
15
  }
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XConst<Const extends unknown = unknown> {
3
3
  const: Const;
4
4
  }
@@ -6,4 +6,4 @@ export interface XConst<Const extends unknown = unknown> {
6
6
  * Returns true if the schema contains a valid const property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsConst(value: XSchema): value is XConst;
9
+ export declare function IsConst(value: XSchemaObject): value is XConst;
@@ -1,9 +1,9 @@
1
- import { type XSchema, type XSchemaLike } from './schema.mjs';
2
- export interface XContains<Contains extends XSchemaLike = XSchemaLike> {
1
+ import { type XSchemaObject, type XSchema } from './schema.mjs';
2
+ export interface XContains<Contains extends XSchema = XSchema> {
3
3
  contains: Contains;
4
4
  }
5
5
  /**
6
6
  * Returns true if the schema contains a valid contains property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsContains(schema: XSchema): schema is XContains;
9
+ export declare function IsContains(schema: XSchemaObject): schema is XContains;
@@ -1,6 +1,6 @@
1
1
  // deno-fmt-ignore-file
2
2
  import { Guard } from '../../guard/index.mjs';
3
- import { IsSchemaLike } from './schema.mjs';
3
+ import { IsSchema } from './schema.mjs';
4
4
  // ------------------------------------------------------------------
5
5
  // Guard
6
6
  // ------------------------------------------------------------------
@@ -10,5 +10,5 @@ import { IsSchemaLike } from './schema.mjs';
10
10
  */
11
11
  export function IsContains(schema) {
12
12
  return Guard.HasPropertyKey(schema, 'contains')
13
- && IsSchemaLike(schema.contains);
13
+ && IsSchema(schema.contains);
14
14
  }
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XContentEncoding<ContentEncoding extends string = string> {
3
3
  contentEncoding: ContentEncoding;
4
4
  }
@@ -6,4 +6,4 @@ export interface XContentEncoding<ContentEncoding extends string = string> {
6
6
  * Returns true if the schema contains a valid contentEncoding property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsContentEncoding(schema: XSchema): schema is XContentEncoding;
9
+ export declare function IsContentEncoding(schema: XSchemaObject): schema is XContentEncoding;
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XContentMediaType<ContentMediaType extends string = string> {
3
3
  contentMediaType: ContentMediaType;
4
4
  }
@@ -6,4 +6,4 @@ export interface XContentMediaType<ContentMediaType extends string = string> {
6
6
  * Returns true if the schema contains a valid contentMediaType property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsContentMediaType(schema: XSchema): schema is XContentMediaType;
9
+ export declare function IsContentMediaType(schema: XSchemaObject): schema is XContentMediaType;
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XDefault<Default extends unknown = unknown> {
3
3
  default: Default;
4
4
  }
@@ -6,4 +6,4 @@ export interface XDefault<Default extends unknown = unknown> {
6
6
  * Returns true if the schema contains a valid contentMediaType property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsDefault(schema: XSchema): schema is XDefault;
9
+ export declare function IsDefault(schema: XSchemaObject): schema is XDefault;
@@ -1,6 +1,6 @@
1
- import { type XSchema, type XSchemaLike } from './schema.mjs';
2
- export interface XDefs<Defs extends Record<PropertyKey, XSchemaLike> = Record<PropertyKey, XSchemaLike>> {
1
+ import { type XSchemaObject, type XSchema } from './schema.mjs';
2
+ export interface XDefs<Defs extends Record<PropertyKey, XSchema> = Record<PropertyKey, XSchema>> {
3
3
  $defs: Defs;
4
4
  }
5
5
  /** Returns true if the schema contains a valid $defs property */
6
- export declare function IsDefs(schema: XSchema): schema is XDefs;
6
+ export declare function IsDefs(schema: XSchemaObject): schema is XDefs;
@@ -1,6 +1,6 @@
1
1
  // deno-fmt-ignore-file
2
2
  import { Guard } from '../../guard/index.mjs';
3
- import { IsSchemaLike } from './schema.mjs';
3
+ import { IsSchema } from './schema.mjs';
4
4
  // ------------------------------------------------------------------
5
5
  // Guard
6
6
  // ------------------------------------------------------------------
@@ -8,5 +8,5 @@ import { IsSchemaLike } from './schema.mjs';
8
8
  export function IsDefs(schema) {
9
9
  return Guard.HasPropertyKey(schema, '$defs')
10
10
  && Guard.IsObject(schema.$defs)
11
- && Object.values(schema.$defs).every(value => IsSchemaLike(value));
11
+ && Object.values(schema.$defs).every(value => IsSchema(value));
12
12
  }
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  type XDependenciesProperty = Record<PropertyKey, boolean | Record<PropertyKey, unknown> | string[]>;
3
3
  export interface XDependencies<Dependencies extends XDependenciesProperty = XDependenciesProperty> {
4
4
  dependencies: Dependencies;
@@ -7,5 +7,5 @@ export interface XDependencies<Dependencies extends XDependenciesProperty = XDep
7
7
  * Returns true if the schema contains a valid dependencies property
8
8
  * @specification Json Schema 7
9
9
  */
10
- export declare function IsDependencies(schema: XSchema): schema is XDependencies;
10
+ export declare function IsDependencies(schema: XSchemaObject): schema is XDependencies;
11
11
  export {};
@@ -1,6 +1,6 @@
1
1
  // deno-fmt-ignore-file
2
2
  import { Guard } from '../../guard/index.mjs';
3
- import { IsSchemaLike } from './schema.mjs';
3
+ import { IsSchema } from './schema.mjs';
4
4
  // ------------------------------------------------------------------
5
5
  // Guard
6
6
  // ------------------------------------------------------------------
@@ -11,6 +11,6 @@ import { IsSchemaLike } from './schema.mjs';
11
11
  export function IsDependencies(schema) {
12
12
  return Guard.HasPropertyKey(schema, 'dependencies')
13
13
  && Guard.IsObject(schema.dependencies)
14
- && Object.values(schema.dependencies).every(value => IsSchemaLike(value)
14
+ && Object.values(schema.dependencies).every(value => IsSchema(value)
15
15
  || Guard.IsArray(value) && value.every(value => Guard.IsString(value)));
16
16
  }
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XDependentRequired<DependentRequired extends Record<PropertyKey, string[]> = Record<PropertyKey, string[]>> {
3
3
  dependentRequired: DependentRequired;
4
4
  }
@@ -6,4 +6,4 @@ export interface XDependentRequired<DependentRequired extends Record<PropertyKey
6
6
  * Returns true if the schema contains a valid dependentRequired property
7
7
  * @specification Json Schema 2019-09
8
8
  */
9
- export declare function IsDependentRequired(schema: XSchema): schema is XDependentRequired;
9
+ export declare function IsDependentRequired(schema: XSchemaObject): schema is XDependentRequired;
@@ -1,9 +1,9 @@
1
- import { type XSchema, type XSchemaLike } from './schema.mjs';
2
- export interface XDependentSchemas<DependentSchemas extends Record<PropertyKey, XSchemaLike> = Record<PropertyKey, XSchemaLike>> {
1
+ import { type XSchemaObject, type XSchema } from './schema.mjs';
2
+ export interface XDependentSchemas<DependentSchemas extends Record<PropertyKey, XSchema> = Record<PropertyKey, XSchema>> {
3
3
  dependentSchemas: DependentSchemas;
4
4
  }
5
5
  /**
6
6
  * Returns true if the schema contains a valid dependentRequired property
7
7
  * @specification Json Schema 2019-09
8
8
  */
9
- export declare function IsDependentSchemas(schema: XSchema): schema is XDependentSchemas;
9
+ export declare function IsDependentSchemas(schema: XSchemaObject): schema is XDependentSchemas;
@@ -1,6 +1,6 @@
1
1
  // deno-fmt-ignore-file
2
2
  import { Guard } from '../../guard/index.mjs';
3
- import { IsSchemaLike } from './schema.mjs';
3
+ import { IsSchema } from './schema.mjs';
4
4
  // ------------------------------------------------------------------
5
5
  // Guard
6
6
  // ------------------------------------------------------------------
@@ -11,5 +11,5 @@ import { IsSchemaLike } from './schema.mjs';
11
11
  export function IsDependentSchemas(schema) {
12
12
  return Guard.HasPropertyKey(schema, 'dependentSchemas')
13
13
  && Guard.IsObject(schema.dependentSchemas)
14
- && Object.values(schema.dependentSchemas).every(value => IsSchemaLike(value));
14
+ && Object.values(schema.dependentSchemas).every(value => IsSchema(value));
15
15
  }
@@ -1,9 +1,9 @@
1
- import { type XSchema, type XSchemaLike } from './schema.mjs';
2
- export interface XElse<Else extends XSchemaLike = XSchemaLike> {
1
+ import { type XSchemaObject, type XSchema } from './schema.mjs';
2
+ export interface XElse<Else extends XSchema = XSchema> {
3
3
  else: Else;
4
4
  }
5
5
  /**
6
6
  * Returns true if the schema contains a valid else property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsElse(schema: XSchema): schema is XElse;
9
+ export declare function IsElse(schema: XSchemaObject): schema is XElse;
@@ -1,6 +1,6 @@
1
1
  // deno-fmt-ignore-file
2
2
  import { Guard } from '../../guard/index.mjs';
3
- import { IsSchemaLike } from './schema.mjs';
3
+ import { IsSchema } from './schema.mjs';
4
4
  // ------------------------------------------------------------------
5
5
  // Guard
6
6
  // ------------------------------------------------------------------
@@ -10,5 +10,5 @@ import { IsSchemaLike } from './schema.mjs';
10
10
  */
11
11
  export function IsElse(schema) {
12
12
  return Guard.HasPropertyKey(schema, 'else')
13
- && IsSchemaLike(schema.else);
13
+ && IsSchema(schema.else);
14
14
  }
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XEnum<Enum extends unknown[] = unknown[]> {
3
3
  enum: Enum;
4
4
  }
@@ -6,4 +6,4 @@ export interface XEnum<Enum extends unknown[] = unknown[]> {
6
6
  * Returns true if the schema contains a valid enum property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsEnum(schema: XSchema): schema is XEnum;
9
+ export declare function IsEnum(schema: XSchemaObject): schema is XEnum;
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XExclusiveMaximum<ExclusiveMaximum extends number | bigint = number | bigint> {
3
3
  exclusiveMaximum: ExclusiveMaximum;
4
4
  }
@@ -6,4 +6,4 @@ export interface XExclusiveMaximum<ExclusiveMaximum extends number | bigint = nu
6
6
  * Returns true if the schema contains a valid exclusiveMaximum property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsExclusiveMaximum(schema: XSchema): schema is XExclusiveMaximum;
9
+ export declare function IsExclusiveMaximum(schema: XSchemaObject): schema is XExclusiveMaximum;
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XExclusiveMinimum<ExclusiveMinimum extends number | bigint = number | bigint> {
3
3
  exclusiveMinimum: ExclusiveMinimum;
4
4
  }
@@ -6,4 +6,4 @@ export interface XExclusiveMinimum<ExclusiveMinimum extends number | bigint = nu
6
6
  * Returns true if the schema contains a valid exclusiveMinimum property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsExclusiveMinimum(schema: XSchema): schema is XExclusiveMinimum;
9
+ export declare function IsExclusiveMinimum(schema: XSchemaObject): schema is XExclusiveMinimum;
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XFormat<Format extends string = string> {
3
3
  format: Format;
4
4
  }
@@ -6,4 +6,4 @@ export interface XFormat<Format extends string = string> {
6
6
  * Returns true if the schema contains a valid format property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsFormat(schema: XSchema): schema is XFormat;
9
+ export declare function IsFormat(schema: XSchemaObject): schema is XFormat;
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XId<Id extends string = string> {
3
3
  $id: Id;
4
4
  }
@@ -6,4 +6,4 @@ export interface XId<Id extends string = string> {
6
6
  * Returns true if the schema contains a valid $id property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsId(schema: XSchema): schema is XId;
9
+ export declare function IsId(schema: XSchemaObject): schema is XId;
@@ -1,9 +1,9 @@
1
- import { type XSchema, type XSchemaLike } from './schema.mjs';
2
- export interface XIf<If extends XSchemaLike = XSchemaLike> {
1
+ import { type XSchemaObject, type XSchema } from './schema.mjs';
2
+ export interface XIf<If extends XSchema = XSchema> {
3
3
  if: If;
4
4
  }
5
5
  /**
6
6
  * Returns true if the schema contains a valid $id property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsIf(schema: XSchema): schema is XIf;
9
+ export declare function IsIf(schema: XSchemaObject): schema is XIf;
@@ -1,6 +1,6 @@
1
1
  // deno-fmt-ignore-file
2
2
  import { Guard } from '../../guard/index.mjs';
3
- import { IsSchemaLike } from './schema.mjs';
3
+ import { IsSchema } from './schema.mjs';
4
4
  // ------------------------------------------------------------------
5
5
  // Guard
6
6
  // ------------------------------------------------------------------
@@ -10,5 +10,5 @@ import { IsSchemaLike } from './schema.mjs';
10
10
  */
11
11
  export function IsIf(schema) {
12
12
  return Guard.HasPropertyKey(schema, 'if')
13
- && IsSchemaLike(schema.if);
13
+ && IsSchema(schema.if);
14
14
  }
@@ -38,7 +38,6 @@ export * from './propertyNames.mjs';
38
38
  export * from './ref.mjs';
39
39
  export * from './required.mjs';
40
40
  export * from './schema.mjs';
41
- export * from './static.mjs';
42
41
  export * from './then.mjs';
43
42
  export * from './type.mjs';
44
43
  export * from './uniqueItems.mjs';
@@ -44,7 +44,6 @@ export * from './propertyNames.mjs';
44
44
  export * from './ref.mjs';
45
45
  export * from './required.mjs';
46
46
  export * from './schema.mjs';
47
- export * from './static.mjs';
48
47
  export * from './then.mjs';
49
48
  export * from './type.mjs';
50
49
  export * from './uniqueItems.mjs';
@@ -1,19 +1,19 @@
1
- import { type XSchema, type XSchemaLike } from './schema.mjs';
2
- export interface XItemsSized<Items extends XSchemaLike[] = XSchemaLike[]> {
1
+ import { type XSchemaObject, type XSchema } from './schema.mjs';
2
+ export interface XItemsSized<Items extends XSchema[] = XSchema[]> {
3
3
  items: Items;
4
4
  }
5
- export interface XItemsUnsized<Items extends XSchemaLike = XSchemaLike> {
5
+ export interface XItemsUnsized<Items extends XSchema = XSchema> {
6
6
  items: Items;
7
7
  }
8
- export interface XItems<Items extends (XSchemaLike | XSchemaLike[]) = (XSchemaLike | XSchemaLike[])> {
8
+ export interface XItems<Items extends (XSchema | XSchema[]) = (XSchema | XSchema[])> {
9
9
  items: Items;
10
10
  }
11
11
  /**
12
12
  * Returns true if the schema contains a valid items property
13
13
  * @specification Json Schema 7
14
14
  */
15
- export declare function IsItems(schema: XSchema): schema is XItems;
15
+ export declare function IsItems(schema: XSchemaObject): schema is XItems;
16
16
  /** Returns true if this schema is a sized items variant */
17
- export declare function IsItemsSized(schema: XSchema): schema is XItemsSized;
17
+ export declare function IsItemsSized(schema: XSchemaObject): schema is XItemsSized;
18
18
  /** Returns true if this schema is a unsized items variant */
19
- export declare function IsItemsUnsized(schema: XSchema): schema is XItemsUnsized;
19
+ export declare function IsItemsUnsized(schema: XSchemaObject): schema is XItemsUnsized;
@@ -1,6 +1,6 @@
1
1
  // deno-fmt-ignore-file
2
2
  import { Guard } from '../../guard/index.mjs';
3
- import { IsSchemaLike } from './schema.mjs';
3
+ import { IsSchema } from './schema.mjs';
4
4
  // ------------------------------------------------------------------
5
5
  // Guard
6
6
  // ------------------------------------------------------------------
@@ -10,10 +10,10 @@ import { IsSchemaLike } from './schema.mjs';
10
10
  */
11
11
  export function IsItems(schema) {
12
12
  return Guard.HasPropertyKey(schema, 'items')
13
- && (IsSchemaLike(schema.items)
13
+ && (IsSchema(schema.items)
14
14
  || (Guard.IsArray(schema.items)
15
15
  && schema.items.every(value => {
16
- return IsSchemaLike(value);
16
+ return IsSchema(value);
17
17
  })));
18
18
  }
19
19
  /** Returns true if this schema is a sized items variant */
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XMaxContains<MaxContains extends number = number> {
3
3
  maxContains: MaxContains;
4
4
  }
@@ -6,4 +6,4 @@ export interface XMaxContains<MaxContains extends number = number> {
6
6
  * Returns true if the schema contains a valid maxContains property
7
7
  * @specification Json Schema 2019-09
8
8
  */
9
- export declare function IsMaxContains(schema: XSchema): schema is XMaxContains;
9
+ export declare function IsMaxContains(schema: XSchemaObject): schema is XMaxContains;
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XMaxItems<MaxItems extends number = number> {
3
3
  maxItems: MaxItems;
4
4
  }
@@ -6,4 +6,4 @@ export interface XMaxItems<MaxItems extends number = number> {
6
6
  * Returns true if the schema contains a valid maxItems property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsMaxItems(schema: XSchema): schema is XMaxItems;
9
+ export declare function IsMaxItems(schema: XSchemaObject): schema is XMaxItems;
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XMaxLength<MaxLength extends number = number> {
3
3
  maxLength: MaxLength;
4
4
  }
@@ -6,4 +6,4 @@ export interface XMaxLength<MaxLength extends number = number> {
6
6
  * Returns true if the schema contains a valid maxLength property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsMaxLength(schema: XSchema): schema is XMaxLength;
9
+ export declare function IsMaxLength(schema: XSchemaObject): schema is XMaxLength;
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XMaxProperties<MaxProperties extends number = number> {
3
3
  maxProperties: MaxProperties;
4
4
  }
@@ -6,4 +6,4 @@ export interface XMaxProperties<MaxProperties extends number = number> {
6
6
  * Returns true if the schema contains a valid maxProperties property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsMaxProperties(schema: XSchema): schema is XMaxProperties;
9
+ export declare function IsMaxProperties(schema: XSchemaObject): schema is XMaxProperties;
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XMaximum<Maximum extends number | bigint = number | bigint> {
3
3
  maximum: Maximum;
4
4
  }
@@ -6,4 +6,4 @@ export interface XMaximum<Maximum extends number | bigint = number | bigint> {
6
6
  * Returns true if the schema contains a valid maximum property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsMaximum(schema: XSchema): schema is XMaximum;
9
+ export declare function IsMaximum(schema: XSchemaObject): schema is XMaximum;
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XMinContains<MinContains extends number = number> {
3
3
  minContains: MinContains;
4
4
  }
@@ -6,4 +6,4 @@ export interface XMinContains<MinContains extends number = number> {
6
6
  * Returns true if the schema contains a valid maxContains property
7
7
  * @specification Json Schema 2019-09
8
8
  */
9
- export declare function IsMinContains(schema: XSchema): schema is XMinContains;
9
+ export declare function IsMinContains(schema: XSchemaObject): schema is XMinContains;
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XMinItems<MinItems extends number = number> {
3
3
  minItems: MinItems;
4
4
  }
@@ -6,4 +6,4 @@ export interface XMinItems<MinItems extends number = number> {
6
6
  * Returns true if the schema contains a valid minItems property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsMinItems(schema: XSchema): schema is XMinItems;
9
+ export declare function IsMinItems(schema: XSchemaObject): schema is XMinItems;
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XMinLength<MinLength extends number = number> {
3
3
  minLength: MinLength;
4
4
  }
@@ -6,4 +6,4 @@ export interface XMinLength<MinLength extends number = number> {
6
6
  * Returns true if the schema contains a valid minLength property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsMinLength(schema: XSchema): schema is XMinLength;
9
+ export declare function IsMinLength(schema: XSchemaObject): schema is XMinLength;
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XMinProperties<MinProperties extends number = number> {
3
3
  minProperties: MinProperties;
4
4
  }
@@ -6,4 +6,4 @@ export interface XMinProperties<MinProperties extends number = number> {
6
6
  * Returns true if the schema contains a valid minProperties property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsMinProperties(schema: XSchema): schema is XMinProperties;
9
+ export declare function IsMinProperties(schema: XSchemaObject): schema is XMinProperties;
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XMinimum<Minimum extends number | bigint = number | bigint> {
3
3
  minimum: Minimum;
4
4
  }
@@ -6,4 +6,4 @@ export interface XMinimum<Minimum extends number | bigint = number | bigint> {
6
6
  * Returns true if the schema contains a valid minimum property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsMinimum(schema: XSchema): schema is XMinimum;
9
+ export declare function IsMinimum(schema: XSchemaObject): schema is XMinimum;
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XMultipleOf<MultipleOf extends number | bigint = number | bigint> {
3
3
  multipleOf: MultipleOf;
4
4
  }
@@ -6,4 +6,4 @@ export interface XMultipleOf<MultipleOf extends number | bigint = number | bigin
6
6
  * Returns true if the schema contains a valid multipleOf property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsMultipleOf(schema: XSchema): schema is XMultipleOf;
9
+ export declare function IsMultipleOf(schema: XSchemaObject): schema is XMultipleOf;
@@ -1,9 +1,9 @@
1
- import { type XSchema, type XSchemaLike } from './schema.mjs';
2
- export interface XNot<Not extends XSchemaLike = XSchemaLike> {
1
+ import { type XSchemaObject, type XSchema } from './schema.mjs';
2
+ export interface XNot<Not extends XSchema = XSchema> {
3
3
  not: Not;
4
4
  }
5
5
  /**
6
6
  * Returns true if the schema contains a valid not property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsNot(schema: XSchema): schema is XNot;
9
+ export declare function IsNot(schema: XSchemaObject): schema is XNot;
@@ -1,6 +1,6 @@
1
1
  // deno-fmt-ignore-file
2
2
  import { Guard } from '../../guard/index.mjs';
3
- import { IsSchemaLike } from './schema.mjs';
3
+ import { IsSchema } from './schema.mjs';
4
4
  // ------------------------------------------------------------------
5
5
  // Guard
6
6
  // ------------------------------------------------------------------
@@ -10,5 +10,5 @@ import { IsSchemaLike } from './schema.mjs';
10
10
  */
11
11
  export function IsNot(schema) {
12
12
  return Guard.HasPropertyKey(schema, 'not')
13
- && IsSchemaLike(schema.not);
13
+ && IsSchema(schema.not);
14
14
  }
@@ -1,9 +1,9 @@
1
- import { type XSchema, type XSchemaLike } from './schema.mjs';
2
- export interface XOneOf<OneOf extends XSchemaLike[] = XSchemaLike[]> {
1
+ import { type XSchemaObject, type XSchema } from './schema.mjs';
2
+ export interface XOneOf<OneOf extends XSchema[] = XSchema[]> {
3
3
  oneOf: OneOf;
4
4
  }
5
5
  /**
6
6
  * Returns true if the schema contains a valid oneOf property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsOneOf(schema: XSchema): schema is XOneOf;
9
+ export declare function IsOneOf(schema: XSchemaObject): schema is XOneOf;
@@ -1,6 +1,6 @@
1
1
  // deno-fmt-ignore-file
2
2
  import { Guard } from '../../guard/index.mjs';
3
- import { IsSchemaLike } from './schema.mjs';
3
+ import { IsSchema } from './schema.mjs';
4
4
  // ------------------------------------------------------------------
5
5
  // Guard
6
6
  // ------------------------------------------------------------------
@@ -11,5 +11,5 @@ import { IsSchemaLike } from './schema.mjs';
11
11
  export function IsOneOf(schema) {
12
12
  return Guard.HasPropertyKey(schema, 'oneOf')
13
13
  && Guard.IsArray(schema.oneOf)
14
- && schema.oneOf.every(value => IsSchemaLike(value));
14
+ && schema.oneOf.every(value => IsSchema(value));
15
15
  }
@@ -1,4 +1,4 @@
1
- import { type XSchema } from './schema.mjs';
1
+ import { type XSchemaObject } from './schema.mjs';
2
2
  export interface XPattern<Pattern extends string | RegExp = string | RegExp> {
3
3
  pattern: Pattern;
4
4
  }
@@ -6,4 +6,4 @@ export interface XPattern<Pattern extends string | RegExp = string | RegExp> {
6
6
  * Returns true if the schema contains a valid pattern property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsPattern(schema: XSchema): schema is XPattern;
9
+ export declare function IsPattern(schema: XSchemaObject): schema is XPattern;
@@ -1,9 +1,9 @@
1
- import { type XSchema, type XSchemaLike } from './schema.mjs';
2
- export interface XPatternProperties<PatternProperties extends Record<PropertyKey, XSchemaLike> = Record<PropertyKey, XSchemaLike>> {
1
+ import { type XSchemaObject, type XSchema } from './schema.mjs';
2
+ export interface XPatternProperties<PatternProperties extends Record<PropertyKey, XSchema> = Record<PropertyKey, XSchema>> {
3
3
  patternProperties: PatternProperties;
4
4
  }
5
5
  /**
6
6
  * Returns true if the schema contains a valid patternProperties property
7
7
  * @specification Json Schema 7
8
8
  */
9
- export declare function IsPatternProperties(schema: XSchema): schema is XPatternProperties;
9
+ export declare function IsPatternProperties(schema: XSchemaObject): schema is XPatternProperties;