typebox 1.0.20 → 1.0.22
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.
|
@@ -4,7 +4,7 @@ import { Any } from '../../types/any.mjs';
|
|
|
4
4
|
import { Array, IsArray, ArrayOptions } from '../../types/array.mjs';
|
|
5
5
|
import { AsyncIterator, IsAsyncIterator } from '../../types/async-iterator.mjs';
|
|
6
6
|
import { Constructor, IsConstructor } from '../../types/constructor.mjs';
|
|
7
|
-
import { Function, IsFunction } from '../../types/function.mjs';
|
|
7
|
+
import { Function as _Function, IsFunction } from '../../types/function.mjs';
|
|
8
8
|
import { Intersect, IsIntersect } from '../../types/intersect.mjs';
|
|
9
9
|
import { Iterator, IsIterator } from '../../types/iterator.mjs';
|
|
10
10
|
import { Object, IsObject } from '../../types/object.mjs';
|
|
@@ -32,7 +32,7 @@ function FromType(type) {
|
|
|
32
32
|
IsArray(type) ? Array(FromType(type.items), ArrayOptions(type)) :
|
|
33
33
|
IsAsyncIterator(type) ? AsyncIterator(FromType(type.iteratorItems)) :
|
|
34
34
|
IsConstructor(type) ? Constructor(FromTypes(type.parameters), FromType(type.instanceType)) :
|
|
35
|
-
IsFunction(type) ?
|
|
35
|
+
IsFunction(type) ? _Function(FromTypes(type.parameters), FromType(type.returnType)) :
|
|
36
36
|
IsIntersect(type) ? Intersect(FromTypes(type.allOf)) :
|
|
37
37
|
IsIterator(type) ? Iterator(FromType(type.iteratorItems)) :
|
|
38
38
|
IsObject(type) ? Object(FromProperties(type.properties)) :
|
|
@@ -14,7 +14,7 @@ import { Array, IsArray, ArrayOptions } from '../types/array.mjs';
|
|
|
14
14
|
import { AsyncIterator, IsAsyncIterator, AsyncIteratorOptions } from '../types/async-iterator.mjs';
|
|
15
15
|
import { Constructor, IsConstructor, ConstructorOptions } from '../types/constructor.mjs';
|
|
16
16
|
import { Deferred, IsDeferred } from '../types/deferred.mjs';
|
|
17
|
-
import { Function, IsFunction, FunctionOptions } from '../types/function.mjs';
|
|
17
|
+
import { Function as _Function, IsFunction, FunctionOptions } from '../types/function.mjs';
|
|
18
18
|
import { IsCall } from '../types/call.mjs';
|
|
19
19
|
import { Intersect, IsIntersect, IntersectOptions } from '../types/intersect.mjs';
|
|
20
20
|
import { Iterator, IsIterator, IteratorOptions } from '../types/iterator.mjs';
|
|
@@ -147,7 +147,7 @@ export function InstantiateType(context, state, input) {
|
|
|
147
147
|
IsCall(type) ? CallInstantiate(context, state, type.target, type.arguments) :
|
|
148
148
|
IsConstructor(type) ? Constructor(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.instanceType), ConstructorOptions(type)) :
|
|
149
149
|
IsDeferred(type) ? InstantiateDeferred(context, state, type.action, type.parameters, type.options) :
|
|
150
|
-
IsFunction(type) ?
|
|
150
|
+
IsFunction(type) ? _Function(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.returnType), FunctionOptions(type)) :
|
|
151
151
|
IsIntersect(type) ? Intersect(InstantiateTypes(context, state, type.allOf), IntersectOptions(type)) :
|
|
152
152
|
IsIterator(type) ? Iterator(InstantiateType(context, state, type.iteratorItems), IteratorOptions(type)) :
|
|
153
153
|
IsObject(type) ? Object(InstantiateProperties(context, state, type.properties), ObjectOptions(type)) :
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typebox",
|
|
3
3
|
"description": "A Runtime Type System for JavaScript",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.22",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
7
7
|
"jsonschema"
|
|
@@ -20,34 +20,34 @@
|
|
|
20
20
|
"import": "./build/guard/index.mjs",
|
|
21
21
|
"default": "./build/guard/index.mjs"
|
|
22
22
|
},
|
|
23
|
+
"./schema": {
|
|
24
|
+
"import": "./build/schema/index.mjs",
|
|
25
|
+
"default": "./build/schema/index.mjs"
|
|
26
|
+
},
|
|
23
27
|
"./value": {
|
|
24
28
|
"import": "./build/value/index.mjs",
|
|
25
29
|
"default": "./build/value/index.mjs"
|
|
26
30
|
},
|
|
31
|
+
"./format": {
|
|
32
|
+
"import": "./build/format/index.mjs",
|
|
33
|
+
"default": "./build/format/index.mjs"
|
|
34
|
+
},
|
|
27
35
|
"./type": {
|
|
28
36
|
"import": "./build/type/index.mjs",
|
|
29
37
|
"default": "./build/type/index.mjs"
|
|
30
38
|
},
|
|
31
|
-
"./system": {
|
|
32
|
-
"import": "./build/system/index.mjs",
|
|
33
|
-
"default": "./build/system/index.mjs"
|
|
34
|
-
},
|
|
35
39
|
"./error": {
|
|
36
40
|
"import": "./build/error/index.mjs",
|
|
37
41
|
"default": "./build/error/index.mjs"
|
|
38
42
|
},
|
|
39
|
-
"./
|
|
40
|
-
"import": "./build/
|
|
41
|
-
"default": "./build/
|
|
43
|
+
"./system": {
|
|
44
|
+
"import": "./build/system/index.mjs",
|
|
45
|
+
"default": "./build/system/index.mjs"
|
|
42
46
|
},
|
|
43
47
|
"./compile": {
|
|
44
48
|
"import": "./build/compile/index.mjs",
|
|
45
49
|
"default": "./build/compile/index.mjs"
|
|
46
50
|
},
|
|
47
|
-
"./format": {
|
|
48
|
-
"import": "./build/format/index.mjs",
|
|
49
|
-
"default": "./build/format/index.mjs"
|
|
50
|
-
},
|
|
51
51
|
".": {
|
|
52
52
|
"import": "./build/index.mjs",
|
|
53
53
|
"default": "./build/index.mjs"
|
|
@@ -58,27 +58,27 @@
|
|
|
58
58
|
"guard": [
|
|
59
59
|
"./build/guard/index.d.mts"
|
|
60
60
|
],
|
|
61
|
+
"schema": [
|
|
62
|
+
"./build/schema/index.d.mts"
|
|
63
|
+
],
|
|
61
64
|
"value": [
|
|
62
65
|
"./build/value/index.d.mts"
|
|
63
66
|
],
|
|
67
|
+
"format": [
|
|
68
|
+
"./build/format/index.d.mts"
|
|
69
|
+
],
|
|
64
70
|
"type": [
|
|
65
71
|
"./build/type/index.d.mts"
|
|
66
72
|
],
|
|
67
|
-
"system": [
|
|
68
|
-
"./build/system/index.d.mts"
|
|
69
|
-
],
|
|
70
73
|
"error": [
|
|
71
74
|
"./build/error/index.d.mts"
|
|
72
75
|
],
|
|
73
|
-
"
|
|
74
|
-
"./build/
|
|
76
|
+
"system": [
|
|
77
|
+
"./build/system/index.d.mts"
|
|
75
78
|
],
|
|
76
79
|
"compile": [
|
|
77
80
|
"./build/compile/index.d.mts"
|
|
78
81
|
],
|
|
79
|
-
"format": [
|
|
80
|
-
"./build/format/index.d.mts"
|
|
81
|
-
],
|
|
82
82
|
".": [
|
|
83
83
|
"./build/./index.d.mts"
|
|
84
84
|
]
|