@sinclair/typebox 0.32.0-dev-17 → 0.32.0-dev-19
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/import/compiler/compiler.mjs +14 -35
- package/build/import/compiler/index.mjs +0 -27
- package/build/import/errors/errors.mjs +15 -38
- package/build/import/errors/function.mjs +0 -27
- package/build/import/errors/index.mjs +0 -27
- package/build/import/index.mjs +0 -27
- package/build/import/system/index.mjs +0 -27
- package/build/import/system/policy.mjs +0 -27
- package/build/import/system/system.mjs +0 -27
- package/build/import/type/any/any.mjs +0 -27
- package/build/import/type/any/index.mjs +0 -27
- package/build/import/type/array/array.mjs +0 -27
- package/build/import/type/array/index.mjs +0 -27
- package/build/import/type/async-iterator/async-iterator.mjs +0 -27
- package/build/import/type/async-iterator/index.mjs +0 -27
- package/build/import/type/awaited/awaited.d.mts +6 -6
- package/build/import/type/awaited/awaited.mjs +14 -41
- package/build/import/type/awaited/index.mjs +0 -27
- package/build/import/type/bigint/bigint.mjs +0 -27
- package/build/import/type/bigint/index.mjs +0 -27
- package/build/import/type/boolean/boolean.mjs +0 -27
- package/build/import/type/boolean/index.mjs +0 -27
- package/build/import/type/clone/index.mjs +0 -27
- package/build/import/type/clone/type.mjs +0 -27
- package/build/import/type/clone/value.mjs +0 -27
- package/build/import/type/composite/composite.mjs +0 -27
- package/build/import/type/composite/index.mjs +0 -27
- package/build/import/type/const/const.mjs +0 -27
- package/build/import/type/const/index.mjs +0 -27
- package/build/import/type/constructor/constructor.mjs +0 -27
- package/build/import/type/constructor/index.mjs +0 -27
- package/build/import/type/constructor-parameters/constructor-parameters.mjs +0 -27
- package/build/import/type/constructor-parameters/index.mjs +0 -27
- package/build/import/type/date/date.mjs +0 -27
- package/build/import/type/date/index.mjs +0 -27
- package/build/import/type/deref/deref.mjs +12 -39
- package/build/import/type/deref/index.mjs +0 -27
- package/build/import/type/discard/discard.mjs +0 -27
- package/build/import/type/discard/index.mjs +0 -27
- package/build/import/type/enum/enum.mjs +0 -27
- package/build/import/type/enum/index.mjs +0 -27
- package/build/import/type/exclude/exclude-from-mapped-result.mjs +0 -27
- package/build/import/type/exclude/exclude.mjs +8 -32
- package/build/import/type/exclude/index.mjs +0 -27
- package/build/import/type/extends/extends-check.mjs +167 -194
- package/build/import/type/extends/extends-from-mapped-key.mjs +0 -27
- package/build/import/type/extends/extends-from-mapped-result.mjs +0 -27
- package/build/import/type/extends/extends-undefined.mjs +0 -27
- package/build/import/type/extends/extends.mjs +3 -30
- package/build/import/type/extends/index.mjs +0 -27
- package/build/import/type/extract/extract-from-mapped-result.mjs +0 -27
- package/build/import/type/extract/extract.mjs +5 -32
- package/build/import/type/extract/index.mjs +0 -27
- package/build/import/type/function/function.mjs +0 -27
- package/build/import/type/function/index.mjs +0 -27
- package/build/import/type/guard/index.mjs +0 -27
- package/build/import/type/guard/type.d.mts +50 -50
- package/build/import/type/guard/type.mjs +136 -163
- package/build/import/type/guard/value.mjs +0 -27
- package/build/import/type/helpers/helpers.mjs +0 -27
- package/build/import/type/helpers/index.mjs +0 -27
- package/build/import/type/index.mjs +0 -27
- package/build/import/type/indexed/index.d.mts +0 -1
- package/build/import/type/indexed/index.mjs +0 -28
- package/build/import/type/indexed/indexed-from-mapped-key.d.mts +2 -2
- package/build/import/type/indexed/indexed-from-mapped-key.mjs +2 -29
- package/build/import/type/indexed/indexed-property-keys.mjs +7 -34
- package/build/import/type/indexed/indexed.d.mts +38 -5
- package/build/import/type/indexed/indexed.mjs +78 -32
- package/build/import/type/instance-type/index.mjs +0 -27
- package/build/import/type/instance-type/instance-type.mjs +0 -27
- package/build/import/type/integer/index.mjs +0 -27
- package/build/import/type/integer/integer.mjs +0 -27
- package/build/import/type/intersect/index.mjs +0 -27
- package/build/import/type/intersect/intersect-create.mjs +4 -31
- package/build/import/type/intersect/intersect-evaluated.mjs +1 -28
- package/build/import/type/intersect/intersect-type.mjs +0 -27
- package/build/import/type/intersect/intersect.mjs +2 -29
- package/build/import/type/intrinsic/capitalize.mjs +0 -27
- package/build/import/type/intrinsic/index.mjs +0 -27
- package/build/import/type/intrinsic/intrinsic-from-mapped-key.mjs +0 -27
- package/build/import/type/intrinsic/intrinsic.mjs +5 -32
- package/build/import/type/intrinsic/lowercase.mjs +0 -27
- package/build/import/type/intrinsic/uncapitalize.mjs +0 -27
- package/build/import/type/intrinsic/uppercase.mjs +0 -27
- package/build/import/type/iterator/index.mjs +0 -27
- package/build/import/type/iterator/iterator.mjs +0 -27
- package/build/import/type/keyof/index.mjs +0 -27
- package/build/import/type/keyof/keyof-from-mapped-result.mjs +0 -27
- package/build/import/type/keyof/keyof-property-keys.mjs +7 -34
- package/build/import/type/keyof/keyof.mjs +2 -29
- package/build/import/type/literal/index.mjs +0 -27
- package/build/import/type/literal/literal.mjs +0 -27
- package/build/import/type/mapped/index.mjs +0 -27
- package/build/import/type/mapped/mapped-key.mjs +0 -27
- package/build/import/type/mapped/mapped-result.mjs +0 -27
- package/build/import/type/mapped/mapped.mjs +16 -43
- package/build/import/type/modifiers/index.mjs +0 -27
- package/build/import/type/modifiers/modifiers.mjs +3 -30
- package/build/import/type/never/index.mjs +0 -27
- package/build/import/type/never/never.mjs +0 -27
- package/build/import/type/not/index.mjs +0 -27
- package/build/import/type/not/not.mjs +0 -27
- package/build/import/type/null/index.mjs +0 -27
- package/build/import/type/null/null.mjs +0 -27
- package/build/import/type/number/index.mjs +0 -27
- package/build/import/type/number/number.mjs +0 -27
- package/build/import/type/object/index.mjs +0 -27
- package/build/import/type/object/object.mjs +3 -30
- package/build/import/type/omit/index.mjs +0 -27
- package/build/import/type/omit/omit-from-mapped-key.mjs +0 -27
- package/build/import/type/omit/omit.mjs +6 -33
- package/build/import/type/operators/index.mjs +0 -27
- package/build/import/type/operators/operators.mjs +0 -27
- package/build/import/type/optional/index.mjs +0 -27
- package/build/import/type/optional/optional.mjs +0 -27
- package/build/import/type/parameters/index.mjs +0 -27
- package/build/import/type/parameters/parameters.mjs +0 -27
- package/build/import/type/partial/index.mjs +0 -27
- package/build/import/type/partial/partial-from-mapped-result.mjs +0 -27
- package/build/import/type/partial/partial.mjs +5 -32
- package/build/import/type/patterns/index.mjs +0 -27
- package/build/import/type/patterns/patterns.mjs +0 -27
- package/build/import/type/pick/index.mjs +0 -27
- package/build/import/type/pick/pick-from-mapped-key.mjs +0 -27
- package/build/import/type/pick/pick.mjs +6 -33
- package/build/import/type/promise/index.mjs +0 -27
- package/build/import/type/promise/promise.mjs +0 -27
- package/build/import/type/readonly/index.mjs +0 -27
- package/build/import/type/readonly/readonly.mjs +0 -27
- package/build/import/type/readonly-optional/index.mjs +0 -27
- package/build/import/type/readonly-optional/readonly-optional.mjs +0 -27
- package/build/import/type/record/index.mjs +0 -27
- package/build/import/type/record/record.d.mts +10 -9
- package/build/import/type/record/record.mjs +37 -60
- package/build/import/type/recursive/index.mjs +0 -27
- package/build/import/type/recursive/recursive.mjs +0 -27
- package/build/import/type/ref/index.mjs +0 -27
- package/build/import/type/ref/ref.mjs +0 -27
- package/build/import/type/regexp/index.mjs +0 -27
- package/build/import/type/regexp/regexp.mjs +0 -27
- package/build/import/type/registry/format.mjs +0 -27
- package/build/import/type/registry/index.mjs +0 -27
- package/build/import/type/registry/type.mjs +0 -27
- package/build/import/type/required/index.mjs +0 -27
- package/build/import/type/required/required-from-mapped-result.mjs +0 -27
- package/build/import/type/required/required.mjs +5 -32
- package/build/import/type/rest/index.mjs +0 -27
- package/build/import/type/rest/rest.mjs +6 -29
- package/build/import/type/return-type/index.mjs +0 -27
- package/build/import/type/return-type/return-type.mjs +0 -27
- package/build/import/type/schema/anyschema.mjs +0 -27
- package/build/import/type/schema/index.mjs +0 -27
- package/build/import/type/schema/schema.mjs +0 -27
- package/build/import/type/static/index.mjs +0 -27
- package/build/import/type/static/static.mjs +0 -27
- package/build/import/type/strict/index.mjs +0 -27
- package/build/import/type/strict/strict.mjs +0 -27
- package/build/import/type/string/index.mjs +0 -27
- package/build/import/type/string/string.mjs +0 -27
- package/build/import/type/symbol/index.mjs +0 -27
- package/build/import/type/symbol/symbol.mjs +0 -27
- package/build/import/type/symbols/index.mjs +0 -27
- package/build/import/type/symbols/symbols.mjs +0 -27
- package/build/import/type/template-literal/finite.mjs +0 -27
- package/build/import/type/template-literal/generate.mjs +0 -27
- package/build/import/type/template-literal/index.mjs +0 -27
- package/build/import/type/template-literal/parser.mjs +0 -27
- package/build/import/type/template-literal/pattern.mjs +9 -36
- package/build/import/type/template-literal/syntax.mjs +0 -27
- package/build/import/type/template-literal/template-literal.mjs +0 -27
- package/build/import/type/template-literal/union.mjs +0 -27
- package/build/import/type/transform/index.mjs +0 -27
- package/build/import/type/transform/transform.mjs +1 -28
- package/build/import/type/tuple/index.mjs +0 -27
- package/build/import/type/tuple/tuple.mjs +0 -27
- package/build/import/type/type/index.mjs +0 -27
- package/build/import/type/type/javascript.mjs +0 -27
- package/build/import/type/type/json.d.mts +2 -2
- package/build/import/type/type/json.mjs +0 -27
- package/build/import/type/type/type.mjs +0 -27
- package/build/import/type/uint8array/index.mjs +0 -27
- package/build/import/type/uint8array/uint8array.mjs +0 -27
- package/build/import/type/undefined/index.mjs +0 -27
- package/build/import/type/undefined/undefined.mjs +0 -27
- package/build/import/type/union/index.mjs +0 -27
- package/build/import/type/union/union-create.mjs +0 -27
- package/build/import/type/union/union-evaluated.mjs +2 -29
- package/build/import/type/union/union-type.mjs +0 -27
- package/build/import/type/union/union.mjs +0 -27
- package/build/import/type/unknown/index.mjs +0 -27
- package/build/import/type/unknown/unknown.mjs +0 -27
- package/build/import/type/unsafe/index.mjs +0 -27
- package/build/import/type/unsafe/unsafe.mjs +0 -27
- package/build/import/type/void/index.mjs +0 -27
- package/build/import/type/void/void.mjs +0 -27
- package/build/import/value/cast/cast.mjs +0 -27
- package/build/import/value/cast/index.mjs +0 -27
- package/build/import/value/check/check.mjs +18 -38
- package/build/import/value/check/index.mjs +0 -27
- package/build/import/value/clean/clean.mjs +9 -34
- package/build/import/value/clean/index.mjs +0 -27
- package/build/import/value/clone/clone.mjs +7 -31
- package/build/import/value/clone/index.mjs +0 -27
- package/build/import/value/convert/convert.mjs +6 -29
- package/build/import/value/convert/index.mjs +0 -27
- package/build/import/value/create/create.mjs +0 -27
- package/build/import/value/create/index.mjs +0 -27
- package/build/import/value/default/default.mjs +12 -31
- package/build/import/value/default/index.mjs +0 -27
- package/build/import/value/delta/delta.mjs +0 -27
- package/build/import/value/delta/index.mjs +0 -27
- package/build/import/value/deref/deref.mjs +0 -27
- package/build/import/value/deref/index.mjs +0 -27
- package/build/import/value/equal/equal.mjs +0 -27
- package/build/import/value/equal/index.mjs +0 -27
- package/build/import/value/guard/guard.mjs +0 -27
- package/build/import/value/guard/index.mjs +0 -27
- package/build/import/value/hash/hash.mjs +0 -27
- package/build/import/value/hash/index.mjs +0 -27
- package/build/import/value/index.mjs +0 -27
- package/build/import/value/mutate/index.mjs +0 -27
- package/build/import/value/mutate/mutate.mjs +0 -27
- package/build/import/value/pointer/index.mjs +0 -27
- package/build/import/value/pointer/pointer.mjs +0 -27
- package/build/import/value/transform/decode.mjs +12 -33
- package/build/import/value/transform/encode.mjs +12 -33
- package/build/import/value/transform/has.mjs +24 -45
- package/build/import/value/transform/index.mjs +0 -27
- package/build/import/value/value/index.mjs +0 -27
- package/build/import/value/value/value.mjs +0 -27
- package/build/require/compiler/compiler.js +77 -97
- package/build/require/compiler/index.js +0 -26
- package/build/require/errors/errors.js +58 -80
- package/build/require/errors/function.js +0 -26
- package/build/require/errors/index.js +0 -26
- package/build/require/index.js +0 -26
- package/build/require/system/index.js +0 -26
- package/build/require/system/policy.js +0 -26
- package/build/require/system/system.js +0 -26
- package/build/require/type/any/any.js +0 -26
- package/build/require/type/any/index.js +0 -26
- package/build/require/type/array/array.js +0 -26
- package/build/require/type/array/index.js +0 -26
- package/build/require/type/async-iterator/async-iterator.js +0 -26
- package/build/require/type/async-iterator/index.js +0 -26
- package/build/require/type/awaited/awaited.d.ts +6 -6
- package/build/require/type/awaited/awaited.js +14 -41
- package/build/require/type/awaited/index.js +0 -26
- package/build/require/type/bigint/bigint.js +0 -26
- package/build/require/type/bigint/index.js +0 -26
- package/build/require/type/boolean/boolean.js +0 -26
- package/build/require/type/boolean/index.js +0 -26
- package/build/require/type/clone/index.js +0 -26
- package/build/require/type/clone/type.js +0 -26
- package/build/require/type/clone/value.js +0 -26
- package/build/require/type/composite/composite.js +0 -26
- package/build/require/type/composite/index.js +0 -26
- package/build/require/type/const/const.js +0 -26
- package/build/require/type/const/index.js +0 -26
- package/build/require/type/constructor/constructor.js +0 -26
- package/build/require/type/constructor/index.js +0 -26
- package/build/require/type/constructor-parameters/constructor-parameters.js +0 -26
- package/build/require/type/constructor-parameters/index.js +0 -26
- package/build/require/type/date/date.js +0 -26
- package/build/require/type/date/index.js +0 -26
- package/build/require/type/deref/deref.js +11 -37
- package/build/require/type/deref/index.js +0 -26
- package/build/require/type/discard/discard.js +0 -26
- package/build/require/type/discard/index.js +0 -26
- package/build/require/type/enum/enum.js +0 -26
- package/build/require/type/enum/index.js +0 -26
- package/build/require/type/exclude/exclude-from-mapped-result.js +0 -26
- package/build/require/type/exclude/exclude.js +7 -30
- package/build/require/type/exclude/index.js +0 -26
- package/build/require/type/extends/extends-check.js +167 -193
- package/build/require/type/extends/extends-from-mapped-key.js +0 -26
- package/build/require/type/extends/extends-from-mapped-result.js +0 -26
- package/build/require/type/extends/extends-undefined.js +0 -26
- package/build/require/type/extends/extends.js +2 -28
- package/build/require/type/extends/index.js +0 -26
- package/build/require/type/extract/extract-from-mapped-result.js +0 -26
- package/build/require/type/extract/extract.js +4 -30
- package/build/require/type/extract/index.js +0 -26
- package/build/require/type/function/function.js +0 -26
- package/build/require/type/function/index.js +0 -26
- package/build/require/type/guard/index.js +0 -26
- package/build/require/type/guard/type.d.ts +50 -50
- package/build/require/type/guard/type.js +184 -210
- package/build/require/type/guard/value.js +0 -26
- package/build/require/type/helpers/helpers.js +0 -26
- package/build/require/type/helpers/index.js +0 -26
- package/build/require/type/index.js +0 -26
- package/build/require/type/indexed/index.d.ts +0 -1
- package/build/require/type/indexed/index.js +0 -27
- package/build/require/type/indexed/indexed-from-mapped-key.d.ts +2 -2
- package/build/require/type/indexed/indexed-from-mapped-key.js +2 -28
- package/build/require/type/indexed/indexed-property-keys.js +6 -32
- package/build/require/type/indexed/indexed.d.ts +38 -5
- package/build/require/type/indexed/indexed.js +78 -31
- package/build/require/type/instance-type/index.js +0 -26
- package/build/require/type/instance-type/instance-type.js +0 -26
- package/build/require/type/integer/index.js +0 -26
- package/build/require/type/integer/integer.js +0 -26
- package/build/require/type/intersect/index.js +0 -26
- package/build/require/type/intersect/intersect-create.js +3 -29
- package/build/require/type/intersect/intersect-evaluated.js +2 -28
- package/build/require/type/intersect/intersect-type.js +0 -26
- package/build/require/type/intersect/intersect.js +1 -27
- package/build/require/type/intrinsic/capitalize.js +0 -26
- package/build/require/type/intrinsic/index.js +0 -26
- package/build/require/type/intrinsic/intrinsic-from-mapped-key.js +0 -26
- package/build/require/type/intrinsic/intrinsic.js +4 -30
- package/build/require/type/intrinsic/lowercase.js +0 -26
- package/build/require/type/intrinsic/uncapitalize.js +0 -26
- package/build/require/type/intrinsic/uppercase.js +0 -26
- package/build/require/type/iterator/index.js +0 -26
- package/build/require/type/iterator/iterator.js +0 -26
- package/build/require/type/keyof/index.js +0 -26
- package/build/require/type/keyof/keyof-from-mapped-result.js +0 -26
- package/build/require/type/keyof/keyof-property-keys.js +6 -32
- package/build/require/type/keyof/keyof.js +1 -27
- package/build/require/type/literal/index.js +0 -26
- package/build/require/type/literal/literal.js +0 -26
- package/build/require/type/mapped/index.js +0 -26
- package/build/require/type/mapped/mapped-key.js +0 -26
- package/build/require/type/mapped/mapped-result.js +0 -26
- package/build/require/type/mapped/mapped.js +15 -41
- package/build/require/type/modifiers/index.js +0 -26
- package/build/require/type/modifiers/modifiers.js +2 -28
- package/build/require/type/never/index.js +0 -26
- package/build/require/type/never/never.js +0 -26
- package/build/require/type/not/index.js +0 -26
- package/build/require/type/not/not.js +0 -26
- package/build/require/type/null/index.js +0 -26
- package/build/require/type/null/null.js +0 -26
- package/build/require/type/number/index.js +0 -26
- package/build/require/type/number/number.js +0 -26
- package/build/require/type/object/index.js +0 -26
- package/build/require/type/object/object.js +2 -28
- package/build/require/type/omit/index.js +0 -26
- package/build/require/type/omit/omit-from-mapped-key.js +0 -26
- package/build/require/type/omit/omit.js +5 -31
- package/build/require/type/operators/index.js +0 -26
- package/build/require/type/operators/operators.js +0 -26
- package/build/require/type/optional/index.js +0 -26
- package/build/require/type/optional/optional.js +0 -26
- package/build/require/type/parameters/index.js +0 -26
- package/build/require/type/parameters/parameters.js +0 -26
- package/build/require/type/partial/index.js +0 -26
- package/build/require/type/partial/partial-from-mapped-result.js +0 -26
- package/build/require/type/partial/partial.js +4 -30
- package/build/require/type/patterns/index.js +0 -26
- package/build/require/type/patterns/patterns.js +0 -26
- package/build/require/type/pick/index.js +0 -26
- package/build/require/type/pick/pick-from-mapped-key.js +0 -26
- package/build/require/type/pick/pick.js +5 -31
- package/build/require/type/promise/index.js +0 -26
- package/build/require/type/promise/promise.js +0 -26
- package/build/require/type/readonly/index.js +0 -26
- package/build/require/type/readonly/readonly.js +0 -26
- package/build/require/type/readonly-optional/index.js +0 -26
- package/build/require/type/readonly-optional/readonly-optional.js +0 -26
- package/build/require/type/record/index.js +0 -26
- package/build/require/type/record/record.d.ts +10 -9
- package/build/require/type/record/record.js +36 -58
- package/build/require/type/recursive/index.js +0 -26
- package/build/require/type/recursive/recursive.js +0 -26
- package/build/require/type/ref/index.js +0 -26
- package/build/require/type/ref/ref.js +0 -26
- package/build/require/type/regexp/index.js +0 -26
- package/build/require/type/regexp/regexp.js +0 -26
- package/build/require/type/registry/format.js +0 -26
- package/build/require/type/registry/index.js +0 -26
- package/build/require/type/registry/type.js +0 -26
- package/build/require/type/required/index.js +0 -26
- package/build/require/type/required/required-from-mapped-result.js +0 -26
- package/build/require/type/required/required.js +4 -30
- package/build/require/type/rest/index.js +0 -26
- package/build/require/type/rest/rest.js +5 -27
- package/build/require/type/return-type/index.js +0 -26
- package/build/require/type/return-type/return-type.js +0 -26
- package/build/require/type/schema/anyschema.js +0 -26
- package/build/require/type/schema/index.js +0 -26
- package/build/require/type/schema/schema.js +0 -26
- package/build/require/type/static/index.js +0 -26
- package/build/require/type/static/static.js +0 -26
- package/build/require/type/strict/index.js +0 -26
- package/build/require/type/strict/strict.js +0 -26
- package/build/require/type/string/index.js +0 -26
- package/build/require/type/string/string.js +0 -26
- package/build/require/type/symbol/index.js +0 -26
- package/build/require/type/symbol/symbol.js +0 -26
- package/build/require/type/symbols/index.js +0 -26
- package/build/require/type/symbols/symbols.js +0 -26
- package/build/require/type/template-literal/finite.js +0 -26
- package/build/require/type/template-literal/generate.js +0 -26
- package/build/require/type/template-literal/index.js +0 -26
- package/build/require/type/template-literal/parser.js +0 -26
- package/build/require/type/template-literal/pattern.js +8 -34
- package/build/require/type/template-literal/syntax.js +0 -26
- package/build/require/type/template-literal/template-literal.js +0 -26
- package/build/require/type/template-literal/union.js +0 -26
- package/build/require/type/transform/index.js +0 -26
- package/build/require/type/transform/transform.js +1 -27
- package/build/require/type/tuple/index.js +0 -26
- package/build/require/type/tuple/tuple.js +0 -26
- package/build/require/type/type/index.js +0 -26
- package/build/require/type/type/javascript.js +0 -26
- package/build/require/type/type/json.d.ts +2 -2
- package/build/require/type/type/json.js +0 -26
- package/build/require/type/type/type.js +0 -26
- package/build/require/type/uint8array/index.js +0 -26
- package/build/require/type/uint8array/uint8array.js +0 -26
- package/build/require/type/undefined/index.js +0 -26
- package/build/require/type/undefined/undefined.js +0 -26
- package/build/require/type/union/index.js +0 -26
- package/build/require/type/union/union-create.js +0 -26
- package/build/require/type/union/union-evaluated.js +1 -27
- package/build/require/type/union/union-type.js +0 -26
- package/build/require/type/union/union.js +0 -26
- package/build/require/type/unknown/index.js +0 -26
- package/build/require/type/unknown/unknown.js +0 -26
- package/build/require/type/unsafe/index.js +0 -26
- package/build/require/type/unsafe/unsafe.js +0 -26
- package/build/require/type/void/index.js +0 -26
- package/build/require/type/void/void.js +0 -26
- package/build/require/value/cast/cast.js +0 -26
- package/build/require/value/cast/index.js +0 -26
- package/build/require/value/check/check.js +63 -82
- package/build/require/value/check/index.js +0 -26
- package/build/require/value/clean/clean.js +31 -55
- package/build/require/value/clean/index.js +0 -26
- package/build/require/value/clone/clone.js +7 -30
- package/build/require/value/clone/index.js +0 -26
- package/build/require/value/convert/convert.js +42 -64
- package/build/require/value/convert/index.js +0 -26
- package/build/require/value/create/create.js +0 -26
- package/build/require/value/create/index.js +0 -26
- package/build/require/value/default/default.js +24 -42
- package/build/require/value/default/index.js +0 -26
- package/build/require/value/delta/delta.js +0 -26
- package/build/require/value/delta/index.js +0 -26
- package/build/require/value/deref/deref.js +0 -26
- package/build/require/value/deref/index.js +0 -26
- package/build/require/value/equal/equal.js +0 -26
- package/build/require/value/equal/index.js +0 -26
- package/build/require/value/guard/guard.js +0 -26
- package/build/require/value/guard/index.js +0 -26
- package/build/require/value/hash/hash.js +0 -26
- package/build/require/value/hash/index.js +0 -26
- package/build/require/value/index.js +0 -26
- package/build/require/value/mutate/index.js +0 -26
- package/build/require/value/mutate/mutate.js +0 -26
- package/build/require/value/pointer/index.js +0 -26
- package/build/require/value/pointer/pointer.js +0 -26
- package/build/require/value/transform/decode.js +27 -47
- package/build/require/value/transform/encode.js +28 -48
- package/build/require/value/transform/has.js +29 -49
- package/build/require/value/transform/index.js +0 -26
- package/build/require/value/value/index.js +0 -26
- package/build/require/value/value/value.js +0 -26
- package/license +3 -1
- package/package.json +1 -1
- package/readme.md +7 -7
- package/build/import/type/indexed/indexed-result.d.mts +0 -33
- package/build/import/type/indexed/indexed-result.mjs +0 -107
- package/build/require/type/indexed/indexed-result.d.ts +0 -33
- package/build/require/type/indexed/indexed-result.js +0 -111
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
/*--------------------------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
@sinclair/typebox/type
|
|
4
|
-
|
|
5
|
-
The MIT License (MIT)
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
-
in the Software without restriction, including without limitation the rights
|
|
12
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
-
furnished to do so, subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in
|
|
17
|
-
all copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
-
THE SOFTWARE.
|
|
26
|
-
|
|
27
|
-
---------------------------------------------------------------------------*/
|
|
28
1
|
import { MappedResult } from '../mapped/index.mjs';
|
|
29
2
|
import { Literal } from '../literal/index.mjs';
|
|
30
3
|
import { Extends } from './extends.mjs';
|
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
/*--------------------------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
@sinclair/typebox/type
|
|
4
|
-
|
|
5
|
-
The MIT License (MIT)
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
-
in the Software without restriction, including without limitation the rights
|
|
12
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
-
furnished to do so, subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in
|
|
17
|
-
all copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
-
THE SOFTWARE.
|
|
26
|
-
|
|
27
|
-
---------------------------------------------------------------------------*/
|
|
28
1
|
import { MappedResult } from '../mapped/index.mjs';
|
|
29
2
|
import { Extends } from './extends.mjs';
|
|
30
3
|
// prettier-ignore
|
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
/*--------------------------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
@sinclair/typebox/type
|
|
4
|
-
|
|
5
|
-
The MIT License (MIT)
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
-
in the Software without restriction, including without limitation the rights
|
|
12
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
-
furnished to do so, subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in
|
|
17
|
-
all copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
-
THE SOFTWARE.
|
|
26
|
-
|
|
27
|
-
---------------------------------------------------------------------------*/
|
|
28
1
|
import { Kind } from '../symbols/index.mjs';
|
|
29
2
|
/** Fast undefined check used for properties of type undefined */
|
|
30
3
|
function Intersect(schema) {
|
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
/*--------------------------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
@sinclair/typebox/type
|
|
4
|
-
|
|
5
|
-
The MIT License (MIT)
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
-
in the Software without restriction, including without limitation the rights
|
|
12
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
-
furnished to do so, subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in
|
|
17
|
-
all copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
-
THE SOFTWARE.
|
|
26
|
-
|
|
27
|
-
---------------------------------------------------------------------------*/
|
|
28
1
|
import { Union } from '../union/index.mjs';
|
|
29
2
|
import { ExtendsCheck, ExtendsResult } from './extends-check.mjs';
|
|
30
3
|
import { CloneType } from '../clone/type.mjs';
|
|
@@ -34,7 +7,7 @@ import { ExtendsFromMappedResult } from './extends-from-mapped-result.mjs';
|
|
|
34
7
|
// TypeGuard
|
|
35
8
|
// ------------------------------------------------------------------
|
|
36
9
|
// prettier-ignore
|
|
37
|
-
import {
|
|
10
|
+
import { IsMappedKey, IsMappedResult } from '../guard/type.mjs';
|
|
38
11
|
// prettier-ignore
|
|
39
12
|
function ExtendsResolve(left, right, trueType, falseType) {
|
|
40
13
|
const R = ExtendsCheck(left, right);
|
|
@@ -45,7 +18,7 @@ function ExtendsResolve(left, right, trueType, falseType) {
|
|
|
45
18
|
/** `[Json]` Creates a Conditional type */
|
|
46
19
|
export function Extends(L, R, T, F, options = {}) {
|
|
47
20
|
// prettier-ignore
|
|
48
|
-
return (
|
|
49
|
-
|
|
21
|
+
return (IsMappedResult(L) ? ExtendsFromMappedResult(L, R, T, F, options) :
|
|
22
|
+
IsMappedKey(L) ? CloneType(ExtendsFromMappedKey(L, R, T, F, options)) :
|
|
50
23
|
CloneType(ExtendsResolve(L, R, T, F), options));
|
|
51
24
|
}
|
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
/*--------------------------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
@sinclair/typebox/type
|
|
4
|
-
|
|
5
|
-
The MIT License (MIT)
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
-
in the Software without restriction, including without limitation the rights
|
|
12
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
-
furnished to do so, subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in
|
|
17
|
-
all copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
-
THE SOFTWARE.
|
|
26
|
-
|
|
27
|
-
---------------------------------------------------------------------------*/
|
|
28
1
|
export * from './extends-check.mjs';
|
|
29
2
|
export * from './extends-from-mapped-key.mjs';
|
|
30
3
|
export * from './extends-from-mapped-result.mjs';
|
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
/*--------------------------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
@sinclair/typebox/type
|
|
4
|
-
|
|
5
|
-
The MIT License (MIT)
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
-
in the Software without restriction, including without limitation the rights
|
|
12
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
-
furnished to do so, subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in
|
|
17
|
-
all copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
-
THE SOFTWARE.
|
|
26
|
-
|
|
27
|
-
---------------------------------------------------------------------------*/
|
|
28
1
|
import { MappedResult } from '../mapped/index.mjs';
|
|
29
2
|
import { Extract } from './extract.mjs';
|
|
30
3
|
// prettier-ignore
|
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
/*--------------------------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
@sinclair/typebox/type
|
|
4
|
-
|
|
5
|
-
The MIT License (MIT)
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
-
in the Software without restriction, including without limitation the rights
|
|
12
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
-
furnished to do so, subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in
|
|
17
|
-
all copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
-
THE SOFTWARE.
|
|
26
|
-
|
|
27
|
-
---------------------------------------------------------------------------*/
|
|
28
1
|
import { TemplateLiteralToUnion } from '../template-literal/index.mjs';
|
|
29
2
|
import { Union } from '../union/index.mjs';
|
|
30
3
|
import { Never } from '../never/index.mjs';
|
|
@@ -32,12 +5,12 @@ import { ExtendsCheck, ExtendsResult } from '../extends/index.mjs';
|
|
|
32
5
|
import { CloneType } from '../clone/type.mjs';
|
|
33
6
|
import { ExtractFromMappedResult } from './extract-from-mapped-result.mjs';
|
|
34
7
|
// prettier-ignore
|
|
35
|
-
import {
|
|
8
|
+
import { IsMappedResult, IsTemplateLiteral, IsUnion } from '../guard/type.mjs';
|
|
36
9
|
// prettier-ignore
|
|
37
10
|
export function ExtractResolve(L, R) {
|
|
38
|
-
return (
|
|
39
|
-
|
|
40
|
-
|
|
11
|
+
return (IsTemplateLiteral(L) ? ExtractResolve(TemplateLiteralToUnion(L), R) :
|
|
12
|
+
IsTemplateLiteral(R) ? ExtractResolve(L, TemplateLiteralToUnion(R)) :
|
|
13
|
+
IsUnion(L) ? (() => {
|
|
41
14
|
const narrowed = L.anyOf.filter((inner) => ExtendsCheck(inner, R) !== ExtendsResult.False);
|
|
42
15
|
return (narrowed.length === 1 ? narrowed[0] : Union(narrowed));
|
|
43
16
|
})() :
|
|
@@ -46,7 +19,7 @@ export function ExtractResolve(L, R) {
|
|
|
46
19
|
}
|
|
47
20
|
/** `[Json]` Constructs a type by extracting from type all union members that are assignable to union */
|
|
48
21
|
export function Extract(type, union, options = {}) {
|
|
49
|
-
if (
|
|
22
|
+
if (IsMappedResult(type)) {
|
|
50
23
|
return ExtractFromMappedResult(type, union, options);
|
|
51
24
|
}
|
|
52
25
|
else {
|
|
@@ -1,29 +1,2 @@
|
|
|
1
|
-
/*--------------------------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
@sinclair/typebox/type
|
|
4
|
-
|
|
5
|
-
The MIT License (MIT)
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
-
in the Software without restriction, including without limitation the rights
|
|
12
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
-
furnished to do so, subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in
|
|
17
|
-
all copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
-
THE SOFTWARE.
|
|
26
|
-
|
|
27
|
-
---------------------------------------------------------------------------*/
|
|
28
1
|
export * from './extract-from-mapped-result.mjs';
|
|
29
2
|
export * from './extract.mjs';
|
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
/*--------------------------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
@sinclair/typebox/type
|
|
4
|
-
|
|
5
|
-
The MIT License (MIT)
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
-
in the Software without restriction, including without limitation the rights
|
|
12
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
-
furnished to do so, subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in
|
|
17
|
-
all copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
-
THE SOFTWARE.
|
|
26
|
-
|
|
27
|
-
---------------------------------------------------------------------------*/
|
|
28
1
|
import { CloneType, CloneRest } from '../clone/type.mjs';
|
|
29
2
|
import { Kind } from '../symbols/index.mjs';
|
|
30
3
|
/** `[JavaScript]` Creates a Function type */
|
|
@@ -1,28 +1 @@
|
|
|
1
|
-
/*--------------------------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
@sinclair/typebox/type
|
|
4
|
-
|
|
5
|
-
The MIT License (MIT)
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
-
in the Software without restriction, including without limitation the rights
|
|
12
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
-
furnished to do so, subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in
|
|
17
|
-
all copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
-
THE SOFTWARE.
|
|
26
|
-
|
|
27
|
-
---------------------------------------------------------------------------*/
|
|
28
1
|
export * from './function.mjs';
|
|
@@ -1,29 +1,2 @@
|
|
|
1
|
-
/*--------------------------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
@sinclair/typebox/type
|
|
4
|
-
|
|
5
|
-
The MIT License (MIT)
|
|
6
|
-
|
|
7
|
-
Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
|
|
8
|
-
|
|
9
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
-
in the Software without restriction, including without limitation the rights
|
|
12
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
-
furnished to do so, subject to the following conditions:
|
|
15
|
-
|
|
16
|
-
The above copyright notice and this permission notice shall be included in
|
|
17
|
-
all copies or substantial portions of the Software.
|
|
18
|
-
|
|
19
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
25
|
-
THE SOFTWARE.
|
|
26
|
-
|
|
27
|
-
---------------------------------------------------------------------------*/
|
|
28
1
|
export * as TypeGuard from './type.mjs';
|
|
29
2
|
export * as ValueGuard from './value.mjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Kind, Hint, TransformKind } from '../symbols/index.mjs';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import { TransformOptions } from '../transform/index.mjs';
|
|
3
|
+
import { TTemplateLiteral, TTemplateLiteralKind } from '../template-literal/index.mjs';
|
|
4
|
+
import { TArray } from '../array/index.mjs';
|
|
5
|
+
import { TBoolean } from '../boolean/index.mjs';
|
|
6
6
|
import type { TRecord } from '../record/index.mjs';
|
|
7
7
|
import type { TString } from '../string/index.mjs';
|
|
8
8
|
import type { TUnion } from '../union/index.mjs';
|
|
@@ -38,102 +38,102 @@ import type { TThis } from '../recursive/index.mjs';
|
|
|
38
38
|
export declare class TypeGuardUnknownTypeError extends Error {
|
|
39
39
|
}
|
|
40
40
|
/** Returns true if this value has a Readonly symbol */
|
|
41
|
-
export declare function
|
|
41
|
+
export declare function IsReadonly<T extends TSchema>(value: T): value is TReadonly<T>;
|
|
42
42
|
/** Returns true if this value has a Optional symbol */
|
|
43
|
-
export declare function
|
|
43
|
+
export declare function IsOptional<T extends TSchema>(value: T): value is TOptional<T>;
|
|
44
44
|
/** Returns true if the given value is TAny */
|
|
45
|
-
export declare function
|
|
45
|
+
export declare function IsAny(value: unknown): value is TAny;
|
|
46
46
|
/** Returns true if the given value is TArray */
|
|
47
|
-
export declare function
|
|
47
|
+
export declare function IsArray(value: unknown): value is TArray;
|
|
48
48
|
/** Returns true if the given value is TAsyncIterator */
|
|
49
|
-
export declare function
|
|
49
|
+
export declare function IsAsyncIterator(value: unknown): value is TAsyncIterator;
|
|
50
50
|
/** Returns true if the given value is TBigInt */
|
|
51
|
-
export declare function
|
|
51
|
+
export declare function IsBigInt(value: unknown): value is TBigInt;
|
|
52
52
|
/** Returns true if the given value is TBoolean */
|
|
53
|
-
export declare function
|
|
53
|
+
export declare function IsBoolean(value: unknown): value is TBoolean;
|
|
54
54
|
/** Returns true if the given value is TConstructor */
|
|
55
|
-
export declare function
|
|
55
|
+
export declare function IsConstructor(value: unknown): value is TConstructor;
|
|
56
56
|
/** Returns true if the given value is TDate */
|
|
57
|
-
export declare function
|
|
57
|
+
export declare function IsDate(value: unknown): value is TDate;
|
|
58
58
|
/** Returns true if the given value is TFunction */
|
|
59
|
-
export declare function
|
|
59
|
+
export declare function IsFunction(value: unknown): value is TFunction;
|
|
60
60
|
/** Returns true if the given value is TInteger */
|
|
61
|
-
export declare function
|
|
61
|
+
export declare function IsInteger(value: unknown): value is TInteger;
|
|
62
62
|
/** Returns true if the given schema is TProperties */
|
|
63
|
-
export declare function
|
|
63
|
+
export declare function IsProperties(value: unknown): value is TProperties;
|
|
64
64
|
/** Returns true if the given value is TIntersect */
|
|
65
|
-
export declare function
|
|
65
|
+
export declare function IsIntersect(value: unknown): value is TIntersect;
|
|
66
66
|
/** Returns true if the given value is TIterator */
|
|
67
|
-
export declare function
|
|
67
|
+
export declare function IsIterator(value: unknown): value is TIterator;
|
|
68
68
|
/** Returns true if the given value is a TKind with the given name. */
|
|
69
|
-
export declare function
|
|
69
|
+
export declare function IsKindOf<T extends string>(value: unknown, kind: T): value is Record<PropertyKey, unknown> & {
|
|
70
70
|
[Kind]: T;
|
|
71
71
|
};
|
|
72
72
|
/** Returns true if the given value is TLiteral<string> */
|
|
73
|
-
export declare function
|
|
73
|
+
export declare function IsLiteralString(value: unknown): value is TLiteral<string>;
|
|
74
74
|
/** Returns true if the given value is TLiteral<number> */
|
|
75
|
-
export declare function
|
|
75
|
+
export declare function IsLiteralNumber(value: unknown): value is TLiteral<number>;
|
|
76
76
|
/** Returns true if the given value is TLiteral<boolean> */
|
|
77
|
-
export declare function
|
|
77
|
+
export declare function IsLiteralBoolean(value: unknown): value is TLiteral<boolean>;
|
|
78
78
|
/** Returns true if the given value is TLiteral */
|
|
79
|
-
export declare function
|
|
79
|
+
export declare function IsLiteral(value: unknown): value is TLiteral;
|
|
80
80
|
/** Returns true if the given value is a TLiteralValue */
|
|
81
|
-
export declare function
|
|
81
|
+
export declare function IsLiteralValue(value: unknown): value is TLiteralValue;
|
|
82
82
|
/** Returns true if the given value is a TMappedKey */
|
|
83
|
-
export declare function
|
|
83
|
+
export declare function IsMappedKey(value: unknown): value is TMappedKey;
|
|
84
84
|
/** Returns true if the given value is TMappedResult */
|
|
85
|
-
export declare function
|
|
85
|
+
export declare function IsMappedResult(value: unknown): value is TMappedResult;
|
|
86
86
|
/** Returns true if the given value is TNever */
|
|
87
|
-
export declare function
|
|
87
|
+
export declare function IsNever(value: unknown): value is TNever;
|
|
88
88
|
/** Returns true if the given value is TNot */
|
|
89
|
-
export declare function
|
|
89
|
+
export declare function IsNot(value: unknown): value is TNot;
|
|
90
90
|
/** Returns true if the given value is TNull */
|
|
91
|
-
export declare function
|
|
91
|
+
export declare function IsNull(value: unknown): value is TNull;
|
|
92
92
|
/** Returns true if the given value is TNumber */
|
|
93
|
-
export declare function
|
|
93
|
+
export declare function IsNumber(value: unknown): value is TNumber;
|
|
94
94
|
/** Returns true if the given value is TObject */
|
|
95
|
-
export declare function
|
|
95
|
+
export declare function IsObject(value: unknown): value is TObject;
|
|
96
96
|
/** Returns true if the given value is TPromise */
|
|
97
|
-
export declare function
|
|
97
|
+
export declare function IsPromise(value: unknown): value is TPromise;
|
|
98
98
|
/** Returns true if the given value is TRecord */
|
|
99
|
-
export declare function
|
|
99
|
+
export declare function IsRecord(value: unknown): value is TRecord;
|
|
100
100
|
/** Returns true if this value is TRecursive */
|
|
101
|
-
export declare function
|
|
101
|
+
export declare function IsRecursive(value: unknown): value is {
|
|
102
102
|
[Hint]: 'Recursive';
|
|
103
103
|
};
|
|
104
104
|
/** Returns true if the given value is TRef */
|
|
105
|
-
export declare function
|
|
105
|
+
export declare function IsRef(value: unknown): value is TRef;
|
|
106
106
|
/** Returns true if the given value is TString */
|
|
107
|
-
export declare function
|
|
107
|
+
export declare function IsString(value: unknown): value is TString;
|
|
108
108
|
/** Returns true if the given value is TSymbol */
|
|
109
|
-
export declare function
|
|
109
|
+
export declare function IsSymbol(value: unknown): value is TSymbol;
|
|
110
110
|
/** Returns true if the given value is TTemplateLiteral */
|
|
111
|
-
export declare function
|
|
111
|
+
export declare function IsTemplateLiteral(value: unknown): value is TTemplateLiteral<TTemplateLiteralKind[]>;
|
|
112
112
|
/** Returns true if the given value is TThis */
|
|
113
|
-
export declare function
|
|
113
|
+
export declare function IsThis(value: unknown): value is TThis;
|
|
114
114
|
/** Returns true of this value is TTransform */
|
|
115
|
-
export declare function
|
|
115
|
+
export declare function IsTransform(value: unknown): value is {
|
|
116
116
|
[TransformKind]: TransformOptions;
|
|
117
117
|
};
|
|
118
118
|
/** Returns true if the given value is TTuple */
|
|
119
|
-
export declare function
|
|
119
|
+
export declare function IsTuple(value: unknown): value is TTuple;
|
|
120
120
|
/** Returns true if the given value is TUndefined */
|
|
121
|
-
export declare function
|
|
121
|
+
export declare function IsUndefined(value: unknown): value is TUndefined;
|
|
122
122
|
/** Returns true if the given value is TUnion<Literal<string | number>[]> */
|
|
123
|
-
export declare function
|
|
123
|
+
export declare function IsUnionLiteral(value: unknown): value is TUnion<TLiteral[]>;
|
|
124
124
|
/** Returns true if the given value is TUnion */
|
|
125
|
-
export declare function
|
|
125
|
+
export declare function IsUnion(value: unknown): value is TUnion;
|
|
126
126
|
/** Returns true if the given value is TUint8Array */
|
|
127
|
-
export declare function
|
|
127
|
+
export declare function IsUint8Array(value: unknown): value is TUint8Array;
|
|
128
128
|
/** Returns true if the given value is TUnknown */
|
|
129
|
-
export declare function
|
|
129
|
+
export declare function IsUnknown(value: unknown): value is TUnknown;
|
|
130
130
|
/** Returns true if the given value is a raw TUnsafe */
|
|
131
|
-
export declare function
|
|
131
|
+
export declare function IsUnsafe(value: unknown): value is TUnsafe<unknown>;
|
|
132
132
|
/** Returns true if the given value is TVoid */
|
|
133
|
-
export declare function
|
|
133
|
+
export declare function IsVoid(value: unknown): value is TVoid;
|
|
134
134
|
/** Returns true if the given value is TKind */
|
|
135
|
-
export declare function
|
|
135
|
+
export declare function IsKind(value: unknown): value is Record<PropertyKey, unknown> & {
|
|
136
136
|
[Kind]: string;
|
|
137
137
|
};
|
|
138
138
|
/** Returns true if the given value is TSchema */
|
|
139
|
-
export declare function
|
|
139
|
+
export declare function IsSchema(value: unknown): value is TSchema;
|