@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,31 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/*--------------------------------------------------------------------------
|
|
3
2
|
|
|
4
|
-
@sinclair/typebox/type
|
|
5
|
-
|
|
6
|
-
The MIT License (MIT)
|
|
7
|
-
|
|
8
|
-
Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
-
in the Software without restriction, including without limitation the rights
|
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
-
furnished to do so, subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in
|
|
18
|
-
all copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
26
|
-
THE SOFTWARE.
|
|
27
|
-
|
|
28
|
-
---------------------------------------------------------------------------*/
|
|
29
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
4
|
exports.ExtendsCheck = exports.ExtendsResult = exports.ExtendsResolverError = void 0;
|
|
31
5
|
const index_1 = require("../any/index");
|
|
@@ -65,19 +39,19 @@ function Throw(message) {
|
|
|
65
39
|
// ------------------------------------------------------------------
|
|
66
40
|
// prettier-ignore
|
|
67
41
|
function IsStructuralRight(right) {
|
|
68
|
-
return (index_9.TypeGuard.
|
|
69
|
-
index_9.TypeGuard.
|
|
70
|
-
index_9.TypeGuard.
|
|
71
|
-
index_9.TypeGuard.
|
|
72
|
-
index_9.TypeGuard.
|
|
42
|
+
return (index_9.TypeGuard.IsNever(right) ||
|
|
43
|
+
index_9.TypeGuard.IsIntersect(right) ||
|
|
44
|
+
index_9.TypeGuard.IsUnion(right) ||
|
|
45
|
+
index_9.TypeGuard.IsUnknown(right) ||
|
|
46
|
+
index_9.TypeGuard.IsAny(right));
|
|
73
47
|
}
|
|
74
48
|
// prettier-ignore
|
|
75
49
|
function StructuralRight(left, right) {
|
|
76
|
-
return (index_9.TypeGuard.
|
|
77
|
-
index_9.TypeGuard.
|
|
78
|
-
index_9.TypeGuard.
|
|
79
|
-
index_9.TypeGuard.
|
|
80
|
-
index_9.TypeGuard.
|
|
50
|
+
return (index_9.TypeGuard.IsNever(right) ? TNeverRight(left, right) :
|
|
51
|
+
index_9.TypeGuard.IsIntersect(right) ? TIntersectRight(left, right) :
|
|
52
|
+
index_9.TypeGuard.IsUnion(right) ? TUnionRight(left, right) :
|
|
53
|
+
index_9.TypeGuard.IsUnknown(right) ? TUnknownRight(left, right) :
|
|
54
|
+
index_9.TypeGuard.IsAny(right) ? TAnyRight(left, right) :
|
|
81
55
|
Throw('StructuralRight'));
|
|
82
56
|
}
|
|
83
57
|
// ------------------------------------------------------------------
|
|
@@ -89,11 +63,11 @@ function TAnyRight(left, right) {
|
|
|
89
63
|
}
|
|
90
64
|
// prettier-ignore
|
|
91
65
|
function TAny(left, right) {
|
|
92
|
-
return (index_9.TypeGuard.
|
|
93
|
-
(index_9.TypeGuard.
|
|
94
|
-
index_9.TypeGuard.
|
|
95
|
-
index_9.TypeGuard.
|
|
96
|
-
index_9.TypeGuard.
|
|
66
|
+
return (index_9.TypeGuard.IsIntersect(right) ? TIntersectRight(left, right) :
|
|
67
|
+
(index_9.TypeGuard.IsUnion(right) && right.anyOf.some((schema) => index_9.TypeGuard.IsAny(schema) || index_9.TypeGuard.IsUnknown(schema))) ? ExtendsResult.True :
|
|
68
|
+
index_9.TypeGuard.IsUnion(right) ? ExtendsResult.Union :
|
|
69
|
+
index_9.TypeGuard.IsUnknown(right) ? ExtendsResult.True :
|
|
70
|
+
index_9.TypeGuard.IsAny(right) ? ExtendsResult.True :
|
|
97
71
|
ExtendsResult.Union);
|
|
98
72
|
}
|
|
99
73
|
// ------------------------------------------------------------------
|
|
@@ -101,16 +75,16 @@ function TAny(left, right) {
|
|
|
101
75
|
// ------------------------------------------------------------------
|
|
102
76
|
// prettier-ignore
|
|
103
77
|
function TArrayRight(left, right) {
|
|
104
|
-
return (index_9.TypeGuard.
|
|
105
|
-
index_9.TypeGuard.
|
|
106
|
-
index_9.TypeGuard.
|
|
78
|
+
return (index_9.TypeGuard.IsUnknown(left) ? ExtendsResult.False :
|
|
79
|
+
index_9.TypeGuard.IsAny(left) ? ExtendsResult.Union :
|
|
80
|
+
index_9.TypeGuard.IsNever(left) ? ExtendsResult.True :
|
|
107
81
|
ExtendsResult.False);
|
|
108
82
|
}
|
|
109
83
|
// prettier-ignore
|
|
110
84
|
function TArray(left, right) {
|
|
111
|
-
return (index_9.TypeGuard.
|
|
85
|
+
return (index_9.TypeGuard.IsObject(right) && IsObjectArrayLike(right) ? ExtendsResult.True :
|
|
112
86
|
IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
113
|
-
!index_9.TypeGuard.
|
|
87
|
+
!index_9.TypeGuard.IsArray(right) ? ExtendsResult.False :
|
|
114
88
|
IntoBooleanResult(Visit(left.items, right.items)));
|
|
115
89
|
}
|
|
116
90
|
// ------------------------------------------------------------------
|
|
@@ -119,7 +93,7 @@ function TArray(left, right) {
|
|
|
119
93
|
// prettier-ignore
|
|
120
94
|
function TAsyncIterator(left, right) {
|
|
121
95
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
122
|
-
!index_9.TypeGuard.
|
|
96
|
+
!index_9.TypeGuard.IsAsyncIterator(right) ? ExtendsResult.False :
|
|
123
97
|
IntoBooleanResult(Visit(left.items, right.items)));
|
|
124
98
|
}
|
|
125
99
|
// ------------------------------------------------------------------
|
|
@@ -128,9 +102,9 @@ function TAsyncIterator(left, right) {
|
|
|
128
102
|
// prettier-ignore
|
|
129
103
|
function TBigInt(left, right) {
|
|
130
104
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
131
|
-
index_9.TypeGuard.
|
|
132
|
-
index_9.TypeGuard.
|
|
133
|
-
index_9.TypeGuard.
|
|
105
|
+
index_9.TypeGuard.IsObject(right) ? TObjectRight(left, right) :
|
|
106
|
+
index_9.TypeGuard.IsRecord(right) ? TRecordRight(left, right) :
|
|
107
|
+
index_9.TypeGuard.IsBigInt(right) ? ExtendsResult.True :
|
|
134
108
|
ExtendsResult.False);
|
|
135
109
|
}
|
|
136
110
|
// ------------------------------------------------------------------
|
|
@@ -138,16 +112,16 @@ function TBigInt(left, right) {
|
|
|
138
112
|
// ------------------------------------------------------------------
|
|
139
113
|
// prettier-ignore
|
|
140
114
|
function TBooleanRight(left, right) {
|
|
141
|
-
return (index_9.TypeGuard.
|
|
142
|
-
index_9.TypeGuard.
|
|
115
|
+
return (index_9.TypeGuard.IsLiteralBoolean(left) ? ExtendsResult.True :
|
|
116
|
+
index_9.TypeGuard.IsBoolean(left) ? ExtendsResult.True :
|
|
143
117
|
ExtendsResult.False);
|
|
144
118
|
}
|
|
145
119
|
// prettier-ignore
|
|
146
120
|
function TBoolean(left, right) {
|
|
147
121
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
148
|
-
index_9.TypeGuard.
|
|
149
|
-
index_9.TypeGuard.
|
|
150
|
-
index_9.TypeGuard.
|
|
122
|
+
index_9.TypeGuard.IsObject(right) ? TObjectRight(left, right) :
|
|
123
|
+
index_9.TypeGuard.IsRecord(right) ? TRecordRight(left, right) :
|
|
124
|
+
index_9.TypeGuard.IsBoolean(right) ? ExtendsResult.True :
|
|
151
125
|
ExtendsResult.False);
|
|
152
126
|
}
|
|
153
127
|
// ------------------------------------------------------------------
|
|
@@ -156,8 +130,8 @@ function TBoolean(left, right) {
|
|
|
156
130
|
// prettier-ignore
|
|
157
131
|
function TConstructor(left, right) {
|
|
158
132
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
159
|
-
index_9.TypeGuard.
|
|
160
|
-
!index_9.TypeGuard.
|
|
133
|
+
index_9.TypeGuard.IsObject(right) ? TObjectRight(left, right) :
|
|
134
|
+
!index_9.TypeGuard.IsConstructor(right) ? ExtendsResult.False :
|
|
161
135
|
left.parameters.length > right.parameters.length ? ExtendsResult.False :
|
|
162
136
|
(!left.parameters.every((schema, index) => IntoBooleanResult(Visit(right.parameters[index], schema)) === ExtendsResult.True)) ? ExtendsResult.False :
|
|
163
137
|
IntoBooleanResult(Visit(left.returns, right.returns)));
|
|
@@ -168,9 +142,9 @@ function TConstructor(left, right) {
|
|
|
168
142
|
// prettier-ignore
|
|
169
143
|
function TDate(left, right) {
|
|
170
144
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
171
|
-
index_9.TypeGuard.
|
|
172
|
-
index_9.TypeGuard.
|
|
173
|
-
index_9.TypeGuard.
|
|
145
|
+
index_9.TypeGuard.IsObject(right) ? TObjectRight(left, right) :
|
|
146
|
+
index_9.TypeGuard.IsRecord(right) ? TRecordRight(left, right) :
|
|
147
|
+
index_9.TypeGuard.IsDate(right) ? ExtendsResult.True :
|
|
174
148
|
ExtendsResult.False);
|
|
175
149
|
}
|
|
176
150
|
// ------------------------------------------------------------------
|
|
@@ -179,8 +153,8 @@ function TDate(left, right) {
|
|
|
179
153
|
// prettier-ignore
|
|
180
154
|
function TFunction(left, right) {
|
|
181
155
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
182
|
-
index_9.TypeGuard.
|
|
183
|
-
!index_9.TypeGuard.
|
|
156
|
+
index_9.TypeGuard.IsObject(right) ? TObjectRight(left, right) :
|
|
157
|
+
!index_9.TypeGuard.IsFunction(right) ? ExtendsResult.False :
|
|
184
158
|
left.parameters.length > right.parameters.length ? ExtendsResult.False :
|
|
185
159
|
(!left.parameters.every((schema, index) => IntoBooleanResult(Visit(right.parameters[index], schema)) === ExtendsResult.True)) ? ExtendsResult.False :
|
|
186
160
|
IntoBooleanResult(Visit(left.returns, right.returns)));
|
|
@@ -190,16 +164,16 @@ function TFunction(left, right) {
|
|
|
190
164
|
// ------------------------------------------------------------------
|
|
191
165
|
// prettier-ignore
|
|
192
166
|
function TIntegerRight(left, right) {
|
|
193
|
-
return (index_9.TypeGuard.
|
|
194
|
-
index_9.TypeGuard.
|
|
167
|
+
return (index_9.TypeGuard.IsLiteral(left) && index_9.ValueGuard.IsNumber(left.const) ? ExtendsResult.True :
|
|
168
|
+
index_9.TypeGuard.IsNumber(left) || index_9.TypeGuard.IsInteger(left) ? ExtendsResult.True :
|
|
195
169
|
ExtendsResult.False);
|
|
196
170
|
}
|
|
197
171
|
// prettier-ignore
|
|
198
172
|
function TInteger(left, right) {
|
|
199
|
-
return (index_9.TypeGuard.
|
|
173
|
+
return (index_9.TypeGuard.IsInteger(right) || index_9.TypeGuard.IsNumber(right) ? ExtendsResult.True :
|
|
200
174
|
IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
201
|
-
index_9.TypeGuard.
|
|
202
|
-
index_9.TypeGuard.
|
|
175
|
+
index_9.TypeGuard.IsObject(right) ? TObjectRight(left, right) :
|
|
176
|
+
index_9.TypeGuard.IsRecord(right) ? TRecordRight(left, right) :
|
|
203
177
|
ExtendsResult.False);
|
|
204
178
|
}
|
|
205
179
|
// ------------------------------------------------------------------
|
|
@@ -223,7 +197,7 @@ function TIntersect(left, right) {
|
|
|
223
197
|
// prettier-ignore
|
|
224
198
|
function TIterator(left, right) {
|
|
225
199
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
226
|
-
!index_9.TypeGuard.
|
|
200
|
+
!index_9.TypeGuard.IsIterator(right) ? ExtendsResult.False :
|
|
227
201
|
IntoBooleanResult(Visit(left.items, right.items)));
|
|
228
202
|
}
|
|
229
203
|
// ------------------------------------------------------------------
|
|
@@ -231,14 +205,14 @@ function TIterator(left, right) {
|
|
|
231
205
|
// ------------------------------------------------------------------
|
|
232
206
|
// prettier-ignore
|
|
233
207
|
function TLiteral(left, right) {
|
|
234
|
-
return (index_9.TypeGuard.
|
|
208
|
+
return (index_9.TypeGuard.IsLiteral(right) && right.const === left.const ? ExtendsResult.True :
|
|
235
209
|
IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
236
|
-
index_9.TypeGuard.
|
|
237
|
-
index_9.TypeGuard.
|
|
238
|
-
index_9.TypeGuard.
|
|
239
|
-
index_9.TypeGuard.
|
|
240
|
-
index_9.TypeGuard.
|
|
241
|
-
index_9.TypeGuard.
|
|
210
|
+
index_9.TypeGuard.IsObject(right) ? TObjectRight(left, right) :
|
|
211
|
+
index_9.TypeGuard.IsRecord(right) ? TRecordRight(left, right) :
|
|
212
|
+
index_9.TypeGuard.IsString(right) ? TStringRight(left, right) :
|
|
213
|
+
index_9.TypeGuard.IsNumber(right) ? TNumberRight(left, right) :
|
|
214
|
+
index_9.TypeGuard.IsInteger(right) ? TIntegerRight(left, right) :
|
|
215
|
+
index_9.TypeGuard.IsBoolean(right) ? TBooleanRight(left, right) :
|
|
242
216
|
ExtendsResult.False);
|
|
243
217
|
}
|
|
244
218
|
// ------------------------------------------------------------------
|
|
@@ -259,7 +233,7 @@ function TNever(left, right) {
|
|
|
259
233
|
function UnwrapTNot(schema) {
|
|
260
234
|
let [current, depth] = [schema, 0];
|
|
261
235
|
while (true) {
|
|
262
|
-
if (!index_9.TypeGuard.
|
|
236
|
+
if (!index_9.TypeGuard.IsNot(current))
|
|
263
237
|
break;
|
|
264
238
|
current = current.not;
|
|
265
239
|
depth += 1;
|
|
@@ -272,8 +246,8 @@ function TNot(left, right) {
|
|
|
272
246
|
// type at runtime would put TypeBox at odds with TypeScripts ability to statically infer
|
|
273
247
|
// the type. Instead we unwrap to either unknown or T and continue evaluating.
|
|
274
248
|
// prettier-ignore
|
|
275
|
-
return (index_9.TypeGuard.
|
|
276
|
-
index_9.TypeGuard.
|
|
249
|
+
return (index_9.TypeGuard.IsNot(left) ? Visit(UnwrapTNot(left), right) :
|
|
250
|
+
index_9.TypeGuard.IsNot(right) ? Visit(left, UnwrapTNot(right)) :
|
|
277
251
|
Throw('Invalid fallthrough for Not'));
|
|
278
252
|
}
|
|
279
253
|
// ------------------------------------------------------------------
|
|
@@ -282,9 +256,9 @@ function TNot(left, right) {
|
|
|
282
256
|
// prettier-ignore
|
|
283
257
|
function TNull(left, right) {
|
|
284
258
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
285
|
-
index_9.TypeGuard.
|
|
286
|
-
index_9.TypeGuard.
|
|
287
|
-
index_9.TypeGuard.
|
|
259
|
+
index_9.TypeGuard.IsObject(right) ? TObjectRight(left, right) :
|
|
260
|
+
index_9.TypeGuard.IsRecord(right) ? TRecordRight(left, right) :
|
|
261
|
+
index_9.TypeGuard.IsNull(right) ? ExtendsResult.True :
|
|
288
262
|
ExtendsResult.False);
|
|
289
263
|
}
|
|
290
264
|
// ------------------------------------------------------------------
|
|
@@ -292,16 +266,16 @@ function TNull(left, right) {
|
|
|
292
266
|
// ------------------------------------------------------------------
|
|
293
267
|
// prettier-ignore
|
|
294
268
|
function TNumberRight(left, right) {
|
|
295
|
-
return (index_9.TypeGuard.
|
|
296
|
-
index_9.TypeGuard.
|
|
269
|
+
return (index_9.TypeGuard.IsLiteralNumber(left) ? ExtendsResult.True :
|
|
270
|
+
index_9.TypeGuard.IsNumber(left) || index_9.TypeGuard.IsInteger(left) ? ExtendsResult.True :
|
|
297
271
|
ExtendsResult.False);
|
|
298
272
|
}
|
|
299
273
|
// prettier-ignore
|
|
300
274
|
function TNumber(left, right) {
|
|
301
275
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
302
|
-
index_9.TypeGuard.
|
|
303
|
-
index_9.TypeGuard.
|
|
304
|
-
index_9.TypeGuard.
|
|
276
|
+
index_9.TypeGuard.IsObject(right) ? TObjectRight(left, right) :
|
|
277
|
+
index_9.TypeGuard.IsRecord(right) ? TRecordRight(left, right) :
|
|
278
|
+
index_9.TypeGuard.IsInteger(right) || index_9.TypeGuard.IsNumber(right) ? ExtendsResult.True :
|
|
305
279
|
ExtendsResult.False);
|
|
306
280
|
}
|
|
307
281
|
// ------------------------------------------------------------------
|
|
@@ -317,9 +291,9 @@ function IsObjectStringLike(schema) {
|
|
|
317
291
|
}
|
|
318
292
|
// prettier-ignore
|
|
319
293
|
function IsObjectSymbolLike(schema) {
|
|
320
|
-
return IsObjectPropertyCount(schema, 0) || (IsObjectPropertyCount(schema, 1) && 'description' in schema.properties && index_9.TypeGuard.
|
|
321
|
-
index_9.TypeGuard.
|
|
322
|
-
index_9.TypeGuard.
|
|
294
|
+
return IsObjectPropertyCount(schema, 0) || (IsObjectPropertyCount(schema, 1) && 'description' in schema.properties && index_9.TypeGuard.IsUnion(schema.properties.description) && schema.properties.description.anyOf.length === 2 && ((index_9.TypeGuard.IsString(schema.properties.description.anyOf[0]) &&
|
|
295
|
+
index_9.TypeGuard.IsUndefined(schema.properties.description.anyOf[1])) || (index_9.TypeGuard.IsString(schema.properties.description.anyOf[1]) &&
|
|
296
|
+
index_9.TypeGuard.IsUndefined(schema.properties.description.anyOf[0]))));
|
|
323
297
|
}
|
|
324
298
|
// prettier-ignore
|
|
325
299
|
function IsObjectNumberLike(schema) {
|
|
@@ -366,33 +340,33 @@ function IsObjectPromiseLike(schema) {
|
|
|
366
340
|
// prettier-ignore
|
|
367
341
|
function Property(left, right) {
|
|
368
342
|
return (Visit(left, right) === ExtendsResult.False ? ExtendsResult.False :
|
|
369
|
-
index_9.TypeGuard.
|
|
343
|
+
index_9.TypeGuard.IsOptional(left) && !index_9.TypeGuard.IsOptional(right) ? ExtendsResult.False :
|
|
370
344
|
ExtendsResult.True);
|
|
371
345
|
}
|
|
372
346
|
// prettier-ignore
|
|
373
347
|
function TObjectRight(left, right) {
|
|
374
|
-
return (index_9.TypeGuard.
|
|
375
|
-
index_9.TypeGuard.
|
|
376
|
-
(index_9.TypeGuard.
|
|
377
|
-
(index_9.TypeGuard.
|
|
378
|
-
(index_9.TypeGuard.
|
|
379
|
-
(index_9.TypeGuard.
|
|
380
|
-
(index_9.TypeGuard.
|
|
381
|
-
(index_9.TypeGuard.
|
|
382
|
-
(index_9.TypeGuard.
|
|
383
|
-
(index_9.TypeGuard.
|
|
384
|
-
(index_9.TypeGuard.
|
|
385
|
-
(index_9.TypeGuard.
|
|
386
|
-
(index_9.TypeGuard.
|
|
387
|
-
(index_9.TypeGuard.
|
|
388
|
-
(index_9.TypeGuard.
|
|
389
|
-
(index_9.TypeGuard.
|
|
390
|
-
(index_9.TypeGuard.
|
|
348
|
+
return (index_9.TypeGuard.IsUnknown(left) ? ExtendsResult.False :
|
|
349
|
+
index_9.TypeGuard.IsAny(left) ? ExtendsResult.Union : (index_9.TypeGuard.IsNever(left) ||
|
|
350
|
+
(index_9.TypeGuard.IsLiteralString(left) && IsObjectStringLike(right)) ||
|
|
351
|
+
(index_9.TypeGuard.IsLiteralNumber(left) && IsObjectNumberLike(right)) ||
|
|
352
|
+
(index_9.TypeGuard.IsLiteralBoolean(left) && IsObjectBooleanLike(right)) ||
|
|
353
|
+
(index_9.TypeGuard.IsSymbol(left) && IsObjectSymbolLike(right)) ||
|
|
354
|
+
(index_9.TypeGuard.IsBigInt(left) && IsObjectBigIntLike(right)) ||
|
|
355
|
+
(index_9.TypeGuard.IsString(left) && IsObjectStringLike(right)) ||
|
|
356
|
+
(index_9.TypeGuard.IsSymbol(left) && IsObjectSymbolLike(right)) ||
|
|
357
|
+
(index_9.TypeGuard.IsNumber(left) && IsObjectNumberLike(right)) ||
|
|
358
|
+
(index_9.TypeGuard.IsInteger(left) && IsObjectNumberLike(right)) ||
|
|
359
|
+
(index_9.TypeGuard.IsBoolean(left) && IsObjectBooleanLike(right)) ||
|
|
360
|
+
(index_9.TypeGuard.IsUint8Array(left) && IsObjectUint8ArrayLike(right)) ||
|
|
361
|
+
(index_9.TypeGuard.IsDate(left) && IsObjectDateLike(right)) ||
|
|
362
|
+
(index_9.TypeGuard.IsConstructor(left) && IsObjectConstructorLike(right)) ||
|
|
363
|
+
(index_9.TypeGuard.IsFunction(left) && IsObjectFunctionLike(right))) ? ExtendsResult.True :
|
|
364
|
+
(index_9.TypeGuard.IsRecord(left) && index_9.TypeGuard.IsString(RecordKey(left))) ? (() => {
|
|
391
365
|
// When expressing a Record with literal key values, the Record is converted into a Object with
|
|
392
366
|
// the Hint assigned as `Record`. This is used to invert the extends logic.
|
|
393
367
|
return right[index_8.Hint] === 'Record' ? ExtendsResult.True : ExtendsResult.False;
|
|
394
368
|
})() :
|
|
395
|
-
(index_9.TypeGuard.
|
|
369
|
+
(index_9.TypeGuard.IsRecord(left) && index_9.TypeGuard.IsNumber(RecordKey(left))) ? (() => {
|
|
396
370
|
return IsObjectPropertyCount(right, 0) ? ExtendsResult.True : ExtendsResult.False;
|
|
397
371
|
})() :
|
|
398
372
|
ExtendsResult.False);
|
|
@@ -400,14 +374,14 @@ function TObjectRight(left, right) {
|
|
|
400
374
|
// prettier-ignore
|
|
401
375
|
function TObject(left, right) {
|
|
402
376
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
403
|
-
index_9.TypeGuard.
|
|
404
|
-
!index_9.TypeGuard.
|
|
377
|
+
index_9.TypeGuard.IsRecord(right) ? TRecordRight(left, right) :
|
|
378
|
+
!index_9.TypeGuard.IsObject(right) ? ExtendsResult.False :
|
|
405
379
|
(() => {
|
|
406
380
|
for (const key of Object.getOwnPropertyNames(right.properties)) {
|
|
407
|
-
if (!(key in left.properties) && !index_9.TypeGuard.
|
|
381
|
+
if (!(key in left.properties) && !index_9.TypeGuard.IsOptional(right.properties[key])) {
|
|
408
382
|
return ExtendsResult.False;
|
|
409
383
|
}
|
|
410
|
-
if (index_9.TypeGuard.
|
|
384
|
+
if (index_9.TypeGuard.IsOptional(right.properties[key])) {
|
|
411
385
|
return ExtendsResult.True;
|
|
412
386
|
}
|
|
413
387
|
if (Property(left.properties[key], right.properties[key]) === ExtendsResult.False) {
|
|
@@ -423,8 +397,8 @@ function TObject(left, right) {
|
|
|
423
397
|
// prettier-ignore
|
|
424
398
|
function TPromise(left, right) {
|
|
425
399
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
426
|
-
index_9.TypeGuard.
|
|
427
|
-
!index_9.TypeGuard.
|
|
400
|
+
index_9.TypeGuard.IsObject(right) && IsObjectPromiseLike(right) ? ExtendsResult.True :
|
|
401
|
+
!index_9.TypeGuard.IsPromise(right) ? ExtendsResult.False :
|
|
428
402
|
IntoBooleanResult(Visit(left.item, right.item)));
|
|
429
403
|
}
|
|
430
404
|
// ------------------------------------------------------------------
|
|
@@ -445,11 +419,11 @@ function RecordValue(schema) {
|
|
|
445
419
|
// prettier-ignore
|
|
446
420
|
function TRecordRight(left, right) {
|
|
447
421
|
const [Key, Value] = [RecordKey(right), RecordValue(right)];
|
|
448
|
-
return ((index_9.TypeGuard.
|
|
449
|
-
index_9.TypeGuard.
|
|
450
|
-
index_9.TypeGuard.
|
|
451
|
-
index_9.TypeGuard.
|
|
452
|
-
index_9.TypeGuard.
|
|
422
|
+
return ((index_9.TypeGuard.IsLiteralString(left) && index_9.TypeGuard.IsNumber(Key) && IntoBooleanResult(Visit(left, Value)) === ExtendsResult.True) ? ExtendsResult.True :
|
|
423
|
+
index_9.TypeGuard.IsUint8Array(left) && index_9.TypeGuard.IsNumber(Key) ? Visit(left, Value) :
|
|
424
|
+
index_9.TypeGuard.IsString(left) && index_9.TypeGuard.IsNumber(Key) ? Visit(left, Value) :
|
|
425
|
+
index_9.TypeGuard.IsArray(left) && index_9.TypeGuard.IsNumber(Key) ? Visit(left, Value) :
|
|
426
|
+
index_9.TypeGuard.IsObject(left) ? (() => {
|
|
453
427
|
for (const key of Object.getOwnPropertyNames(left.properties)) {
|
|
454
428
|
if (Property(Value, left.properties[key]) === ExtendsResult.False) {
|
|
455
429
|
return ExtendsResult.False;
|
|
@@ -462,8 +436,8 @@ function TRecordRight(left, right) {
|
|
|
462
436
|
// prettier-ignore
|
|
463
437
|
function TRecord(left, right) {
|
|
464
438
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
465
|
-
index_9.TypeGuard.
|
|
466
|
-
!index_9.TypeGuard.
|
|
439
|
+
index_9.TypeGuard.IsObject(right) ? TObjectRight(left, right) :
|
|
440
|
+
!index_9.TypeGuard.IsRecord(right) ? ExtendsResult.False :
|
|
467
441
|
Visit(RecordValue(left), RecordValue(right)));
|
|
468
442
|
}
|
|
469
443
|
// ------------------------------------------------------------------
|
|
@@ -471,16 +445,16 @@ function TRecord(left, right) {
|
|
|
471
445
|
// ------------------------------------------------------------------
|
|
472
446
|
// prettier-ignore
|
|
473
447
|
function TStringRight(left, right) {
|
|
474
|
-
return (index_9.TypeGuard.
|
|
475
|
-
index_9.TypeGuard.
|
|
448
|
+
return (index_9.TypeGuard.IsLiteral(left) && index_9.ValueGuard.IsString(left.const) ? ExtendsResult.True :
|
|
449
|
+
index_9.TypeGuard.IsString(left) ? ExtendsResult.True :
|
|
476
450
|
ExtendsResult.False);
|
|
477
451
|
}
|
|
478
452
|
// prettier-ignore
|
|
479
453
|
function TString(left, right) {
|
|
480
454
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
481
|
-
index_9.TypeGuard.
|
|
482
|
-
index_9.TypeGuard.
|
|
483
|
-
index_9.TypeGuard.
|
|
455
|
+
index_9.TypeGuard.IsObject(right) ? TObjectRight(left, right) :
|
|
456
|
+
index_9.TypeGuard.IsRecord(right) ? TRecordRight(left, right) :
|
|
457
|
+
index_9.TypeGuard.IsString(right) ? ExtendsResult.True :
|
|
484
458
|
ExtendsResult.False);
|
|
485
459
|
}
|
|
486
460
|
// ------------------------------------------------------------------
|
|
@@ -489,9 +463,9 @@ function TString(left, right) {
|
|
|
489
463
|
// prettier-ignore
|
|
490
464
|
function TSymbol(left, right) {
|
|
491
465
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
492
|
-
index_9.TypeGuard.
|
|
493
|
-
index_9.TypeGuard.
|
|
494
|
-
index_9.TypeGuard.
|
|
466
|
+
index_9.TypeGuard.IsObject(right) ? TObjectRight(left, right) :
|
|
467
|
+
index_9.TypeGuard.IsRecord(right) ? TRecordRight(left, right) :
|
|
468
|
+
index_9.TypeGuard.IsSymbol(right) ? ExtendsResult.True :
|
|
495
469
|
ExtendsResult.False);
|
|
496
470
|
}
|
|
497
471
|
// ------------------------------------------------------------------
|
|
@@ -502,8 +476,8 @@ function TTemplateLiteral(left, right) {
|
|
|
502
476
|
// TemplateLiteral types are resolved to either unions for finite expressions or string
|
|
503
477
|
// for infinite expressions. Here we call to TemplateLiteralResolver to resolve for
|
|
504
478
|
// either type and continue evaluating.
|
|
505
|
-
return (index_9.TypeGuard.
|
|
506
|
-
index_9.TypeGuard.
|
|
479
|
+
return (index_9.TypeGuard.IsTemplateLiteral(left) ? Visit((0, index_6.TemplateLiteralToUnion)(left), right) :
|
|
480
|
+
index_9.TypeGuard.IsTemplateLiteral(right) ? Visit(left, (0, index_6.TemplateLiteralToUnion)(right)) :
|
|
507
481
|
Throw('Invalid fallthrough for TemplateLiteral'));
|
|
508
482
|
}
|
|
509
483
|
// ------------------------------------------------------------------
|
|
@@ -511,23 +485,23 @@ function TTemplateLiteral(left, right) {
|
|
|
511
485
|
// ------------------------------------------------------------------
|
|
512
486
|
// prettier-ignore
|
|
513
487
|
function IsArrayOfTuple(left, right) {
|
|
514
|
-
return (index_9.TypeGuard.
|
|
488
|
+
return (index_9.TypeGuard.IsArray(right) &&
|
|
515
489
|
left.items !== undefined &&
|
|
516
490
|
left.items.every((schema) => Visit(schema, right.items) === ExtendsResult.True));
|
|
517
491
|
}
|
|
518
492
|
// prettier-ignore
|
|
519
493
|
function TTupleRight(left, right) {
|
|
520
|
-
return (index_9.TypeGuard.
|
|
521
|
-
index_9.TypeGuard.
|
|
522
|
-
index_9.TypeGuard.
|
|
494
|
+
return (index_9.TypeGuard.IsNever(left) ? ExtendsResult.True :
|
|
495
|
+
index_9.TypeGuard.IsUnknown(left) ? ExtendsResult.False :
|
|
496
|
+
index_9.TypeGuard.IsAny(left) ? ExtendsResult.Union :
|
|
523
497
|
ExtendsResult.False);
|
|
524
498
|
}
|
|
525
499
|
// prettier-ignore
|
|
526
500
|
function TTuple(left, right) {
|
|
527
501
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
528
|
-
index_9.TypeGuard.
|
|
529
|
-
index_9.TypeGuard.
|
|
530
|
-
!index_9.TypeGuard.
|
|
502
|
+
index_9.TypeGuard.IsObject(right) && IsObjectArrayLike(right) ? ExtendsResult.True :
|
|
503
|
+
index_9.TypeGuard.IsArray(right) && IsArrayOfTuple(left, right) ? ExtendsResult.True :
|
|
504
|
+
!index_9.TypeGuard.IsTuple(right) ? ExtendsResult.False :
|
|
531
505
|
(index_9.ValueGuard.IsUndefined(left.items) && !index_9.ValueGuard.IsUndefined(right.items)) || (!index_9.ValueGuard.IsUndefined(left.items) && index_9.ValueGuard.IsUndefined(right.items)) ? ExtendsResult.False :
|
|
532
506
|
(index_9.ValueGuard.IsUndefined(left.items) && !index_9.ValueGuard.IsUndefined(right.items)) ? ExtendsResult.True :
|
|
533
507
|
left.items.every((schema, index) => Visit(schema, right.items[index]) === ExtendsResult.True) ? ExtendsResult.True :
|
|
@@ -539,9 +513,9 @@ function TTuple(left, right) {
|
|
|
539
513
|
// prettier-ignore
|
|
540
514
|
function TUint8Array(left, right) {
|
|
541
515
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
542
|
-
index_9.TypeGuard.
|
|
543
|
-
index_9.TypeGuard.
|
|
544
|
-
index_9.TypeGuard.
|
|
516
|
+
index_9.TypeGuard.IsObject(right) ? TObjectRight(left, right) :
|
|
517
|
+
index_9.TypeGuard.IsRecord(right) ? TRecordRight(left, right) :
|
|
518
|
+
index_9.TypeGuard.IsUint8Array(right) ? ExtendsResult.True :
|
|
545
519
|
ExtendsResult.False);
|
|
546
520
|
}
|
|
547
521
|
// ------------------------------------------------------------------
|
|
@@ -550,10 +524,10 @@ function TUint8Array(left, right) {
|
|
|
550
524
|
// prettier-ignore
|
|
551
525
|
function TUndefined(left, right) {
|
|
552
526
|
return (IsStructuralRight(right) ? StructuralRight(left, right) :
|
|
553
|
-
index_9.TypeGuard.
|
|
554
|
-
index_9.TypeGuard.
|
|
555
|
-
index_9.TypeGuard.
|
|
556
|
-
index_9.TypeGuard.
|
|
527
|
+
index_9.TypeGuard.IsObject(right) ? TObjectRight(left, right) :
|
|
528
|
+
index_9.TypeGuard.IsRecord(right) ? TRecordRight(left, right) :
|
|
529
|
+
index_9.TypeGuard.IsVoid(right) ? VoidRight(left, right) :
|
|
530
|
+
index_9.TypeGuard.IsUndefined(right) ? ExtendsResult.True :
|
|
557
531
|
ExtendsResult.False);
|
|
558
532
|
}
|
|
559
533
|
// ------------------------------------------------------------------
|
|
@@ -580,18 +554,18 @@ function TUnknownRight(left, right) {
|
|
|
580
554
|
}
|
|
581
555
|
// prettier-ignore
|
|
582
556
|
function TUnknown(left, right) {
|
|
583
|
-
return (index_9.TypeGuard.
|
|
584
|
-
index_9.TypeGuard.
|
|
585
|
-
index_9.TypeGuard.
|
|
586
|
-
index_9.TypeGuard.
|
|
587
|
-
index_9.TypeGuard.
|
|
588
|
-
index_9.TypeGuard.
|
|
589
|
-
index_9.TypeGuard.
|
|
590
|
-
index_9.TypeGuard.
|
|
591
|
-
index_9.TypeGuard.
|
|
592
|
-
index_9.TypeGuard.
|
|
593
|
-
index_9.TypeGuard.
|
|
594
|
-
index_9.TypeGuard.
|
|
557
|
+
return (index_9.TypeGuard.IsNever(right) ? TNeverRight(left, right) :
|
|
558
|
+
index_9.TypeGuard.IsIntersect(right) ? TIntersectRight(left, right) :
|
|
559
|
+
index_9.TypeGuard.IsUnion(right) ? TUnionRight(left, right) :
|
|
560
|
+
index_9.TypeGuard.IsAny(right) ? TAnyRight(left, right) :
|
|
561
|
+
index_9.TypeGuard.IsString(right) ? TStringRight(left, right) :
|
|
562
|
+
index_9.TypeGuard.IsNumber(right) ? TNumberRight(left, right) :
|
|
563
|
+
index_9.TypeGuard.IsInteger(right) ? TIntegerRight(left, right) :
|
|
564
|
+
index_9.TypeGuard.IsBoolean(right) ? TBooleanRight(left, right) :
|
|
565
|
+
index_9.TypeGuard.IsArray(right) ? TArrayRight(left, right) :
|
|
566
|
+
index_9.TypeGuard.IsTuple(right) ? TTupleRight(left, right) :
|
|
567
|
+
index_9.TypeGuard.IsObject(right) ? TObjectRight(left, right) :
|
|
568
|
+
index_9.TypeGuard.IsUnknown(right) ? ExtendsResult.True :
|
|
595
569
|
ExtendsResult.False);
|
|
596
570
|
}
|
|
597
571
|
// ------------------------------------------------------------------
|
|
@@ -599,53 +573,53 @@ function TUnknown(left, right) {
|
|
|
599
573
|
// ------------------------------------------------------------------
|
|
600
574
|
// prettier-ignore
|
|
601
575
|
function VoidRight(left, right) {
|
|
602
|
-
return (index_9.TypeGuard.
|
|
603
|
-
index_9.TypeGuard.
|
|
576
|
+
return (index_9.TypeGuard.IsUndefined(left) ? ExtendsResult.True :
|
|
577
|
+
index_9.TypeGuard.IsUndefined(left) ? ExtendsResult.True :
|
|
604
578
|
ExtendsResult.False);
|
|
605
579
|
}
|
|
606
580
|
// prettier-ignore
|
|
607
581
|
function TVoid(left, right) {
|
|
608
|
-
return (index_9.TypeGuard.
|
|
609
|
-
index_9.TypeGuard.
|
|
610
|
-
index_9.TypeGuard.
|
|
611
|
-
index_9.TypeGuard.
|
|
612
|
-
index_9.TypeGuard.
|
|
613
|
-
index_9.TypeGuard.
|
|
582
|
+
return (index_9.TypeGuard.IsIntersect(right) ? TIntersectRight(left, right) :
|
|
583
|
+
index_9.TypeGuard.IsUnion(right) ? TUnionRight(left, right) :
|
|
584
|
+
index_9.TypeGuard.IsUnknown(right) ? TUnknownRight(left, right) :
|
|
585
|
+
index_9.TypeGuard.IsAny(right) ? TAnyRight(left, right) :
|
|
586
|
+
index_9.TypeGuard.IsObject(right) ? TObjectRight(left, right) :
|
|
587
|
+
index_9.TypeGuard.IsVoid(right) ? ExtendsResult.True :
|
|
614
588
|
ExtendsResult.False);
|
|
615
589
|
}
|
|
616
590
|
// prettier-ignore
|
|
617
591
|
function Visit(left, right) {
|
|
618
592
|
return (
|
|
619
593
|
// resolvable
|
|
620
|
-
(index_9.TypeGuard.
|
|
621
|
-
(index_9.TypeGuard.
|
|
594
|
+
(index_9.TypeGuard.IsTemplateLiteral(left) || index_9.TypeGuard.IsTemplateLiteral(right)) ? TTemplateLiteral(left, right) :
|
|
595
|
+
(index_9.TypeGuard.IsNot(left) || index_9.TypeGuard.IsNot(right)) ? TNot(left, right) :
|
|
622
596
|
// standard
|
|
623
|
-
index_9.TypeGuard.
|
|
624
|
-
index_9.TypeGuard.
|
|
625
|
-
index_9.TypeGuard.
|
|
626
|
-
index_9.TypeGuard.
|
|
627
|
-
index_9.TypeGuard.
|
|
628
|
-
index_9.TypeGuard.
|
|
629
|
-
index_9.TypeGuard.
|
|
630
|
-
index_9.TypeGuard.
|
|
631
|
-
index_9.TypeGuard.
|
|
632
|
-
index_9.TypeGuard.
|
|
633
|
-
index_9.TypeGuard.
|
|
634
|
-
index_9.TypeGuard.
|
|
635
|
-
index_9.TypeGuard.
|
|
636
|
-
index_9.TypeGuard.
|
|
637
|
-
index_9.TypeGuard.
|
|
638
|
-
index_9.TypeGuard.
|
|
639
|
-
index_9.TypeGuard.
|
|
640
|
-
index_9.TypeGuard.
|
|
641
|
-
index_9.TypeGuard.
|
|
642
|
-
index_9.TypeGuard.
|
|
643
|
-
index_9.TypeGuard.
|
|
644
|
-
index_9.TypeGuard.
|
|
645
|
-
index_9.TypeGuard.
|
|
646
|
-
index_9.TypeGuard.
|
|
647
|
-
index_9.TypeGuard.
|
|
648
|
-
index_9.TypeGuard.
|
|
597
|
+
index_9.TypeGuard.IsAny(left) ? TAny(left, right) :
|
|
598
|
+
index_9.TypeGuard.IsArray(left) ? TArray(left, right) :
|
|
599
|
+
index_9.TypeGuard.IsBigInt(left) ? TBigInt(left, right) :
|
|
600
|
+
index_9.TypeGuard.IsBoolean(left) ? TBoolean(left, right) :
|
|
601
|
+
index_9.TypeGuard.IsAsyncIterator(left) ? TAsyncIterator(left, right) :
|
|
602
|
+
index_9.TypeGuard.IsConstructor(left) ? TConstructor(left, right) :
|
|
603
|
+
index_9.TypeGuard.IsDate(left) ? TDate(left, right) :
|
|
604
|
+
index_9.TypeGuard.IsFunction(left) ? TFunction(left, right) :
|
|
605
|
+
index_9.TypeGuard.IsInteger(left) ? TInteger(left, right) :
|
|
606
|
+
index_9.TypeGuard.IsIntersect(left) ? TIntersect(left, right) :
|
|
607
|
+
index_9.TypeGuard.IsIterator(left) ? TIterator(left, right) :
|
|
608
|
+
index_9.TypeGuard.IsLiteral(left) ? TLiteral(left, right) :
|
|
609
|
+
index_9.TypeGuard.IsNever(left) ? TNever(left, right) :
|
|
610
|
+
index_9.TypeGuard.IsNull(left) ? TNull(left, right) :
|
|
611
|
+
index_9.TypeGuard.IsNumber(left) ? TNumber(left, right) :
|
|
612
|
+
index_9.TypeGuard.IsObject(left) ? TObject(left, right) :
|
|
613
|
+
index_9.TypeGuard.IsRecord(left) ? TRecord(left, right) :
|
|
614
|
+
index_9.TypeGuard.IsString(left) ? TString(left, right) :
|
|
615
|
+
index_9.TypeGuard.IsSymbol(left) ? TSymbol(left, right) :
|
|
616
|
+
index_9.TypeGuard.IsTuple(left) ? TTuple(left, right) :
|
|
617
|
+
index_9.TypeGuard.IsPromise(left) ? TPromise(left, right) :
|
|
618
|
+
index_9.TypeGuard.IsUint8Array(left) ? TUint8Array(left, right) :
|
|
619
|
+
index_9.TypeGuard.IsUndefined(left) ? TUndefined(left, right) :
|
|
620
|
+
index_9.TypeGuard.IsUnion(left) ? TUnion(left, right) :
|
|
621
|
+
index_9.TypeGuard.IsUnknown(left) ? TUnknown(left, right) :
|
|
622
|
+
index_9.TypeGuard.IsVoid(left) ? TVoid(left, right) :
|
|
649
623
|
Throw(`Unknown left type operand '${left[index_8.Kind]}'`));
|
|
650
624
|
}
|
|
651
625
|
function ExtendsCheck(left, right) {
|