@sinclair/typebox 0.32.33 → 0.32.34
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/cjs/errors/errors.js +2 -2
- package/build/cjs/errors/function.js +3 -4
- package/build/cjs/type/any/any.js +1 -2
- package/build/cjs/type/array/array.js +1 -2
- package/build/cjs/type/async-iterator/async-iterator.js +1 -2
- package/build/cjs/type/awaited/awaited.js +1 -2
- package/build/cjs/type/bigint/bigint.js +1 -2
- package/build/cjs/type/boolean/boolean.js +1 -2
- package/build/cjs/type/clone/type.js +2 -3
- package/build/cjs/type/clone/value.js +1 -2
- package/build/cjs/type/composite/composite.js +1 -2
- package/build/cjs/type/const/const.js +1 -2
- package/build/cjs/type/constructor/constructor.js +1 -2
- package/build/cjs/type/constructor-parameters/constructor-parameters.js +1 -2
- package/build/cjs/type/date/date.js +1 -2
- package/build/cjs/type/deref/deref.js +1 -2
- package/build/cjs/type/discard/discard.js +1 -2
- package/build/cjs/type/enum/enum.js +1 -2
- package/build/cjs/type/exclude/exclude-from-mapped-result.js +1 -2
- package/build/cjs/type/exclude/exclude-from-template-literal.js +1 -2
- package/build/cjs/type/exclude/exclude.js +1 -2
- package/build/cjs/type/extends/extends-check.js +2 -2
- package/build/cjs/type/extends/extends-from-mapped-key.js +1 -2
- package/build/cjs/type/extends/extends-from-mapped-result.js +1 -2
- package/build/cjs/type/extends/extends-undefined.js +1 -2
- package/build/cjs/type/extends/extends.js +1 -2
- package/build/cjs/type/extract/extract-from-mapped-result.js +1 -2
- package/build/cjs/type/extract/extract-from-template-literal.js +1 -2
- package/build/cjs/type/extract/extract.js +1 -2
- package/build/cjs/type/function/function.js +1 -2
- package/build/cjs/type/guard/kind.js +45 -46
- package/build/cjs/type/guard/type.js +48 -48
- package/build/cjs/type/guard/value.js +15 -16
- package/build/cjs/type/helpers/helpers.js +1 -2
- package/build/cjs/type/indexed/indexed-from-mapped-key.js +1 -2
- package/build/cjs/type/indexed/indexed-from-mapped-result.js +1 -2
- package/build/cjs/type/indexed/indexed-property-keys.js +1 -2
- package/build/cjs/type/indexed/indexed.js +3 -4
- package/build/cjs/type/instance-type/instance-type.js +1 -2
- package/build/cjs/type/integer/integer.js +1 -2
- package/build/cjs/type/intersect/intersect-create.js +1 -2
- package/build/cjs/type/intersect/intersect-evaluated.js +1 -2
- package/build/cjs/type/intersect/intersect.js +1 -2
- package/build/cjs/type/intrinsic/capitalize.js +1 -2
- package/build/cjs/type/intrinsic/intrinsic-from-mapped-key.js +1 -2
- package/build/cjs/type/intrinsic/intrinsic.js +1 -2
- package/build/cjs/type/intrinsic/lowercase.js +1 -2
- package/build/cjs/type/intrinsic/uncapitalize.js +1 -2
- package/build/cjs/type/intrinsic/uppercase.js +1 -2
- package/build/cjs/type/iterator/iterator.js +1 -2
- package/build/cjs/type/keyof/keyof-from-mapped-result.js +1 -2
- package/build/cjs/type/keyof/keyof-property-entries.js +1 -2
- package/build/cjs/type/keyof/keyof-property-keys.js +2 -3
- package/build/cjs/type/keyof/keyof.js +2 -3
- package/build/cjs/type/literal/literal.js +1 -2
- package/build/cjs/type/mapped/mapped-key.js +1 -2
- package/build/cjs/type/mapped/mapped-result.js +1 -2
- package/build/cjs/type/mapped/mapped.js +2 -3
- package/build/cjs/type/never/never.js +1 -2
- package/build/cjs/type/not/not.js +1 -2
- package/build/cjs/type/null/null.js +1 -2
- package/build/cjs/type/number/number.js +1 -2
- package/build/cjs/type/omit/omit-from-mapped-key.js +1 -2
- package/build/cjs/type/omit/omit-from-mapped-result.js +1 -2
- package/build/cjs/type/omit/omit.js +1 -2
- package/build/cjs/type/optional/optional-from-mapped-result.js +1 -2
- package/build/cjs/type/optional/optional.js +1 -2
- package/build/cjs/type/parameters/parameters.js +1 -2
- package/build/cjs/type/partial/partial-from-mapped-result.js +1 -2
- package/build/cjs/type/partial/partial.js +1 -2
- package/build/cjs/type/pick/pick-from-mapped-key.js +1 -2
- package/build/cjs/type/pick/pick-from-mapped-result.js +1 -2
- package/build/cjs/type/pick/pick.d.ts +2 -2
- package/build/cjs/type/pick/pick.js +1 -2
- package/build/cjs/type/promise/promise.js +1 -2
- package/build/cjs/type/readonly/readonly-from-mapped-result.js +1 -2
- package/build/cjs/type/readonly/readonly.js +1 -2
- package/build/cjs/type/readonly-optional/readonly-optional.js +1 -2
- package/build/cjs/type/record/record.js +1 -2
- package/build/cjs/type/recursive/recursive.js +1 -2
- package/build/cjs/type/ref/ref.js +1 -2
- package/build/cjs/type/regexp/regexp.js +1 -2
- package/build/cjs/type/registry/format.js +6 -7
- package/build/cjs/type/registry/type.js +6 -7
- package/build/cjs/type/required/required-from-mapped-result.js +1 -2
- package/build/cjs/type/required/required.js +1 -2
- package/build/cjs/type/rest/rest.js +1 -2
- package/build/cjs/type/return-type/return-type.js +1 -2
- package/build/cjs/type/sets/set.js +8 -9
- package/build/cjs/type/strict/strict.js +1 -2
- package/build/cjs/type/string/string.js +1 -2
- package/build/cjs/type/symbol/symbol.js +1 -2
- package/build/cjs/type/template-literal/finite.js +3 -3
- package/build/cjs/type/template-literal/generate.d.ts +1 -1
- package/build/cjs/type/template-literal/generate.js +3 -3
- package/build/cjs/type/template-literal/parse.js +3 -3
- package/build/cjs/type/template-literal/pattern.js +2 -2
- package/build/cjs/type/template-literal/syntax.js +1 -2
- package/build/cjs/type/template-literal/template-literal.js +1 -2
- package/build/cjs/type/template-literal/union.js +1 -2
- package/build/cjs/type/transform/transform.js +2 -2
- package/build/cjs/type/tuple/tuple.js +1 -2
- package/build/cjs/type/type/index.d.ts +1 -1
- package/build/cjs/type/uint8array/uint8array.js +1 -2
- package/build/cjs/type/undefined/undefined.js +1 -2
- package/build/cjs/type/union/union-create.js +1 -2
- package/build/cjs/type/union/union-evaluated.js +1 -2
- package/build/cjs/type/union/union.js +1 -2
- package/build/cjs/type/unknown/unknown.js +1 -2
- package/build/cjs/type/unsafe/unsafe.js +1 -2
- package/build/cjs/type/void/void.js +1 -2
- package/build/cjs/value/cast/cast.js +2 -2
- package/build/cjs/value/check/check.js +2 -2
- package/build/cjs/value/clean/clean.js +1 -2
- package/build/cjs/value/clone/clone.js +1 -2
- package/build/cjs/value/convert/convert.js +1 -2
- package/build/cjs/value/create/create.js +2 -2
- package/build/cjs/value/default/default.js +1 -2
- package/build/cjs/value/delta/delta.js +3 -3
- package/build/cjs/value/deref/deref.js +2 -2
- package/build/cjs/value/equal/equal.js +1 -2
- package/build/cjs/value/guard/guard.js +34 -35
- package/build/cjs/value/hash/hash.js +2 -2
- package/build/cjs/value/mutate/mutate.js +2 -2
- package/build/cjs/value/pointer/pointer.js +6 -6
- package/build/cjs/value/transform/decode.js +2 -2
- package/build/cjs/value/transform/encode.js +2 -2
- package/build/cjs/value/transform/has.js +1 -2
- package/build/cjs/value/value/value.js +15 -16
- package/build/esm/type/pick/pick.d.mts +2 -2
- package/build/esm/type/template-literal/generate.d.mts +1 -1
- package/build/esm/type/type/index.d.mts +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.ValueErrorIterator = exports.ValueErrorsUnknownTypeError = exports.ValueErrorType = void 0;
|
|
5
|
+
exports.Errors = Errors;
|
|
5
6
|
const index_1 = require("../system/index");
|
|
6
7
|
const index_2 = require("../type/keyof/index");
|
|
7
8
|
const index_3 = require("../type/registry/index");
|
|
@@ -581,4 +582,3 @@ function Errors(...args) {
|
|
|
581
582
|
const iterator = args.length === 3 ? Visit(args[0], args[1], '', args[2]) : Visit(args[0], [], '', args[1]);
|
|
582
583
|
return new ValueErrorIterator(iterator);
|
|
583
584
|
}
|
|
584
|
-
exports.Errors = Errors;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.DefaultErrorFunction = DefaultErrorFunction;
|
|
5
|
+
exports.SetErrorFunction = SetErrorFunction;
|
|
6
|
+
exports.GetErrorFunction = GetErrorFunction;
|
|
5
7
|
const index_1 = require("../type/symbols/index");
|
|
6
8
|
const errors_1 = require("./errors");
|
|
7
9
|
/** Creates an error message using en-US as the default locale */
|
|
@@ -139,16 +141,13 @@ function DefaultErrorFunction(error) {
|
|
|
139
141
|
return 'Unknown error type';
|
|
140
142
|
}
|
|
141
143
|
}
|
|
142
|
-
exports.DefaultErrorFunction = DefaultErrorFunction;
|
|
143
144
|
/** Manages error message providers */
|
|
144
145
|
let errorFunction = DefaultErrorFunction;
|
|
145
146
|
/** Sets the error function used to generate error messages. */
|
|
146
147
|
function SetErrorFunction(callback) {
|
|
147
148
|
errorFunction = callback;
|
|
148
149
|
}
|
|
149
|
-
exports.SetErrorFunction = SetErrorFunction;
|
|
150
150
|
/** Gets the error function used to generate error messages */
|
|
151
151
|
function GetErrorFunction() {
|
|
152
152
|
return errorFunction;
|
|
153
153
|
}
|
|
154
|
-
exports.GetErrorFunction = GetErrorFunction;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Any =
|
|
4
|
+
exports.Any = Any;
|
|
5
5
|
const index_1 = require("../symbols/index");
|
|
6
6
|
/** `[Json]` Creates an Any type */
|
|
7
7
|
function Any(options = {}) {
|
|
8
8
|
return { ...options, [index_1.Kind]: 'Any' };
|
|
9
9
|
}
|
|
10
|
-
exports.Any = Any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Array =
|
|
4
|
+
exports.Array = Array;
|
|
5
5
|
const type_1 = require("../clone/type");
|
|
6
6
|
const index_1 = require("../symbols/index");
|
|
7
7
|
/** `[Json]` Creates an Array type */
|
|
@@ -13,4 +13,3 @@ function Array(schema, options = {}) {
|
|
|
13
13
|
items: (0, type_1.CloneType)(schema),
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
exports.Array = Array;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.AsyncIterator =
|
|
4
|
+
exports.AsyncIterator = AsyncIterator;
|
|
5
5
|
const index_1 = require("../symbols/index");
|
|
6
6
|
const type_1 = require("../clone/type");
|
|
7
7
|
/** `[JavaScript]` Creates a AsyncIterator type */
|
|
@@ -13,4 +13,3 @@ function AsyncIterator(items, options = {}) {
|
|
|
13
13
|
items: (0, type_1.CloneType)(items),
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
exports.AsyncIterator = AsyncIterator;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Awaited =
|
|
4
|
+
exports.Awaited = Awaited;
|
|
5
5
|
const index_1 = require("../intersect/index");
|
|
6
6
|
const index_2 = require("../union/index");
|
|
7
7
|
const type_1 = require("../clone/type");
|
|
@@ -39,4 +39,3 @@ function AwaitedResolve(T) {
|
|
|
39
39
|
function Awaited(T, options = {}) {
|
|
40
40
|
return (0, type_1.CloneType)(AwaitedResolve(T), options);
|
|
41
41
|
}
|
|
42
|
-
exports.Awaited = Awaited;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.BigInt =
|
|
4
|
+
exports.BigInt = BigInt;
|
|
5
5
|
const index_1 = require("../symbols/index");
|
|
6
6
|
/** `[JavaScript]` Creates a BigInt type */
|
|
7
7
|
function BigInt(options = {}) {
|
|
@@ -11,4 +11,3 @@ function BigInt(options = {}) {
|
|
|
11
11
|
type: 'bigint',
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
exports.BigInt = BigInt;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Boolean =
|
|
4
|
+
exports.Boolean = Boolean;
|
|
5
5
|
const index_1 = require("../symbols/index");
|
|
6
6
|
/** `[Json]` Creates a Boolean type */
|
|
7
7
|
function Boolean(options = {}) {
|
|
@@ -11,4 +11,3 @@ function Boolean(options = {}) {
|
|
|
11
11
|
type: 'boolean',
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
exports.Boolean = Boolean;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.CloneRest = CloneRest;
|
|
5
|
+
exports.CloneType = CloneType;
|
|
5
6
|
const value_1 = require("./value");
|
|
6
7
|
/** Clones a Rest */
|
|
7
8
|
function CloneRest(schemas) {
|
|
8
9
|
return schemas.map((schema) => CloneType(schema));
|
|
9
10
|
}
|
|
10
|
-
exports.CloneRest = CloneRest;
|
|
11
11
|
/** Clones a Type */
|
|
12
12
|
function CloneType(schema, options = {}) {
|
|
13
13
|
return { ...(0, value_1.Clone)(schema), ...options };
|
|
14
14
|
}
|
|
15
|
-
exports.CloneType = CloneType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Clone =
|
|
4
|
+
exports.Clone = Clone;
|
|
5
5
|
const ValueGuard = require("../guard/value");
|
|
6
6
|
function ArrayType(value) {
|
|
7
7
|
return value.map((value) => Visit(value));
|
|
@@ -38,4 +38,3 @@ function Visit(value) {
|
|
|
38
38
|
function Clone(value) {
|
|
39
39
|
return Visit(value);
|
|
40
40
|
}
|
|
41
|
-
exports.Clone = Clone;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Composite =
|
|
4
|
+
exports.Composite = Composite;
|
|
5
5
|
const index_1 = require("../intersect/index");
|
|
6
6
|
const index_2 = require("../indexed/index");
|
|
7
7
|
const index_3 = require("../keyof/index");
|
|
@@ -44,4 +44,3 @@ function Composite(T, options = {}) {
|
|
|
44
44
|
const R = (0, index_4.Object)(P, options);
|
|
45
45
|
return R;
|
|
46
46
|
}
|
|
47
|
-
exports.Composite = Composite;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Const =
|
|
4
|
+
exports.Const = Const;
|
|
5
5
|
const index_1 = require("../any/index");
|
|
6
6
|
const index_2 = require("../bigint/index");
|
|
7
7
|
const index_3 = require("../date/index");
|
|
@@ -56,4 +56,3 @@ function FromValue(value, root) {
|
|
|
56
56
|
function Const(T, options = {}) {
|
|
57
57
|
return (0, index_14.CloneType)(FromValue(T, true), options);
|
|
58
58
|
}
|
|
59
|
-
exports.Const = Const;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Constructor =
|
|
4
|
+
exports.Constructor = Constructor;
|
|
5
5
|
const type_1 = require("../clone/type");
|
|
6
6
|
const index_1 = require("../symbols/index");
|
|
7
7
|
/** `[JavaScript]` Creates a Constructor type */
|
|
@@ -14,4 +14,3 @@ function Constructor(parameters, returns, options) {
|
|
|
14
14
|
returns: (0, type_1.CloneType)(returns),
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
exports.Constructor = Constructor;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ConstructorParameters =
|
|
4
|
+
exports.ConstructorParameters = ConstructorParameters;
|
|
5
5
|
const index_1 = require("../tuple/index");
|
|
6
6
|
const type_1 = require("../clone/type");
|
|
7
7
|
/** `[JavaScript]` Extracts the ConstructorParameters from the given Constructor type */
|
|
8
8
|
function ConstructorParameters(schema, options = {}) {
|
|
9
9
|
return (0, index_1.Tuple)((0, type_1.CloneRest)(schema.parameters), { ...options });
|
|
10
10
|
}
|
|
11
|
-
exports.ConstructorParameters = ConstructorParameters;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Date =
|
|
4
|
+
exports.Date = Date;
|
|
5
5
|
const index_1 = require("../symbols/index");
|
|
6
6
|
/** `[JavaScript]` Creates a Date type */
|
|
7
7
|
function Date(options = {}) {
|
|
@@ -11,4 +11,3 @@ function Date(options = {}) {
|
|
|
11
11
|
type: 'Date',
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
exports.Date = Date;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Deref =
|
|
4
|
+
exports.Deref = Deref;
|
|
5
5
|
const type_1 = require("../clone/type");
|
|
6
6
|
const index_1 = require("../discard/index");
|
|
7
7
|
const value_1 = require("../guard/value");
|
|
@@ -104,4 +104,3 @@ function DerefResolve(schema, references) {
|
|
|
104
104
|
function Deref(schema, references) {
|
|
105
105
|
return DerefResolve((0, type_1.CloneType)(schema), (0, type_1.CloneRest)(references));
|
|
106
106
|
}
|
|
107
|
-
exports.Deref = Deref;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Discard =
|
|
4
|
+
exports.Discard = Discard;
|
|
5
5
|
function DiscardKey(value, key) {
|
|
6
6
|
const { [key]: _, ...rest } = value;
|
|
7
7
|
return rest;
|
|
@@ -9,4 +9,3 @@ function DiscardKey(value, key) {
|
|
|
9
9
|
function Discard(value, keys) {
|
|
10
10
|
return keys.reduce((acc, key) => DiscardKey(acc, key), value);
|
|
11
11
|
}
|
|
12
|
-
exports.Discard = Discard;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Enum =
|
|
4
|
+
exports.Enum = Enum;
|
|
5
5
|
const index_1 = require("../literal/index");
|
|
6
6
|
const index_2 = require("../symbols/index");
|
|
7
7
|
const index_3 = require("../union/index");
|
|
@@ -20,4 +20,3 @@ function Enum(item, options = {}) {
|
|
|
20
20
|
const anyOf = values2.map((value) => (0, index_1.Literal)(value));
|
|
21
21
|
return (0, index_3.Union)(anyOf, { ...options, [index_2.Hint]: 'Enum' });
|
|
22
22
|
}
|
|
23
|
-
exports.Enum = Enum;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ExcludeFromMappedResult =
|
|
4
|
+
exports.ExcludeFromMappedResult = ExcludeFromMappedResult;
|
|
5
5
|
const index_1 = require("../mapped/index");
|
|
6
6
|
const exclude_1 = require("./exclude");
|
|
7
7
|
// prettier-ignore
|
|
@@ -20,4 +20,3 @@ function ExcludeFromMappedResult(R, T) {
|
|
|
20
20
|
const P = FromMappedResult(R, T);
|
|
21
21
|
return (0, index_1.MappedResult)(P);
|
|
22
22
|
}
|
|
23
|
-
exports.ExcludeFromMappedResult = ExcludeFromMappedResult;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ExcludeFromTemplateLiteral =
|
|
4
|
+
exports.ExcludeFromTemplateLiteral = ExcludeFromTemplateLiteral;
|
|
5
5
|
const exclude_1 = require("./exclude");
|
|
6
6
|
const index_1 = require("../template-literal/index");
|
|
7
7
|
function ExcludeFromTemplateLiteral(L, R) {
|
|
8
8
|
return (0, exclude_1.Exclude)((0, index_1.TemplateLiteralToUnion)(L), R);
|
|
9
9
|
}
|
|
10
|
-
exports.ExcludeFromTemplateLiteral = ExcludeFromTemplateLiteral;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Exclude =
|
|
4
|
+
exports.Exclude = Exclude;
|
|
5
5
|
const index_1 = require("../union/index");
|
|
6
6
|
const index_2 = require("../never/index");
|
|
7
7
|
const index_3 = require("../extends/index");
|
|
@@ -27,4 +27,3 @@ function Exclude(L, R, options = {}) {
|
|
|
27
27
|
return (0, type_1.CloneType)((0, kind_1.IsUnion)(L) ? ExcludeRest(L.anyOf, R) :
|
|
28
28
|
(0, index_3.ExtendsCheck)(L, R) !== index_3.ExtendsResult.False ? (0, index_2.Never)() : L, options);
|
|
29
29
|
}
|
|
30
|
-
exports.Exclude = Exclude;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
4
|
+
exports.ExtendsResult = exports.ExtendsResolverError = void 0;
|
|
5
|
+
exports.ExtendsCheck = ExtendsCheck;
|
|
5
6
|
const index_1 = require("../any/index");
|
|
6
7
|
const index_2 = require("../function/index");
|
|
7
8
|
const index_3 = require("../number/index");
|
|
@@ -638,4 +639,3 @@ function Visit(left, right) {
|
|
|
638
639
|
function ExtendsCheck(left, right) {
|
|
639
640
|
return Visit(left, right);
|
|
640
641
|
}
|
|
641
|
-
exports.ExtendsCheck = ExtendsCheck;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ExtendsFromMappedKey =
|
|
4
|
+
exports.ExtendsFromMappedKey = ExtendsFromMappedKey;
|
|
5
5
|
const index_1 = require("../mapped/index");
|
|
6
6
|
const index_2 = require("../literal/index");
|
|
7
7
|
const extends_1 = require("./extends");
|
|
@@ -26,4 +26,3 @@ function ExtendsFromMappedKey(T, U, L, R, options) {
|
|
|
26
26
|
const P = FromMappedKey(T, U, L, R, options);
|
|
27
27
|
return (0, index_1.MappedResult)(P);
|
|
28
28
|
}
|
|
29
|
-
exports.ExtendsFromMappedKey = ExtendsFromMappedKey;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ExtendsFromMappedResult =
|
|
4
|
+
exports.ExtendsFromMappedResult = ExtendsFromMappedResult;
|
|
5
5
|
const index_1 = require("../mapped/index");
|
|
6
6
|
const extends_1 = require("./extends");
|
|
7
7
|
// prettier-ignore
|
|
@@ -20,4 +20,3 @@ function ExtendsFromMappedResult(Left, Right, True, False, options) {
|
|
|
20
20
|
const P = FromMappedResult(Left, Right, True, False, options);
|
|
21
21
|
return (0, index_1.MappedResult)(P);
|
|
22
22
|
}
|
|
23
|
-
exports.ExtendsFromMappedResult = ExtendsFromMappedResult;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ExtendsUndefinedCheck =
|
|
4
|
+
exports.ExtendsUndefinedCheck = ExtendsUndefinedCheck;
|
|
5
5
|
const index_1 = require("../symbols/index");
|
|
6
6
|
/** Fast undefined check used for properties of type undefined */
|
|
7
7
|
function Intersect(schema) {
|
|
@@ -22,4 +22,3 @@ function ExtendsUndefinedCheck(schema) {
|
|
|
22
22
|
schema[index_1.Kind] === 'Undefined' ? true :
|
|
23
23
|
false);
|
|
24
24
|
}
|
|
25
|
-
exports.ExtendsUndefinedCheck = ExtendsUndefinedCheck;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Extends =
|
|
4
|
+
exports.Extends = Extends;
|
|
5
5
|
const index_1 = require("../union/index");
|
|
6
6
|
const extends_check_1 = require("./extends-check");
|
|
7
7
|
const type_1 = require("../clone/type");
|
|
@@ -25,4 +25,3 @@ function Extends(L, R, T, F, options = {}) {
|
|
|
25
25
|
(0, kind_1.IsMappedKey)(L) ? (0, type_1.CloneType)((0, extends_from_mapped_key_1.ExtendsFromMappedKey)(L, R, T, F, options)) :
|
|
26
26
|
(0, type_1.CloneType)(ExtendsResolve(L, R, T, F), options));
|
|
27
27
|
}
|
|
28
|
-
exports.Extends = Extends;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ExtractFromMappedResult =
|
|
4
|
+
exports.ExtractFromMappedResult = ExtractFromMappedResult;
|
|
5
5
|
const index_1 = require("../mapped/index");
|
|
6
6
|
const extract_1 = require("./extract");
|
|
7
7
|
// prettier-ignore
|
|
@@ -20,4 +20,3 @@ function ExtractFromMappedResult(R, T) {
|
|
|
20
20
|
const P = FromMappedResult(R, T);
|
|
21
21
|
return (0, index_1.MappedResult)(P);
|
|
22
22
|
}
|
|
23
|
-
exports.ExtractFromMappedResult = ExtractFromMappedResult;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ExtractFromTemplateLiteral =
|
|
4
|
+
exports.ExtractFromTemplateLiteral = ExtractFromTemplateLiteral;
|
|
5
5
|
const extract_1 = require("./extract");
|
|
6
6
|
const index_1 = require("../template-literal/index");
|
|
7
7
|
function ExtractFromTemplateLiteral(L, R) {
|
|
8
8
|
return (0, extract_1.Extract)((0, index_1.TemplateLiteralToUnion)(L), R);
|
|
9
9
|
}
|
|
10
|
-
exports.ExtractFromTemplateLiteral = ExtractFromTemplateLiteral;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Extract =
|
|
4
|
+
exports.Extract = Extract;
|
|
5
5
|
const index_1 = require("../union/index");
|
|
6
6
|
const index_2 = require("../never/index");
|
|
7
7
|
const index_3 = require("../extends/index");
|
|
@@ -27,4 +27,3 @@ function Extract(L, R, options = {}) {
|
|
|
27
27
|
return (0, type_1.CloneType)((0, kind_1.IsUnion)(L) ? ExtractRest(L.anyOf, R) :
|
|
28
28
|
(0, index_3.ExtendsCheck)(L, R) !== index_3.ExtendsResult.False ? L : (0, index_2.Never)(), options);
|
|
29
29
|
}
|
|
30
|
-
exports.Extract = Extract;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Function =
|
|
4
|
+
exports.Function = Function;
|
|
5
5
|
const type_1 = require("../clone/type");
|
|
6
6
|
const index_1 = require("../symbols/index");
|
|
7
7
|
/** `[JavaScript]` Creates a Function type */
|
|
@@ -14,4 +14,3 @@ function Function(parameters, returns, options) {
|
|
|
14
14
|
returns: (0, type_1.CloneType)(returns),
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
exports.Function = Function;
|