typebox 1.0.38 → 1.0.39
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/types/anchor.d.mts +8 -0
- package/build/schema/types/anchor.mjs +12 -0
- package/build/schema/types/dynamicAnchor.d.mts +8 -0
- package/build/schema/types/dynamicAnchor.mjs +12 -0
- package/build/schema/types/dynamicRef.d.mts +8 -0
- package/build/schema/types/dynamicRef.mjs +12 -0
- package/build/schema/types/index.d.mts +9 -6
- package/build/schema/types/index.mjs +9 -6
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type XSchemaObject } from './schema.mjs';
|
|
2
|
+
export interface XAnchor<Anchor extends string = string> {
|
|
3
|
+
$anchor: Anchor;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Returns true if the schema contains a valid $anchor property
|
|
7
|
+
*/
|
|
8
|
+
export declare function IsAnchor(schema: XSchemaObject): schema is XAnchor;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// deno-fmt-ignore-file
|
|
2
|
+
import { Guard } from '../../guard/index.mjs';
|
|
3
|
+
// ------------------------------------------------------------------
|
|
4
|
+
// Guard
|
|
5
|
+
// ------------------------------------------------------------------
|
|
6
|
+
/**
|
|
7
|
+
* Returns true if the schema contains a valid $anchor property
|
|
8
|
+
*/
|
|
9
|
+
export function IsAnchor(schema) {
|
|
10
|
+
return Guard.HasPropertyKey(schema, '$anchor')
|
|
11
|
+
&& Guard.IsString(schema.$anchor);
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type XSchemaObject } from './schema.mjs';
|
|
2
|
+
export interface XDynamicAnchor<Anchor extends string = string> {
|
|
3
|
+
$dynamicAnchor: Anchor;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Returns true if the schema contains a valid $dynamicAnchor property
|
|
7
|
+
*/
|
|
8
|
+
export declare function IsDynamicAnchor(schema: XSchemaObject): schema is XDynamicAnchor;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// deno-fmt-ignore-file
|
|
2
|
+
import { Guard } from '../../guard/index.mjs';
|
|
3
|
+
// ------------------------------------------------------------------
|
|
4
|
+
// Guard
|
|
5
|
+
// ------------------------------------------------------------------
|
|
6
|
+
/**
|
|
7
|
+
* Returns true if the schema contains a valid $dynamicAnchor property
|
|
8
|
+
*/
|
|
9
|
+
export function IsDynamicAnchor(schema) {
|
|
10
|
+
return Guard.HasPropertyKey(schema, '$dynamicAnchor')
|
|
11
|
+
&& Guard.IsString(schema.$dynamicAnchor);
|
|
12
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type XSchemaObject } from './schema.mjs';
|
|
2
|
+
export interface XDynamicRef<Ref extends string = string> {
|
|
3
|
+
$dynamicRef: Ref;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Returns true if the schema contains a valid $dynamicRef property
|
|
7
|
+
*/
|
|
8
|
+
export declare function IsDynamicRef(schema: XSchemaObject): schema is XDynamicRef;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// deno-fmt-ignore-file
|
|
2
|
+
import { Guard } from '../../guard/index.mjs';
|
|
3
|
+
// ------------------------------------------------------------------
|
|
4
|
+
// Guard
|
|
5
|
+
// ------------------------------------------------------------------
|
|
6
|
+
/**
|
|
7
|
+
* Returns true if the schema contains a valid $dynamicRef property
|
|
8
|
+
*/
|
|
9
|
+
export function IsDynamicRef(schema) {
|
|
10
|
+
return Guard.HasPropertyKey(schema, '$dynamicRef')
|
|
11
|
+
&& Guard.IsString(schema.$dynamicRef);
|
|
12
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export * from './_guard.mjs';
|
|
2
2
|
export * from './_refine.mjs';
|
|
3
|
-
export * from './additionalProperties.mjs';
|
|
4
3
|
export * from './additionalItems.mjs';
|
|
4
|
+
export * from './additionalProperties.mjs';
|
|
5
5
|
export * from './allOf.mjs';
|
|
6
|
+
export * from './anchor.mjs';
|
|
6
7
|
export * from './anyOf.mjs';
|
|
7
8
|
export * from './const.mjs';
|
|
8
9
|
export * from './contains.mjs';
|
|
@@ -11,6 +12,10 @@ export * from './contentMediaType.mjs';
|
|
|
11
12
|
export * from './default.mjs';
|
|
12
13
|
export * from './defs.mjs';
|
|
13
14
|
export * from './dependencies.mjs';
|
|
15
|
+
export * from './dependentRequired.mjs';
|
|
16
|
+
export * from './dependentSchemas.mjs';
|
|
17
|
+
export * from './dynamicAnchor.mjs';
|
|
18
|
+
export * from './dynamicRef.mjs';
|
|
14
19
|
export * from './else.mjs';
|
|
15
20
|
export * from './enum.mjs';
|
|
16
21
|
export * from './exclusiveMaximum.mjs';
|
|
@@ -20,10 +25,12 @@ export * from './id.mjs';
|
|
|
20
25
|
export * from './if.mjs';
|
|
21
26
|
export * from './items.mjs';
|
|
22
27
|
export * from './maximum.mjs';
|
|
28
|
+
export * from './maxContains.mjs';
|
|
23
29
|
export * from './maxItems.mjs';
|
|
24
30
|
export * from './maxLength.mjs';
|
|
25
31
|
export * from './maxProperties.mjs';
|
|
26
32
|
export * from './minimum.mjs';
|
|
33
|
+
export * from './minContains.mjs';
|
|
27
34
|
export * from './minItems.mjs';
|
|
28
35
|
export * from './minLength.mjs';
|
|
29
36
|
export * from './minProperties.mjs';
|
|
@@ -38,13 +45,9 @@ export * from './propertyNames.mjs';
|
|
|
38
45
|
export * from './ref.mjs';
|
|
39
46
|
export * from './required.mjs';
|
|
40
47
|
export * from './schema.mjs';
|
|
48
|
+
export * from './schema.mjs';
|
|
41
49
|
export * from './then.mjs';
|
|
42
50
|
export * from './type.mjs';
|
|
43
51
|
export * from './uniqueItems.mjs';
|
|
44
|
-
export * from './dependentRequired.mjs';
|
|
45
|
-
export * from './dependentSchemas.mjs';
|
|
46
|
-
export * from './minContains.mjs';
|
|
47
|
-
export * from './maxContains.mjs';
|
|
48
52
|
export * from './unevaluatedItems.mjs';
|
|
49
53
|
export * from './unevaluatedProperties.mjs';
|
|
50
|
-
export * from './schema.mjs';
|
|
@@ -6,9 +6,10 @@ export * from './_refine.mjs';
|
|
|
6
6
|
// ------------------------------------------------------------------
|
|
7
7
|
// Standard
|
|
8
8
|
// ------------------------------------------------------------------
|
|
9
|
-
export * from './additionalProperties.mjs';
|
|
10
9
|
export * from './additionalItems.mjs';
|
|
10
|
+
export * from './additionalProperties.mjs';
|
|
11
11
|
export * from './allOf.mjs';
|
|
12
|
+
export * from './anchor.mjs';
|
|
12
13
|
export * from './anyOf.mjs';
|
|
13
14
|
export * from './const.mjs';
|
|
14
15
|
export * from './contains.mjs';
|
|
@@ -17,6 +18,10 @@ export * from './contentMediaType.mjs';
|
|
|
17
18
|
export * from './default.mjs';
|
|
18
19
|
export * from './defs.mjs';
|
|
19
20
|
export * from './dependencies.mjs';
|
|
21
|
+
export * from './dependentRequired.mjs';
|
|
22
|
+
export * from './dependentSchemas.mjs';
|
|
23
|
+
export * from './dynamicAnchor.mjs';
|
|
24
|
+
export * from './dynamicRef.mjs';
|
|
20
25
|
export * from './else.mjs';
|
|
21
26
|
export * from './enum.mjs';
|
|
22
27
|
export * from './exclusiveMaximum.mjs';
|
|
@@ -26,10 +31,12 @@ export * from './id.mjs';
|
|
|
26
31
|
export * from './if.mjs';
|
|
27
32
|
export * from './items.mjs';
|
|
28
33
|
export * from './maximum.mjs';
|
|
34
|
+
export * from './maxContains.mjs';
|
|
29
35
|
export * from './maxItems.mjs';
|
|
30
36
|
export * from './maxLength.mjs';
|
|
31
37
|
export * from './maxProperties.mjs';
|
|
32
38
|
export * from './minimum.mjs';
|
|
39
|
+
export * from './minContains.mjs';
|
|
33
40
|
export * from './minItems.mjs';
|
|
34
41
|
export * from './minLength.mjs';
|
|
35
42
|
export * from './minProperties.mjs';
|
|
@@ -44,13 +51,9 @@ export * from './propertyNames.mjs';
|
|
|
44
51
|
export * from './ref.mjs';
|
|
45
52
|
export * from './required.mjs';
|
|
46
53
|
export * from './schema.mjs';
|
|
54
|
+
export * from './schema.mjs';
|
|
47
55
|
export * from './then.mjs';
|
|
48
56
|
export * from './type.mjs';
|
|
49
57
|
export * from './uniqueItems.mjs';
|
|
50
|
-
export * from './dependentRequired.mjs';
|
|
51
|
-
export * from './dependentSchemas.mjs';
|
|
52
|
-
export * from './minContains.mjs';
|
|
53
|
-
export * from './maxContains.mjs';
|
|
54
58
|
export * from './unevaluatedItems.mjs';
|
|
55
59
|
export * from './unevaluatedProperties.mjs';
|
|
56
|
-
export * from './schema.mjs';
|