type-plus 8.0.0-beta.6 → 8.0.0-beta.8
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/{esm/type_plus → cjs/$type}/$resolve_options.d.ts +2 -2
- package/cjs/$type/$resolve_options.d.ts.map +1 -0
- package/cjs/$type/$resolve_options.js.map +1 -0
- package/cjs/$type/$type.d.ts +34 -0
- package/cjs/$type/$type.d.ts.map +1 -0
- package/cjs/{type_plus → $type}/$type.js.map +1 -1
- package/{esm/type_plus → cjs/$type}/branch/$branch.d.ts +3 -3
- package/cjs/$type/branch/$branch.d.ts.map +1 -0
- package/cjs/$type/branch/$branch.js.map +1 -0
- package/{esm/type_plus → cjs/$type}/branch/$input_options.d.ts +2 -1
- package/cjs/$type/branch/$input_options.d.ts.map +1 -0
- package/cjs/$type/branch/$input_options.js.map +1 -0
- package/cjs/$type/branch/$resolve_branch.d.ts +22 -0
- package/cjs/$type/branch/$resolve_branch.d.ts.map +1 -0
- package/cjs/$type/branch/$resolve_branch.js.map +1 -0
- package/cjs/$type/branch/$selection.d.ts +161 -0
- package/cjs/$type/branch/$selection.d.ts.map +1 -0
- package/cjs/$type/branch/$selection.js.map +1 -0
- package/cjs/$type/distributive/$distributive.d.ts +27 -0
- package/cjs/$type/distributive/$distributive.d.ts.map +1 -0
- package/cjs/$type/distributive/$distributive.js.map +1 -0
- package/cjs/$type/errors/$error.d.ts +23 -0
- package/cjs/$type/errors/$error.d.ts.map +1 -0
- package/cjs/{type_plus → $type/errors}/$error.js.map +1 -1
- package/{esm/type_plus → cjs/$type/errors}/$infer_error.d.ts +7 -6
- package/cjs/$type/errors/$infer_error.d.ts.map +1 -0
- package/cjs/$type/errors/$infer_error.js.map +1 -0
- package/{esm/type → cjs/$type/errors}/failed.d.ts +4 -0
- package/cjs/$type/errors/failed.d.ts.map +1 -0
- package/cjs/{type → $type/errors}/failed.js.map +1 -1
- package/cjs/$type/exact/$exact.d.ts +27 -0
- package/cjs/$type/exact/$exact.d.ts.map +1 -0
- package/cjs/{type_plus/branch → $type/exact}/$exact.js.map +1 -1
- package/cjs/$type/special/$any.d.ts +36 -0
- package/cjs/$type/special/$any.d.ts.map +1 -0
- package/cjs/{any/any.js → $type/special/$any.js} +1 -1
- package/cjs/$type/special/$any.js.map +1 -0
- package/cjs/$type/special/$never.d.ts +52 -0
- package/cjs/$type/special/$never.d.ts.map +1 -0
- package/cjs/$type/special/$never.js +3 -0
- package/cjs/$type/special/$never.js.map +1 -0
- package/cjs/$type/special/$special.d.ts +31 -0
- package/cjs/$type/special/$special.d.ts.map +1 -0
- package/cjs/$type/special/$special.js +3 -0
- package/cjs/$type/special/$special.js.map +1 -0
- package/cjs/$type/special/$unknown.d.ts +37 -0
- package/cjs/$type/special/$unknown.d.ts.map +1 -0
- package/cjs/$type/special/$unknown.js +3 -0
- package/cjs/$type/special/$unknown.js.map +1 -0
- package/cjs/$type/special/$void.d.ts +46 -0
- package/cjs/$type/special/$void.d.ts.map +1 -0
- package/cjs/{never/never.js → $type/special/$void.js} +1 -1
- package/cjs/$type/special/$void.js.map +1 -0
- package/cjs/$type/utils/$merge_options.d.ts +14 -0
- package/cjs/$type/utils/$merge_options.d.ts.map +1 -0
- package/cjs/$type/utils/$merge_options.js.map +1 -0
- package/cjs/any/is_any.d.ts +23 -20
- package/cjs/any/is_any.d.ts.map +1 -1
- package/cjs/any/is_not_any.d.ts +15 -14
- package/cjs/any/is_not_any.d.ts.map +1 -1
- package/cjs/array/array.reverse.d.ts +1 -1
- package/cjs/array/array.reverse.d.ts.map +1 -1
- package/cjs/array/array.some.d.ts +1 -1
- package/cjs/array/array.some.d.ts.map +1 -1
- package/cjs/array/array_plus.common_prop_keys.d.ts +1 -1
- package/cjs/array/array_plus.common_prop_keys.d.ts.map +1 -1
- package/cjs/array/array_plus.filter.d.ts +2 -2
- package/cjs/array/array_plus.filter.d.ts.map +1 -1
- package/cjs/array/array_plus.find.d.ts +2 -2
- package/cjs/array/array_plus.find.d.ts.map +1 -1
- package/cjs/array/array_plus.index_at.d.ts +16 -10
- package/cjs/array/array_plus.index_at.d.ts.map +1 -1
- package/cjs/array/array_plus.index_at.js.map +1 -1
- package/cjs/array/array_plus.is_readonly.d.ts +3 -3
- package/cjs/array/array_plus.is_readonly.d.ts.map +1 -1
- package/cjs/array/head.d.ts +3 -3
- package/cjs/array/head.d.ts.map +1 -1
- package/cjs/array/is_array.d.ts +23 -19
- package/cjs/array/is_array.d.ts.map +1 -1
- package/cjs/array/is_not_array.d.ts +23 -19
- package/cjs/array/is_not_array.d.ts.map +1 -1
- package/cjs/array/last.d.ts +5 -3
- package/cjs/array/last.d.ts.map +1 -1
- package/cjs/array/literal_array.js +1 -2
- package/cjs/array/literal_array.js.map +1 -1
- package/cjs/array/reduce_while.js +1 -2
- package/cjs/array/reduce_while.js.map +1 -1
- package/cjs/assertion/assert_type.d.ts +1 -1
- package/cjs/assertion/assert_type.d.ts.map +1 -1
- package/cjs/assertion/assert_type.js +1 -4
- package/cjs/assertion/assert_type.js.map +1 -1
- package/cjs/bigint/is_bigint.d.ts +20 -16
- package/cjs/bigint/is_bigint.d.ts.map +1 -1
- package/cjs/bigint/is_bigint_literal.d.ts +18 -13
- package/cjs/bigint/is_bigint_literal.d.ts.map +1 -1
- package/cjs/bigint/is_not_bigint.d.ts +20 -16
- package/cjs/bigint/is_not_bigint.d.ts.map +1 -1
- package/cjs/bigint/is_not_bigint_literal.d.ts +19 -13
- package/cjs/bigint/is_not_bigint_literal.d.ts.map +1 -1
- package/cjs/binary/_binary.d.ts +2 -1
- package/cjs/binary/_binary.d.ts.map +1 -1
- package/cjs/binary/_binary.js +3 -0
- package/cjs/binary/_binary.js.map +1 -1
- package/cjs/binary/bit.d.ts +26 -0
- package/cjs/binary/bit.d.ts.map +1 -0
- package/cjs/binary/{Bit.js → bit.js} +1 -1
- package/cjs/binary/bit.js.map +1 -0
- package/cjs/boolean/is_boolean.d.ts +20 -16
- package/cjs/boolean/is_boolean.d.ts.map +1 -1
- package/cjs/boolean/is_false.d.ts +15 -9
- package/cjs/boolean/is_false.d.ts.map +1 -1
- package/cjs/boolean/is_not_boolean.d.ts +21 -16
- package/cjs/boolean/is_not_boolean.d.ts.map +1 -1
- package/cjs/boolean/is_not_false.d.ts +16 -9
- package/cjs/boolean/is_not_false.d.ts.map +1 -1
- package/cjs/boolean/is_not_true.d.ts +15 -9
- package/cjs/boolean/is_not_true.d.ts.map +1 -1
- package/cjs/boolean/is_true.d.ts +15 -9
- package/cjs/boolean/is_true.d.ts.map +1 -1
- package/cjs/class/isConstructor.js +2 -3
- package/cjs/class/isConstructor.js.map +1 -1
- package/cjs/equal/equal.d.ts +189 -74
- package/cjs/equal/equal.d.ts.map +1 -1
- package/cjs/equal/identity_equal.d.ts +5 -1
- package/cjs/equal/identity_equal.d.ts.map +1 -1
- package/cjs/equal/is_equal.d.ts +102 -0
- package/cjs/equal/is_equal.d.ts.map +1 -0
- package/cjs/equal/is_equal.js +3 -0
- package/cjs/equal/is_equal.js.map +1 -0
- package/cjs/function/extract_function.d.ts.map +1 -1
- package/cjs/function/extract_function.js +1 -2
- package/cjs/function/extract_function.js.map +1 -1
- package/cjs/function/is_function.d.ts +28 -5
- package/cjs/function/is_function.d.ts.map +1 -1
- package/cjs/function/is_not_function.d.ts +1 -1
- package/cjs/function/is_not_function.d.ts.map +1 -1
- package/cjs/function/is_not_strict_function.d.ts +15 -13
- package/cjs/function/is_not_strict_function.d.ts.map +1 -1
- package/cjs/function/is_strict_function.d.ts +22 -17
- package/cjs/function/is_strict_function.d.ts.map +1 -1
- package/cjs/functional/Maybe.d.ts +1 -1
- package/cjs/functional/Maybe.d.ts.map +1 -1
- package/cjs/functional/Maybe.js +2 -3
- package/cjs/functional/Maybe.js.map +1 -1
- package/cjs/functional/compose.d.ts.map +1 -1
- package/cjs/functional/compose.js +2 -5
- package/cjs/functional/compose.js.map +1 -1
- package/cjs/functional/context.js +1 -2
- package/cjs/functional/context.js.map +1 -1
- package/cjs/index.d.ts +21 -22
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/json.js +1 -1
- package/cjs/json.js.map +1 -1
- package/cjs/logical/logical.d.ts +35 -0
- package/cjs/logical/logical.d.ts.map +1 -0
- package/cjs/{predicates → logical}/logical.js.map +1 -1
- package/cjs/math/abs.d.ts +1 -1
- package/cjs/math/abs.d.ts.map +1 -1
- package/cjs/math/numeric_struct.d.ts.map +1 -1
- package/cjs/mix_types/box.d.ts +2 -2
- package/cjs/mix_types/box.d.ts.map +1 -1
- package/cjs/mix_types/is_any_or_never.d.ts +2 -3
- package/cjs/mix_types/is_any_or_never.d.ts.map +1 -1
- package/cjs/mix_types/merge.d.ts +18 -6
- package/cjs/mix_types/merge.d.ts.map +1 -1
- package/cjs/mix_types/merge.js +1 -2
- package/cjs/mix_types/merge.js.map +1 -1
- package/cjs/never/is_never.d.ts +16 -15
- package/cjs/never/is_never.d.ts.map +1 -1
- package/cjs/never/is_not_never.d.ts +16 -15
- package/cjs/never/is_not_never.d.ts.map +1 -1
- package/cjs/nodejs/isNodeError.js +1 -2
- package/cjs/nodejs/isNodeError.js.map +1 -1
- package/cjs/nominal/brand.js +1 -2
- package/cjs/nominal/brand.js.map +1 -1
- package/cjs/nominal/flavor.js +1 -2
- package/cjs/nominal/flavor.js.map +1 -1
- package/cjs/nominal/nominal_match.js +1 -2
- package/cjs/nominal/nominal_match.js.map +1 -1
- package/cjs/null/is_not_null.d.ts +15 -9
- package/cjs/null/is_not_null.d.ts.map +1 -1
- package/cjs/null/is_null.d.ts +15 -9
- package/cjs/null/is_null.d.ts.map +1 -1
- package/cjs/number/is_not_number.d.ts +20 -16
- package/cjs/number/is_not_number.d.ts.map +1 -1
- package/cjs/number/is_not_number_literal.d.ts +18 -13
- package/cjs/number/is_not_number_literal.d.ts.map +1 -1
- package/cjs/number/is_number.d.ts +20 -16
- package/cjs/number/is_number.d.ts.map +1 -1
- package/cjs/number/is_number_literal.d.ts +18 -13
- package/cjs/number/is_number_literal.d.ts.map +1 -1
- package/cjs/numeric/is_integer.d.ts +18 -12
- package/cjs/numeric/is_integer.d.ts.map +1 -1
- package/cjs/numeric/is_negative.d.ts +19 -13
- package/cjs/numeric/is_negative.d.ts.map +1 -1
- package/cjs/numeric/is_not_integer.d.ts +13 -7
- package/cjs/numeric/is_not_integer.d.ts.map +1 -1
- package/cjs/numeric/is_not_negative.d.ts +15 -9
- package/cjs/numeric/is_not_negative.d.ts.map +1 -1
- package/cjs/numeric/is_not_numeric.d.ts +1 -1
- package/cjs/numeric/is_not_numeric.d.ts.map +1 -1
- package/cjs/numeric/is_not_positive.d.ts +13 -7
- package/cjs/numeric/is_not_positive.d.ts.map +1 -1
- package/cjs/numeric/is_numeric.d.ts +28 -5
- package/cjs/numeric/is_numeric.d.ts.map +1 -1
- package/cjs/numeric/is_positive.d.ts +19 -13
- package/cjs/numeric/is_positive.d.ts.map +1 -1
- package/cjs/object/ANotB.d.ts +1 -1
- package/cjs/object/ANotB.d.ts.map +1 -1
- package/cjs/object/adjust_exact_optional_props.d.ts +6 -3
- package/cjs/object/adjust_exact_optional_props.d.ts.map +1 -1
- package/cjs/object/everyKey.js +1 -2
- package/cjs/object/everyKey.js.map +1 -1
- package/cjs/object/facade.js +1 -2
- package/cjs/object/facade.js.map +1 -1
- package/cjs/object/filterKey.js +1 -2
- package/cjs/object/filterKey.js.map +1 -1
- package/cjs/object/findKey.js +1 -2
- package/cjs/object/findKey.js.map +1 -1
- package/cjs/object/forEachKey.js +1 -2
- package/cjs/object/forEachKey.js.map +1 -1
- package/cjs/object/getField.js +1 -2
- package/cjs/object/getField.js.map +1 -1
- package/cjs/object/hasKey.js +1 -2
- package/cjs/object/hasKey.js.map +1 -1
- package/cjs/object/hasProperty.js +1 -2
- package/cjs/object/hasProperty.js.map +1 -1
- package/cjs/object/index.d.ts +6 -6
- package/cjs/object/index.d.ts.map +1 -1
- package/cjs/object/index.js.map +1 -1
- package/cjs/object/is_not_object.d.ts +23 -19
- package/cjs/object/is_not_object.d.ts.map +1 -1
- package/cjs/object/is_object.d.ts +23 -19
- package/cjs/object/is_object.d.ts.map +1 -1
- package/cjs/object/left_join.d.ts +1 -1
- package/cjs/object/left_join.d.ts.map +1 -1
- package/cjs/object/mapKey.js +1 -2
- package/cjs/object/mapKey.js.map +1 -1
- package/cjs/object/mapProperties.js +1 -2
- package/cjs/object/mapProperties.js.map +1 -1
- package/cjs/object/merge.d.ts +54 -48
- package/cjs/object/merge.d.ts.map +1 -1
- package/cjs/object/omit.js +1 -2
- package/cjs/object/omit.js.map +1 -1
- package/cjs/object/pick.js +1 -2
- package/cjs/object/pick.js.map +1 -1
- package/cjs/object/properties.d.ts +29 -4
- package/cjs/object/properties.d.ts.map +1 -1
- package/cjs/object/properties.js +1 -0
- package/cjs/object/properties.js.map +1 -1
- package/cjs/object/record.js +1 -2
- package/cjs/object/record.js.map +1 -1
- package/cjs/object/reduceKey.js +2 -2
- package/cjs/object/reduceKey.js.map +1 -1
- package/cjs/object/replaceProperty.js +1 -2
- package/cjs/object/replaceProperty.js.map +1 -1
- package/cjs/object/someKey.js +1 -2
- package/cjs/object/someKey.js.map +1 -1
- package/cjs/object/split.js +1 -2
- package/cjs/object/split.js.map +1 -1
- package/cjs/object/typeOverrideIncompatible.d.ts.map +1 -1
- package/cjs/object/typeOverrideIncompatible.js +1 -2
- package/cjs/object/typeOverrideIncompatible.js.map +1 -1
- package/cjs/predicates/CanAssign.js +1 -2
- package/cjs/predicates/CanAssign.js.map +1 -1
- package/cjs/predicates/assignable.d.ts +23 -25
- package/cjs/predicates/assignable.d.ts.map +1 -1
- package/cjs/predicates/index.d.ts +1 -1
- package/cjs/predicates/index.d.ts.map +1 -1
- package/cjs/predicates/index.js.map +1 -1
- package/cjs/predicates/not_assignable.d.ts +24 -26
- package/cjs/predicates/not_assignable.d.ts.map +1 -1
- package/cjs/promise/MaybePromise.js +2 -2
- package/cjs/promise/MaybePromise.js.map +1 -1
- package/cjs/promise/index.d.ts +1 -1
- package/cjs/promise/index.d.ts.map +1 -1
- package/cjs/promise/index.js +1 -1
- package/cjs/promise/index.js.map +1 -1
- package/cjs/promise/isPromise.js +2 -3
- package/cjs/promise/isPromise.js.map +1 -1
- package/cjs/promise/mapSeries.js +1 -2
- package/cjs/promise/mapSeries.js.map +1 -1
- package/cjs/string/$extract_manipulated_string.d.ts.map +1 -1
- package/cjs/string/_string_type.d.ts.map +1 -1
- package/cjs/string/is_not_string.d.ts +20 -17
- package/cjs/string/is_not_string.d.ts.map +1 -1
- package/cjs/string/is_not_string_literal.d.ts +25 -22
- package/cjs/string/is_not_string_literal.d.ts.map +1 -1
- package/cjs/string/is_not_template_literal.d.ts +18 -13
- package/cjs/string/is_not_template_literal.d.ts.map +1 -1
- package/cjs/string/is_string.d.ts +20 -16
- package/cjs/string/is_string.d.ts.map +1 -1
- package/cjs/string/is_string_literal.d.ts +25 -22
- package/cjs/string/is_string_literal.d.ts.map +1 -1
- package/cjs/string/is_template_literal.d.ts +18 -13
- package/cjs/string/is_template_literal.d.ts.map +1 -1
- package/cjs/symbol/is_not_symbol.d.ts +15 -9
- package/cjs/symbol/is_not_symbol.d.ts.map +1 -1
- package/cjs/symbol/is_symbol.d.ts +15 -9
- package/cjs/symbol/is_symbol.d.ts.map +1 -1
- package/cjs/testing/stub.d.ts +2 -3
- package/cjs/testing/stub.d.ts.map +1 -1
- package/cjs/testing/stub.js +1 -2
- package/cjs/testing/stub.js.map +1 -1
- package/cjs/testing/test_type.d.ts +1 -1
- package/cjs/testing/test_type.d.ts.map +1 -1
- package/cjs/tuple/drop.js +1 -2
- package/cjs/tuple/drop.js.map +1 -1
- package/cjs/tuple/is_not_tuple.d.ts +18 -13
- package/cjs/tuple/is_not_tuple.d.ts.map +1 -1
- package/cjs/tuple/is_tuple.d.ts +18 -13
- package/cjs/tuple/is_tuple.d.ts.map +1 -1
- package/cjs/tuple/tuple_plus.common_prop_keys.d.ts +1 -1
- package/cjs/tuple/tuple_plus.common_prop_keys.d.ts.map +1 -1
- package/cjs/tuple/tuple_plus.drop_match.d.ts +1 -1
- package/cjs/tuple/tuple_plus.drop_match.d.ts.map +1 -1
- package/cjs/tuple/tuple_plus.find.d.ts +1 -1
- package/cjs/tuple/tuple_plus.find.d.ts.map +1 -1
- package/cjs/type-guard/is_type.d.ts +3 -3
- package/cjs/type-guard/is_type.d.ts.map +1 -1
- package/cjs/type-guard/is_type.js +1 -2
- package/cjs/type-guard/is_type.js.map +1 -1
- package/cjs/undefined/has_undefined.d.ts +4 -5
- package/cjs/undefined/has_undefined.d.ts.map +1 -1
- package/cjs/undefined/is_not_undefined.d.ts +15 -9
- package/cjs/undefined/is_not_undefined.d.ts.map +1 -1
- package/cjs/undefined/is_undefined.d.ts +15 -9
- package/cjs/undefined/is_undefined.d.ts.map +1 -1
- package/cjs/union/union_to_intersection.js +1 -2
- package/cjs/union/union_to_intersection.js.map +1 -1
- package/cjs/unknown/is_not_unknown.d.ts +15 -14
- package/cjs/unknown/is_not_unknown.d.ts.map +1 -1
- package/cjs/unknown/is_unknown.d.ts +15 -14
- package/cjs/unknown/is_unknown.d.ts.map +1 -1
- package/cjs/unknown/not_unknown_or.d.ts +1 -1
- package/cjs/unknown/not_unknown_or.d.ts.map +1 -1
- package/cjs/utils/Widen.d.ts +9 -2
- package/cjs/utils/Widen.d.ts.map +1 -1
- package/cjs/utils/as.d.ts +1 -1
- package/cjs/utils/as.d.ts.map +1 -1
- package/cjs/utils/as.js +3 -4
- package/cjs/utils/as.js.map +1 -1
- package/cjs/utils/excessive.d.ts +12 -0
- package/cjs/utils/excessive.d.ts.map +1 -0
- package/cjs/utils/excessive.js +3 -0
- package/cjs/utils/excessive.js.map +1 -0
- package/cjs/utils/inspect.js +1 -2
- package/cjs/utils/inspect.js.map +1 -1
- package/cjs/{type → utils}/no_infer.d.ts +9 -7
- package/cjs/utils/no_infer.d.ts.map +1 -0
- package/cjs/{type → utils}/no_infer.js.map +1 -1
- package/cjs/void/is_not_void.d.ts +17 -10
- package/cjs/void/is_not_void.d.ts.map +1 -1
- package/cjs/void/is_void.d.ts +17 -10
- package/cjs/void/is_void.d.ts.map +1 -1
- package/{cjs/type_plus → esm/$type}/$resolve_options.d.ts +2 -2
- package/esm/$type/$resolve_options.d.ts.map +1 -0
- package/esm/$type/$resolve_options.js.map +1 -0
- package/esm/$type/$type.d.ts +34 -0
- package/esm/$type/$type.d.ts.map +1 -0
- package/esm/{type_plus → $type}/$type.js.map +1 -1
- package/{cjs/type_plus → esm/$type}/branch/$branch.d.ts +3 -3
- package/esm/$type/branch/$branch.d.ts.map +1 -0
- package/esm/$type/branch/$branch.js.map +1 -0
- package/{cjs/type_plus → esm/$type}/branch/$input_options.d.ts +2 -1
- package/esm/$type/branch/$input_options.d.ts.map +1 -0
- package/esm/$type/branch/$input_options.js.map +1 -0
- package/esm/$type/branch/$resolve_branch.d.ts +22 -0
- package/esm/$type/branch/$resolve_branch.d.ts.map +1 -0
- package/esm/$type/branch/$resolve_branch.js.map +1 -0
- package/esm/$type/branch/$selection.d.ts +161 -0
- package/esm/$type/branch/$selection.d.ts.map +1 -0
- package/esm/$type/branch/$selection.js.map +1 -0
- package/esm/$type/distributive/$distributive.d.ts +27 -0
- package/esm/$type/distributive/$distributive.d.ts.map +1 -0
- package/esm/$type/distributive/$distributive.js.map +1 -0
- package/esm/$type/errors/$error.d.ts +23 -0
- package/esm/$type/errors/$error.d.ts.map +1 -0
- package/esm/{type_plus → $type/errors}/$error.js.map +1 -1
- package/{cjs/type_plus → esm/$type/errors}/$infer_error.d.ts +7 -6
- package/esm/$type/errors/$infer_error.d.ts.map +1 -0
- package/esm/$type/errors/$infer_error.js.map +1 -0
- package/{cjs/type → esm/$type/errors}/failed.d.ts +4 -0
- package/esm/$type/errors/failed.d.ts.map +1 -0
- package/esm/{type → $type/errors}/failed.js.map +1 -1
- package/esm/$type/exact/$exact.d.ts +27 -0
- package/esm/$type/exact/$exact.d.ts.map +1 -0
- package/esm/{type_plus/branch → $type/exact}/$exact.js.map +1 -1
- package/esm/$type/special/$any.d.ts +36 -0
- package/esm/$type/special/$any.d.ts.map +1 -0
- package/esm/$type/special/$any.js +2 -0
- package/esm/$type/special/$any.js.map +1 -0
- package/esm/$type/special/$never.d.ts +52 -0
- package/esm/$type/special/$never.d.ts.map +1 -0
- package/esm/$type/special/$never.js +2 -0
- package/esm/$type/special/$never.js.map +1 -0
- package/esm/$type/special/$special.d.ts +31 -0
- package/esm/$type/special/$special.d.ts.map +1 -0
- package/esm/$type/special/$special.js +2 -0
- package/esm/$type/special/$special.js.map +1 -0
- package/esm/$type/special/$unknown.d.ts +37 -0
- package/esm/$type/special/$unknown.d.ts.map +1 -0
- package/esm/$type/special/$unknown.js +2 -0
- package/esm/$type/special/$unknown.js.map +1 -0
- package/esm/$type/special/$void.d.ts +46 -0
- package/esm/$type/special/$void.d.ts.map +1 -0
- package/esm/$type/special/$void.js +2 -0
- package/esm/$type/special/$void.js.map +1 -0
- package/esm/$type/utils/$merge_options.d.ts +14 -0
- package/esm/$type/utils/$merge_options.d.ts.map +1 -0
- package/esm/$type/utils/$merge_options.js.map +1 -0
- package/esm/any/is_any.d.ts +23 -20
- package/esm/any/is_any.d.ts.map +1 -1
- package/esm/any/is_not_any.d.ts +15 -14
- package/esm/any/is_not_any.d.ts.map +1 -1
- package/esm/array/array.reverse.d.ts +1 -1
- package/esm/array/array.reverse.d.ts.map +1 -1
- package/esm/array/array.some.d.ts +1 -1
- package/esm/array/array.some.d.ts.map +1 -1
- package/esm/array/array_plus.common_prop_keys.d.ts +1 -1
- package/esm/array/array_plus.common_prop_keys.d.ts.map +1 -1
- package/esm/array/array_plus.filter.d.ts +2 -2
- package/esm/array/array_plus.filter.d.ts.map +1 -1
- package/esm/array/array_plus.find.d.ts +2 -2
- package/esm/array/array_plus.find.d.ts.map +1 -1
- package/esm/array/array_plus.index_at.d.ts +16 -10
- package/esm/array/array_plus.index_at.d.ts.map +1 -1
- package/esm/array/array_plus.index_at.js.map +1 -1
- package/esm/array/array_plus.is_readonly.d.ts +3 -3
- package/esm/array/array_plus.is_readonly.d.ts.map +1 -1
- package/esm/array/head.d.ts +3 -3
- package/esm/array/head.d.ts.map +1 -1
- package/esm/array/is_array.d.ts +23 -19
- package/esm/array/is_array.d.ts.map +1 -1
- package/esm/array/is_not_array.d.ts +23 -19
- package/esm/array/is_not_array.d.ts.map +1 -1
- package/esm/array/last.d.ts +5 -3
- package/esm/array/last.d.ts.map +1 -1
- package/esm/assertion/assert_type.d.ts +1 -1
- package/esm/assertion/assert_type.d.ts.map +1 -1
- package/esm/assertion/assert_type.js +0 -2
- package/esm/assertion/assert_type.js.map +1 -1
- package/esm/bigint/is_bigint.d.ts +20 -16
- package/esm/bigint/is_bigint.d.ts.map +1 -1
- package/esm/bigint/is_bigint_literal.d.ts +18 -13
- package/esm/bigint/is_bigint_literal.d.ts.map +1 -1
- package/esm/bigint/is_not_bigint.d.ts +20 -16
- package/esm/bigint/is_not_bigint.d.ts.map +1 -1
- package/esm/bigint/is_not_bigint_literal.d.ts +19 -13
- package/esm/bigint/is_not_bigint_literal.d.ts.map +1 -1
- package/esm/binary/_binary.d.ts +2 -1
- package/esm/binary/_binary.d.ts.map +1 -1
- package/esm/binary/_binary.js +2 -1
- package/esm/binary/_binary.js.map +1 -1
- package/esm/binary/bit.d.ts +26 -0
- package/esm/binary/bit.d.ts.map +1 -0
- package/esm/binary/bit.js +2 -0
- package/esm/binary/bit.js.map +1 -0
- package/esm/boolean/is_boolean.d.ts +20 -16
- package/esm/boolean/is_boolean.d.ts.map +1 -1
- package/esm/boolean/is_false.d.ts +15 -9
- package/esm/boolean/is_false.d.ts.map +1 -1
- package/esm/boolean/is_not_boolean.d.ts +21 -16
- package/esm/boolean/is_not_boolean.d.ts.map +1 -1
- package/esm/boolean/is_not_false.d.ts +16 -9
- package/esm/boolean/is_not_false.d.ts.map +1 -1
- package/esm/boolean/is_not_true.d.ts +15 -9
- package/esm/boolean/is_not_true.d.ts.map +1 -1
- package/esm/boolean/is_true.d.ts +15 -9
- package/esm/boolean/is_true.d.ts.map +1 -1
- package/esm/equal/equal.d.ts +189 -74
- package/esm/equal/equal.d.ts.map +1 -1
- package/esm/equal/identity_equal.d.ts +5 -1
- package/esm/equal/identity_equal.d.ts.map +1 -1
- package/esm/equal/is_equal.d.ts +102 -0
- package/esm/equal/is_equal.d.ts.map +1 -0
- package/esm/equal/is_equal.js +2 -0
- package/esm/equal/is_equal.js.map +1 -0
- package/esm/function/extract_function.d.ts.map +1 -1
- package/esm/function/is_function.d.ts +28 -5
- package/esm/function/is_function.d.ts.map +1 -1
- package/esm/function/is_not_function.d.ts +1 -1
- package/esm/function/is_not_function.d.ts.map +1 -1
- package/esm/function/is_not_strict_function.d.ts +15 -13
- package/esm/function/is_not_strict_function.d.ts.map +1 -1
- package/esm/function/is_strict_function.d.ts +22 -17
- package/esm/function/is_strict_function.d.ts.map +1 -1
- package/esm/functional/Maybe.d.ts +1 -1
- package/esm/functional/Maybe.d.ts.map +1 -1
- package/esm/functional/compose.d.ts.map +1 -1
- package/esm/functional/compose.js +1 -3
- package/esm/functional/compose.js.map +1 -1
- package/esm/index.d.ts +21 -22
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js.map +1 -1
- package/esm/json.js +1 -1
- package/esm/json.js.map +1 -1
- package/esm/logical/logical.d.ts +35 -0
- package/esm/logical/logical.d.ts.map +1 -0
- package/esm/{predicates → logical}/logical.js.map +1 -1
- package/esm/math/abs.d.ts +1 -1
- package/esm/math/abs.d.ts.map +1 -1
- package/esm/math/numeric_struct.d.ts.map +1 -1
- package/esm/mix_types/box.d.ts +2 -2
- package/esm/mix_types/box.d.ts.map +1 -1
- package/esm/mix_types/is_any_or_never.d.ts +2 -3
- package/esm/mix_types/is_any_or_never.d.ts.map +1 -1
- package/esm/mix_types/merge.d.ts +18 -6
- package/esm/mix_types/merge.d.ts.map +1 -1
- package/esm/mix_types/merge.js.map +1 -1
- package/esm/never/is_never.d.ts +16 -15
- package/esm/never/is_never.d.ts.map +1 -1
- package/esm/never/is_not_never.d.ts +16 -15
- package/esm/never/is_not_never.d.ts.map +1 -1
- package/esm/null/is_not_null.d.ts +15 -9
- package/esm/null/is_not_null.d.ts.map +1 -1
- package/esm/null/is_null.d.ts +15 -9
- package/esm/null/is_null.d.ts.map +1 -1
- package/esm/number/is_not_number.d.ts +20 -16
- package/esm/number/is_not_number.d.ts.map +1 -1
- package/esm/number/is_not_number_literal.d.ts +18 -13
- package/esm/number/is_not_number_literal.d.ts.map +1 -1
- package/esm/number/is_number.d.ts +20 -16
- package/esm/number/is_number.d.ts.map +1 -1
- package/esm/number/is_number_literal.d.ts +18 -13
- package/esm/number/is_number_literal.d.ts.map +1 -1
- package/esm/numeric/is_integer.d.ts +18 -12
- package/esm/numeric/is_integer.d.ts.map +1 -1
- package/esm/numeric/is_negative.d.ts +19 -13
- package/esm/numeric/is_negative.d.ts.map +1 -1
- package/esm/numeric/is_not_integer.d.ts +13 -7
- package/esm/numeric/is_not_integer.d.ts.map +1 -1
- package/esm/numeric/is_not_negative.d.ts +15 -9
- package/esm/numeric/is_not_negative.d.ts.map +1 -1
- package/esm/numeric/is_not_numeric.d.ts +1 -1
- package/esm/numeric/is_not_numeric.d.ts.map +1 -1
- package/esm/numeric/is_not_positive.d.ts +13 -7
- package/esm/numeric/is_not_positive.d.ts.map +1 -1
- package/esm/numeric/is_numeric.d.ts +28 -5
- package/esm/numeric/is_numeric.d.ts.map +1 -1
- package/esm/numeric/is_positive.d.ts +19 -13
- package/esm/numeric/is_positive.d.ts.map +1 -1
- package/esm/object/ANotB.d.ts +1 -1
- package/esm/object/ANotB.d.ts.map +1 -1
- package/esm/object/adjust_exact_optional_props.d.ts +6 -3
- package/esm/object/adjust_exact_optional_props.d.ts.map +1 -1
- package/esm/object/index.d.ts +6 -6
- package/esm/object/index.d.ts.map +1 -1
- package/esm/object/index.js.map +1 -1
- package/esm/object/is_not_object.d.ts +23 -19
- package/esm/object/is_not_object.d.ts.map +1 -1
- package/esm/object/is_object.d.ts +23 -19
- package/esm/object/is_object.d.ts.map +1 -1
- package/esm/object/left_join.d.ts +1 -1
- package/esm/object/left_join.d.ts.map +1 -1
- package/esm/object/merge.d.ts +54 -48
- package/esm/object/merge.d.ts.map +1 -1
- package/esm/object/properties.d.ts +29 -4
- package/esm/object/properties.d.ts.map +1 -1
- package/esm/object/properties.js +1 -0
- package/esm/object/properties.js.map +1 -1
- package/esm/object/typeOverrideIncompatible.d.ts.map +1 -1
- package/esm/predicates/assignable.d.ts +23 -25
- package/esm/predicates/assignable.d.ts.map +1 -1
- package/esm/predicates/index.d.ts +1 -1
- package/esm/predicates/index.d.ts.map +1 -1
- package/esm/predicates/index.js.map +1 -1
- package/esm/predicates/not_assignable.d.ts +24 -26
- package/esm/predicates/not_assignable.d.ts.map +1 -1
- package/esm/promise/index.d.ts +1 -1
- package/esm/promise/index.d.ts.map +1 -1
- package/esm/promise/index.js +1 -1
- package/esm/promise/index.js.map +1 -1
- package/esm/promise/isPromise.js +1 -1
- package/esm/promise/isPromise.js.map +1 -1
- package/esm/string/$extract_manipulated_string.d.ts.map +1 -1
- package/esm/string/_string_type.d.ts.map +1 -1
- package/esm/string/is_not_string.d.ts +20 -17
- package/esm/string/is_not_string.d.ts.map +1 -1
- package/esm/string/is_not_string_literal.d.ts +25 -22
- package/esm/string/is_not_string_literal.d.ts.map +1 -1
- package/esm/string/is_not_template_literal.d.ts +18 -13
- package/esm/string/is_not_template_literal.d.ts.map +1 -1
- package/esm/string/is_string.d.ts +20 -16
- package/esm/string/is_string.d.ts.map +1 -1
- package/esm/string/is_string_literal.d.ts +25 -22
- package/esm/string/is_string_literal.d.ts.map +1 -1
- package/esm/string/is_template_literal.d.ts +18 -13
- package/esm/string/is_template_literal.d.ts.map +1 -1
- package/esm/symbol/is_not_symbol.d.ts +15 -9
- package/esm/symbol/is_not_symbol.d.ts.map +1 -1
- package/esm/symbol/is_symbol.d.ts +15 -9
- package/esm/symbol/is_symbol.d.ts.map +1 -1
- package/esm/testing/stub.d.ts +2 -3
- package/esm/testing/stub.d.ts.map +1 -1
- package/esm/testing/stub.js.map +1 -1
- package/esm/testing/test_type.d.ts +1 -1
- package/esm/testing/test_type.d.ts.map +1 -1
- package/esm/tuple/is_not_tuple.d.ts +18 -13
- package/esm/tuple/is_not_tuple.d.ts.map +1 -1
- package/esm/tuple/is_tuple.d.ts +18 -13
- package/esm/tuple/is_tuple.d.ts.map +1 -1
- package/esm/tuple/tuple_plus.common_prop_keys.d.ts +1 -1
- package/esm/tuple/tuple_plus.common_prop_keys.d.ts.map +1 -1
- package/esm/tuple/tuple_plus.drop_match.d.ts +1 -1
- package/esm/tuple/tuple_plus.drop_match.d.ts.map +1 -1
- package/esm/tuple/tuple_plus.find.d.ts +1 -1
- package/esm/tuple/tuple_plus.find.d.ts.map +1 -1
- package/esm/type-guard/is_type.d.ts +3 -3
- package/esm/type-guard/is_type.d.ts.map +1 -1
- package/esm/undefined/has_undefined.d.ts +4 -5
- package/esm/undefined/has_undefined.d.ts.map +1 -1
- package/esm/undefined/is_not_undefined.d.ts +15 -9
- package/esm/undefined/is_not_undefined.d.ts.map +1 -1
- package/esm/undefined/is_undefined.d.ts +15 -9
- package/esm/undefined/is_undefined.d.ts.map +1 -1
- package/esm/unknown/is_not_unknown.d.ts +15 -14
- package/esm/unknown/is_not_unknown.d.ts.map +1 -1
- package/esm/unknown/is_unknown.d.ts +15 -14
- package/esm/unknown/is_unknown.d.ts.map +1 -1
- package/esm/unknown/not_unknown_or.d.ts +1 -1
- package/esm/unknown/not_unknown_or.d.ts.map +1 -1
- package/esm/utils/Widen.d.ts +9 -2
- package/esm/utils/Widen.d.ts.map +1 -1
- package/esm/utils/as.d.ts +1 -1
- package/esm/utils/as.d.ts.map +1 -1
- package/esm/utils/excessive.d.ts +12 -0
- package/esm/utils/excessive.d.ts.map +1 -0
- package/esm/utils/excessive.js +2 -0
- package/esm/utils/excessive.js.map +1 -0
- package/esm/{type → utils}/no_infer.d.ts +9 -7
- package/esm/utils/no_infer.d.ts.map +1 -0
- package/esm/{type → utils}/no_infer.js.map +1 -1
- package/esm/void/is_not_void.d.ts +17 -10
- package/esm/void/is_not_void.d.ts.map +1 -1
- package/esm/void/is_void.d.ts +17 -10
- package/esm/void/is_void.d.ts.map +1 -1
- package/package.json +18 -22
- package/readme.md +74 -74
- package/src/{type_plus → $type}/$resolve_options.ts +4 -2
- package/src/$type/$type.ts +37 -0
- package/src/{type_plus → $type}/branch/$branch.ts +4 -2
- package/src/{type_plus → $type}/branch/$input_options.ts +2 -1
- package/src/$type/branch/$resolve_branch.ts +46 -0
- package/src/$type/branch/$selection.ts +170 -0
- package/src/$type/branch/readme.md +78 -0
- package/src/$type/distributive/$distributive.ts +34 -0
- package/src/$type/distributive/readme.md +26 -0
- package/src/$type/errors/$error.ts +20 -0
- package/src/{type_plus → $type/errors}/$infer_error.ts +7 -8
- package/src/{type → $type/errors}/failed.ts +4 -0
- package/src/$type/errors/readme.md +60 -0
- package/src/$type/exact/$exact.ts +34 -0
- package/src/$type/exact/readme.md +27 -0
- package/src/$type/readme.md +23 -0
- package/src/$type/special/$any.ts +34 -0
- package/src/$type/special/$never.ts +51 -0
- package/src/$type/special/$special.ts +40 -0
- package/src/$type/special/$unknown.ts +35 -0
- package/src/$type/special/$void.ts +44 -0
- package/src/$type/special/readme.md +51 -0
- package/src/$type/utils/$merge_options.ts +11 -0
- package/src/$type/utils/readme.md +10 -0
- package/src/any/is_any.ts +23 -20
- package/src/any/is_not_any.ts +15 -14
- package/src/any/readme.md +30 -19
- package/src/array/array.reverse.ts +2 -5
- package/src/array/array.some.ts +1 -1
- package/src/array/array_plus.common_prop_keys.ts +1 -1
- package/src/array/array_plus.filter.ts +2 -2
- package/src/array/array_plus.find.ts +2 -2
- package/src/array/array_plus.index_at.ts +23 -29
- package/src/array/array_plus.is_readonly.ts +3 -3
- package/src/array/head.ts +3 -3
- package/src/array/is_array.ts +30 -23
- package/src/array/is_not_array.ts +30 -23
- package/src/array/last.ts +6 -14
- package/src/array/readme.md +3 -3
- package/src/assertion/assert_type.ts +1 -3
- package/src/bigint/is_bigint.ts +28 -21
- package/src/bigint/is_bigint_literal.ts +25 -17
- package/src/bigint/is_not_bigint.ts +27 -20
- package/src/bigint/is_not_bigint_literal.ts +26 -17
- package/src/bigint/readme.md +25 -8
- package/src/binary/_binary.ts +2 -1
- package/src/binary/bit.ts +29 -0
- package/src/binary/readme.md +11 -0
- package/src/boolean/is_boolean.ts +30 -23
- package/src/boolean/is_false.ts +18 -9
- package/src/boolean/is_not_boolean.ts +30 -22
- package/src/boolean/is_not_false.ts +19 -9
- package/src/boolean/is_not_true.ts +18 -9
- package/src/boolean/is_true.ts +18 -9
- package/src/equal/equal.ts +307 -89
- package/src/equal/identity_equal.ts +3 -7
- package/src/equal/is_equal.ts +150 -0
- package/src/equal/readme.md +20 -1
- package/src/function/is_function.ts +37 -5
- package/src/function/is_not_function.ts +1 -1
- package/src/function/is_not_strict_function.ts +16 -14
- package/src/function/is_strict_function.ts +29 -21
- package/src/functional/Maybe.ts +1 -1
- package/src/functional/compose.ts +1 -3
- package/src/index.ts +21 -22
- package/src/json.ts +1 -1
- package/src/logical/logical.ts +52 -0
- package/src/logical/readme.md +53 -0
- package/src/math/abs.ts +1 -1
- package/src/math/numeric_struct.ts +6 -6
- package/src/mix_types/box.ts +2 -2
- package/src/mix_types/is_any_or_never.ts +2 -3
- package/src/mix_types/merge.ts +22 -17
- package/src/never/is_never.ts +16 -15
- package/src/never/is_not_never.ts +16 -15
- package/src/null/is_not_null.ts +18 -9
- package/src/null/is_null.ts +18 -9
- package/src/number/is_not_number.ts +27 -20
- package/src/number/is_not_number_literal.ts +25 -17
- package/src/number/is_number.ts +27 -20
- package/src/number/is_number_literal.ts +25 -17
- package/src/numeric/is_integer.ts +29 -30
- package/src/numeric/is_negative.ts +29 -20
- package/src/numeric/is_not_integer.ts +19 -10
- package/src/numeric/is_not_negative.ts +25 -13
- package/src/numeric/is_not_numeric.ts +1 -1
- package/src/numeric/is_not_positive.ts +19 -9
- package/src/numeric/is_numeric.ts +37 -5
- package/src/numeric/is_positive.ts +29 -21
- package/src/object/ANotB.ts +1 -1
- package/src/object/adjust_exact_optional_props.ts +10 -1
- package/src/object/index.ts +6 -6
- package/src/object/is_not_object.ts +29 -22
- package/src/object/is_object.ts +29 -22
- package/src/object/left_join.ts +1 -1
- package/src/object/merge.ts +53 -49
- package/src/object/properties.ts +35 -2
- package/src/predicates/assignable.ts +23 -25
- package/src/predicates/index.ts +1 -1
- package/src/predicates/not_assignable.ts +24 -26
- package/src/promise/index.ts +1 -1
- package/src/promise/isPromise.ts +1 -1
- package/src/string/$extract_manipulated_string.ts +32 -28
- package/src/string/_string_type.ts +9 -8
- package/src/string/is_not_string.ts +29 -23
- package/src/string/is_not_string_literal.ts +36 -30
- package/src/string/is_not_template_literal.ts +24 -16
- package/src/string/is_string.ts +27 -20
- package/src/string/is_string_literal.ts +36 -30
- package/src/string/is_template_literal.ts +24 -16
- package/src/symbol/is_not_symbol.ts +18 -9
- package/src/symbol/is_symbol.ts +18 -9
- package/src/testing/stub.ts +0 -1
- package/src/testing/test_type.ts +1 -1
- package/src/tuple/is_not_tuple.ts +26 -17
- package/src/tuple/is_tuple.ts +25 -17
- package/src/tuple/tuple_plus.common_prop_keys.ts +1 -1
- package/src/tuple/tuple_plus.drop_match.ts +1 -1
- package/src/tuple/tuple_plus.find.ts +1 -1
- package/src/type-guard/is_type.ts +1 -1
- package/src/undefined/has_undefined.ts +5 -6
- package/src/undefined/is_not_undefined.ts +18 -9
- package/src/undefined/is_undefined.ts +18 -9
- package/src/unknown/is_not_unknown.ts +15 -14
- package/src/unknown/is_unknown.ts +15 -14
- package/src/unknown/not_unknown_or.ts +1 -1
- package/src/utils/Widen.ts +9 -2
- package/src/utils/excessive.ts +11 -0
- package/src/{type → utils}/no_infer.ts +13 -7
- package/src/utils/readme.md +17 -0
- package/src/void/is_not_void.ts +20 -10
- package/src/void/is_void.ts +20 -10
- package/cjs/any/any.d.ts +0 -49
- package/cjs/any/any.d.ts.map +0 -1
- package/cjs/any/any.js.map +0 -1
- package/cjs/binary/Bit.d.ts +0 -6
- package/cjs/binary/Bit.d.ts.map +0 -1
- package/cjs/binary/Bit.js.map +0 -1
- package/cjs/binary/index.d.ts +0 -3
- package/cjs/binary/index.d.ts.map +0 -1
- package/cjs/binary/index.js +0 -6
- package/cjs/binary/index.js.map +0 -1
- package/cjs/never/never.d.ts +0 -75
- package/cjs/never/never.d.ts.map +0 -1
- package/cjs/never/never.js.map +0 -1
- package/cjs/predicates/logical.d.ts +0 -5
- package/cjs/predicates/logical.d.ts.map +0 -1
- package/cjs/type/failed.d.ts.map +0 -1
- package/cjs/type/no_infer.d.ts.map +0 -1
- package/cjs/type_plus/$equality.d.ts +0 -12
- package/cjs/type_plus/$equality.d.ts.map +0 -1
- package/cjs/type_plus/$equality.js +0 -3
- package/cjs/type_plus/$equality.js.map +0 -1
- package/cjs/type_plus/$error.d.ts +0 -8
- package/cjs/type_plus/$error.d.ts.map +0 -1
- package/cjs/type_plus/$infer_error.d.ts.map +0 -1
- package/cjs/type_plus/$infer_error.js.map +0 -1
- package/cjs/type_plus/$merge_options.d.ts +0 -11
- package/cjs/type_plus/$merge_options.d.ts.map +0 -1
- package/cjs/type_plus/$merge_options.js.map +0 -1
- package/cjs/type_plus/$resolve_options.d.ts.map +0 -1
- package/cjs/type_plus/$resolve_options.js.map +0 -1
- package/cjs/type_plus/$special_type.d.ts +0 -19
- package/cjs/type_plus/$special_type.d.ts.map +0 -1
- package/cjs/type_plus/$special_type.js +0 -3
- package/cjs/type_plus/$special_type.js.map +0 -1
- package/cjs/type_plus/$type.d.ts +0 -11
- package/cjs/type_plus/$type.d.ts.map +0 -1
- package/cjs/type_plus/branch/$branch.d.ts.map +0 -1
- package/cjs/type_plus/branch/$branch.js.map +0 -1
- package/cjs/type_plus/branch/$distributive.d.ts +0 -19
- package/cjs/type_plus/branch/$distributive.d.ts.map +0 -1
- package/cjs/type_plus/branch/$distributive.js.map +0 -1
- package/cjs/type_plus/branch/$exact.d.ts +0 -21
- package/cjs/type_plus/branch/$exact.d.ts.map +0 -1
- package/cjs/type_plus/branch/$input_options.d.ts.map +0 -1
- package/cjs/type_plus/branch/$input_options.js.map +0 -1
- package/cjs/type_plus/branch/$is_distributive.d.ts +0 -6
- package/cjs/type_plus/branch/$is_distributive.d.ts.map +0 -1
- package/cjs/type_plus/branch/$is_distributive.js +0 -3
- package/cjs/type_plus/branch/$is_distributive.js.map +0 -1
- package/cjs/type_plus/branch/$override.d.ts +0 -21
- package/cjs/type_plus/branch/$override.d.ts.map +0 -1
- package/cjs/type_plus/branch/$override.js +0 -3
- package/cjs/type_plus/branch/$override.js.map +0 -1
- package/cjs/type_plus/branch/$resolve_branch.d.ts +0 -29
- package/cjs/type_plus/branch/$resolve_branch.d.ts.map +0 -1
- package/cjs/type_plus/branch/$resolve_branch.js.map +0 -1
- package/cjs/type_plus/branch/$select.d.ts +0 -77
- package/cjs/type_plus/branch/$select.d.ts.map +0 -1
- package/cjs/type_plus/branch/$select.js +0 -3
- package/cjs/type_plus/branch/$select.js.map +0 -1
- package/cjs/type_plus/branch/$select_invert.d.ts +0 -75
- package/cjs/type_plus/branch/$select_invert.d.ts.map +0 -1
- package/cjs/type_plus/branch/$select_invert.js +0 -3
- package/cjs/type_plus/branch/$select_invert.js.map +0 -1
- package/cjs/type_plus/branch/$select_invert_strict.d.ts +0 -75
- package/cjs/type_plus/branch/$select_invert_strict.d.ts.map +0 -1
- package/cjs/type_plus/branch/$select_invert_strict.js +0 -3
- package/cjs/type_plus/branch/$select_invert_strict.js.map +0 -1
- package/cjs/type_plus/branch/$select_strict.d.ts +0 -76
- package/cjs/type_plus/branch/$select_strict.d.ts.map +0 -1
- package/cjs/type_plus/branch/$select_strict.js +0 -3
- package/cjs/type_plus/branch/$select_strict.js.map +0 -1
- package/cjs/type_plus/branch/$selection.d.ts +0 -127
- package/cjs/type_plus/branch/$selection.d.ts.map +0 -1
- package/cjs/type_plus/branch/$selection.js.map +0 -1
- package/cjs/type_plus/branch/$selection_options.d.ts +0 -37
- package/cjs/type_plus/branch/$selection_options.d.ts.map +0 -1
- package/cjs/type_plus/branch/$selection_options.js +0 -3
- package/cjs/type_plus/branch/$selection_options.js.map +0 -1
- package/cjs/unknown/unknown.d.ts +0 -55
- package/cjs/unknown/unknown.d.ts.map +0 -1
- package/cjs/unknown/unknown.js +0 -3
- package/cjs/unknown/unknown.js.map +0 -1
- package/esm/any/any.d.ts +0 -49
- package/esm/any/any.d.ts.map +0 -1
- package/esm/any/any.js +0 -2
- package/esm/any/any.js.map +0 -1
- package/esm/binary/Bit.d.ts +0 -6
- package/esm/binary/Bit.d.ts.map +0 -1
- package/esm/binary/Bit.js +0 -2
- package/esm/binary/Bit.js.map +0 -1
- package/esm/binary/index.d.ts +0 -3
- package/esm/binary/index.d.ts.map +0 -1
- package/esm/binary/index.js +0 -3
- package/esm/binary/index.js.map +0 -1
- package/esm/never/never.d.ts +0 -75
- package/esm/never/never.d.ts.map +0 -1
- package/esm/never/never.js +0 -2
- package/esm/never/never.js.map +0 -1
- package/esm/predicates/logical.d.ts +0 -5
- package/esm/predicates/logical.d.ts.map +0 -1
- package/esm/type/failed.d.ts.map +0 -1
- package/esm/type/no_infer.d.ts.map +0 -1
- package/esm/type_plus/$equality.d.ts +0 -12
- package/esm/type_plus/$equality.d.ts.map +0 -1
- package/esm/type_plus/$equality.js +0 -2
- package/esm/type_plus/$equality.js.map +0 -1
- package/esm/type_plus/$error.d.ts +0 -8
- package/esm/type_plus/$error.d.ts.map +0 -1
- package/esm/type_plus/$infer_error.d.ts.map +0 -1
- package/esm/type_plus/$infer_error.js.map +0 -1
- package/esm/type_plus/$merge_options.d.ts +0 -11
- package/esm/type_plus/$merge_options.d.ts.map +0 -1
- package/esm/type_plus/$merge_options.js.map +0 -1
- package/esm/type_plus/$resolve_options.d.ts.map +0 -1
- package/esm/type_plus/$resolve_options.js.map +0 -1
- package/esm/type_plus/$special_type.d.ts +0 -19
- package/esm/type_plus/$special_type.d.ts.map +0 -1
- package/esm/type_plus/$special_type.js +0 -2
- package/esm/type_plus/$special_type.js.map +0 -1
- package/esm/type_plus/$type.d.ts +0 -11
- package/esm/type_plus/$type.d.ts.map +0 -1
- package/esm/type_plus/branch/$branch.d.ts.map +0 -1
- package/esm/type_plus/branch/$branch.js.map +0 -1
- package/esm/type_plus/branch/$distributive.d.ts +0 -19
- package/esm/type_plus/branch/$distributive.d.ts.map +0 -1
- package/esm/type_plus/branch/$distributive.js.map +0 -1
- package/esm/type_plus/branch/$exact.d.ts +0 -21
- package/esm/type_plus/branch/$exact.d.ts.map +0 -1
- package/esm/type_plus/branch/$input_options.d.ts.map +0 -1
- package/esm/type_plus/branch/$input_options.js.map +0 -1
- package/esm/type_plus/branch/$is_distributive.d.ts +0 -6
- package/esm/type_plus/branch/$is_distributive.d.ts.map +0 -1
- package/esm/type_plus/branch/$is_distributive.js +0 -2
- package/esm/type_plus/branch/$is_distributive.js.map +0 -1
- package/esm/type_plus/branch/$override.d.ts +0 -21
- package/esm/type_plus/branch/$override.d.ts.map +0 -1
- package/esm/type_plus/branch/$override.js +0 -2
- package/esm/type_plus/branch/$override.js.map +0 -1
- package/esm/type_plus/branch/$resolve_branch.d.ts +0 -29
- package/esm/type_plus/branch/$resolve_branch.d.ts.map +0 -1
- package/esm/type_plus/branch/$resolve_branch.js.map +0 -1
- package/esm/type_plus/branch/$select.d.ts +0 -77
- package/esm/type_plus/branch/$select.d.ts.map +0 -1
- package/esm/type_plus/branch/$select.js +0 -2
- package/esm/type_plus/branch/$select.js.map +0 -1
- package/esm/type_plus/branch/$select_invert.d.ts +0 -75
- package/esm/type_plus/branch/$select_invert.d.ts.map +0 -1
- package/esm/type_plus/branch/$select_invert.js +0 -2
- package/esm/type_plus/branch/$select_invert.js.map +0 -1
- package/esm/type_plus/branch/$select_invert_strict.d.ts +0 -75
- package/esm/type_plus/branch/$select_invert_strict.d.ts.map +0 -1
- package/esm/type_plus/branch/$select_invert_strict.js +0 -2
- package/esm/type_plus/branch/$select_invert_strict.js.map +0 -1
- package/esm/type_plus/branch/$select_strict.d.ts +0 -76
- package/esm/type_plus/branch/$select_strict.d.ts.map +0 -1
- package/esm/type_plus/branch/$select_strict.js +0 -2
- package/esm/type_plus/branch/$select_strict.js.map +0 -1
- package/esm/type_plus/branch/$selection.d.ts +0 -127
- package/esm/type_plus/branch/$selection.d.ts.map +0 -1
- package/esm/type_plus/branch/$selection.js.map +0 -1
- package/esm/type_plus/branch/$selection_options.d.ts +0 -37
- package/esm/type_plus/branch/$selection_options.d.ts.map +0 -1
- package/esm/type_plus/branch/$selection_options.js +0 -2
- package/esm/type_plus/branch/$selection_options.js.map +0 -1
- package/esm/unknown/unknown.d.ts +0 -55
- package/esm/unknown/unknown.d.ts.map +0 -1
- package/esm/unknown/unknown.js +0 -2
- package/esm/unknown/unknown.js.map +0 -1
- package/src/any/any.ts +0 -46
- package/src/binary/Bit.ts +0 -6
- package/src/binary/index.ts +0 -2
- package/src/never/never.ts +0 -78
- package/src/predicates/logical.ts +0 -19
- package/src/type/readme.md +0 -36
- package/src/type_plus/$equality.ts +0 -12
- package/src/type_plus/$error.ts +0 -8
- package/src/type_plus/$merge_options.ts +0 -8
- package/src/type_plus/$special_type.ts +0 -26
- package/src/type_plus/$type.ts +0 -10
- package/src/type_plus/branch/$distributive.ts +0 -19
- package/src/type_plus/branch/$exact.ts +0 -28
- package/src/type_plus/branch/$is_distributive.ts +0 -15
- package/src/type_plus/branch/$override.ts +0 -22
- package/src/type_plus/branch/$resolve_branch.ts +0 -71
- package/src/type_plus/branch/$select.ts +0 -89
- package/src/type_plus/branch/$select_invert.ts +0 -83
- package/src/type_plus/branch/$select_invert_strict.ts +0 -83
- package/src/type_plus/branch/$select_strict.ts +0 -88
- package/src/type_plus/branch/$selection.ts +0 -134
- package/src/type_plus/branch/$selection_options.ts +0 -36
- package/src/type_plus/readme.md +0 -25
- package/src/unknown/unknown.ts +0 -57
- /package/cjs/{type_plus → $type}/$resolve_options.js +0 -0
- /package/cjs/{type_plus → $type}/$type.js +0 -0
- /package/cjs/{type_plus → $type}/branch/$branch.js +0 -0
- /package/cjs/{type_plus → $type}/branch/$input_options.js +0 -0
- /package/cjs/{type_plus → $type}/branch/$resolve_branch.js +0 -0
- /package/cjs/{type_plus → $type}/branch/$selection.js +0 -0
- /package/cjs/{type_plus/branch → $type/distributive}/$distributive.js +0 -0
- /package/cjs/{type_plus → $type/errors}/$error.js +0 -0
- /package/cjs/{type_plus → $type/errors}/$infer_error.js +0 -0
- /package/cjs/{type → $type/errors}/failed.js +0 -0
- /package/cjs/{type_plus/branch → $type/exact}/$exact.js +0 -0
- /package/cjs/{type_plus → $type/utils}/$merge_options.js +0 -0
- /package/cjs/{predicates → logical}/logical.js +0 -0
- /package/cjs/{type → utils}/no_infer.js +0 -0
- /package/esm/{type_plus → $type}/$resolve_options.js +0 -0
- /package/esm/{type_plus → $type}/$type.js +0 -0
- /package/esm/{type_plus → $type}/branch/$branch.js +0 -0
- /package/esm/{type_plus → $type}/branch/$input_options.js +0 -0
- /package/esm/{type_plus → $type}/branch/$resolve_branch.js +0 -0
- /package/esm/{type_plus → $type}/branch/$selection.js +0 -0
- /package/esm/{type_plus/branch → $type/distributive}/$distributive.js +0 -0
- /package/esm/{type_plus → $type/errors}/$error.js +0 -0
- /package/esm/{type_plus → $type/errors}/$infer_error.js +0 -0
- /package/esm/{type → $type/errors}/failed.js +0 -0
- /package/esm/{type_plus/branch → $type/exact}/$exact.js +0 -0
- /package/esm/{type_plus → $type/utils}/$merge_options.js +0 -0
- /package/esm/{predicates → logical}/logical.js +0 -0
- /package/esm/{type → utils}/no_infer.js +0 -0
package/src/binary/Bit.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export type Bit = 0 | 1
|
|
2
|
-
|
|
3
|
-
export type BitNot<X extends Bit> = X extends 0 ? 1 : 0
|
|
4
|
-
export type BitAnd<A extends Bit, B extends Bit> = A extends 1 ? (B extends 1 ? 1 : 0) : 0
|
|
5
|
-
export type BitOr<A extends Bit, B extends Bit> = A extends 1 ? 1 : B extends 1 ? 1 : 0
|
|
6
|
-
export type BitXor<A extends Bit, B extends Bit> = A extends 1 ? BitNot<B> : B
|
package/src/binary/index.ts
DELETED
package/src/never/never.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type { $Branch } from '../type_plus/branch/$branch.js'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 🧰 *type util*
|
|
5
|
-
*
|
|
6
|
-
* A special branch type to indicate the type is `never`.
|
|
7
|
-
*/
|
|
8
|
-
export type $Never = $Branch<'$never'>
|
|
9
|
-
|
|
10
|
-
export namespace $Never {
|
|
11
|
-
/**
|
|
12
|
-
* 🧰 *type util*
|
|
13
|
-
*
|
|
14
|
-
* `$Never.$Options` enables customizing the behavior of the `$never` branch.
|
|
15
|
-
*
|
|
16
|
-
* The `$never` branch is used to handle when the input type is `never`.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```ts
|
|
20
|
-
* type YourType<
|
|
21
|
-
* T,
|
|
22
|
-
* $Options extends YourType.$Options = YourType.$Default
|
|
23
|
-
* > = ...
|
|
24
|
-
*
|
|
25
|
-
* namespace YourType {
|
|
26
|
-
* export type $Options = $Never.$Options
|
|
27
|
-
* export type $Branch = $Never.$Branch
|
|
28
|
-
* }
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
export type $Options = {
|
|
32
|
-
$never?: unknown
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* 🧰 *type util*
|
|
36
|
-
*
|
|
37
|
-
* `$Never.$Branch` is the branch option for the `$never` branch.
|
|
38
|
-
*
|
|
39
|
-
* It sets the value to `$Never`,
|
|
40
|
-
* so that the branch can be uniquely identified and handled.
|
|
41
|
-
*
|
|
42
|
-
* Use this to allow the consumer to customize the behavior of your type.
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```ts
|
|
46
|
-
* type YourType<T, $O extends $NeverOptions> = NeverType<T> extends infer R
|
|
47
|
-
* ? R extends $Never
|
|
48
|
-
* ? $ResolveOptions<[$O['$never'], never]>
|
|
49
|
-
* : HandleOtherBranches<R> // R is narrowed
|
|
50
|
-
* : never
|
|
51
|
-
*
|
|
52
|
-
* type R = YourType<T, $Never.$Branch> extends $Never ? HandleNever : HandleOthers
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
export type $Branch = {
|
|
56
|
-
$never: $Never
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* 🧰 *type util*
|
|
61
|
-
*
|
|
62
|
-
* Default option for the `$never` branch.
|
|
63
|
-
*
|
|
64
|
-
* Unsurprisingly, defaulting `$never` to `never`.
|
|
65
|
-
*/
|
|
66
|
-
export type $Default = {
|
|
67
|
-
$never: never
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* 🧰 *type util*
|
|
73
|
-
*
|
|
74
|
-
* `$NotNever` is a special branch type to indicate the type is not `never`.
|
|
75
|
-
*
|
|
76
|
-
* It is used in [`NeverType`](./never_type.ts).
|
|
77
|
-
*/
|
|
78
|
-
export type $NotNever = $Branch<'$not_never'>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export type And<A extends boolean, B extends boolean, Then = true, Else = false> = A extends true
|
|
2
|
-
? B extends true
|
|
3
|
-
? Then
|
|
4
|
-
: Else
|
|
5
|
-
: Else
|
|
6
|
-
|
|
7
|
-
export type Or<A extends boolean, B extends boolean, Then = true, Else = false> = A extends true
|
|
8
|
-
? Then
|
|
9
|
-
: B extends true
|
|
10
|
-
? Then
|
|
11
|
-
: Else
|
|
12
|
-
|
|
13
|
-
export type Not<X extends boolean, Then = true, Else = false> = X extends true ? Else : Then
|
|
14
|
-
|
|
15
|
-
export type Xor<A extends boolean, B extends boolean, Then = true, Else = false> = A extends Then
|
|
16
|
-
? Not<B>
|
|
17
|
-
: B extends true
|
|
18
|
-
? Then
|
|
19
|
-
: Else
|
package/src/type/readme.md
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# type
|
|
2
|
-
|
|
3
|
-
General type utilities.
|
|
4
|
-
|
|
5
|
-
## Failed
|
|
6
|
-
|
|
7
|
-
`Failed<Msg>` is a type to describe a failure.
|
|
8
|
-
|
|
9
|
-
Use the same concept to create your own failure types.
|
|
10
|
-
|
|
11
|
-
```ts
|
|
12
|
-
import { type Failed } from 'type-plus'
|
|
13
|
-
|
|
14
|
-
type YourComplexType<A,B,C> = A extends B ?
|
|
15
|
-
... // and many more hard work later...
|
|
16
|
-
: Failed<'you are doing something wrong!'>
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
[![Just Code: I failed][failed-type]][failed-type-url]
|
|
20
|
-
|
|
21
|
-
## NoInfer
|
|
22
|
-
|
|
23
|
-
`NoInfer<T>` is a type to prevent type inference.
|
|
24
|
-
|
|
25
|
-
```ts
|
|
26
|
-
import { type NoInfer } from 'type-plus'
|
|
27
|
-
|
|
28
|
-
function assertEqual<T>(a: T, b: NoInfer<T>) {
|
|
29
|
-
return a === b
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function stub<T>(v: RecursivePartial<NoInfer<T>>): T { return v }
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
[failed-type]: https://img.youtube.com/vi/3pEXVe6KJO4/0.jpg
|
|
36
|
-
[failed-type-url]: https://www.youtube.com/live/3pEXVe6KJO4
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { $Any } from '../any/any.js'
|
|
2
|
-
import type { $Never } from '../never/never.js'
|
|
3
|
-
import type { $Unknown } from '../unknown/unknown.js'
|
|
4
|
-
import type { $DistributiveOptions } from './branch/$distributive.js'
|
|
5
|
-
import type { $InputOptions } from './branch/$input_options.js'
|
|
6
|
-
import type { $SelectionBranch } from './branch/$selection.js'
|
|
7
|
-
import type { $SelectionOptions } from './branch/$selection_options.js'
|
|
8
|
-
|
|
9
|
-
export namespace $Equality {
|
|
10
|
-
export type $Options = $SelectionOptions & $DistributiveOptions & $InputOptions<$Any | $Unknown | $Never>
|
|
11
|
-
export type $Branch<$O extends $SelectionOptions = {}> = $SelectionBranch<$O>
|
|
12
|
-
}
|
package/src/type_plus/$error.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { $Any } from '../any/any.js'
|
|
2
|
-
import type { $Never } from '../never/never.js'
|
|
3
|
-
import type { $Unknown } from '../unknown/unknown.js'
|
|
4
|
-
import type { $BranchOptions } from './branch/$branch.js'
|
|
5
|
-
import type { $InputOptions } from './branch/$input_options.js'
|
|
6
|
-
import type { $ResolveBranch } from './branch/$resolve_branch.js'
|
|
7
|
-
import type { $Else, $SelectionBranch, $Then } from './branch/$selection.js'
|
|
8
|
-
import type { $SelectionOptions } from './branch/$selection_options.js'
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 🧰 *type util*
|
|
12
|
-
*
|
|
13
|
-
* A type utility to handle special types: `any`, `unknown`, and `never`.
|
|
14
|
-
*/
|
|
15
|
-
export type $SpecialType<T, $O extends $SpecialType.$Options> = 0 extends 1 & T
|
|
16
|
-
? $ResolveBranch<T, $O, [$Any, $Then]>
|
|
17
|
-
: [T, unknown] extends [unknown, T]
|
|
18
|
-
? $ResolveBranch<T, $O, [$Unknown, $Then]>
|
|
19
|
-
: [T, never] extends [never, T]
|
|
20
|
-
? $ResolveBranch<T, $O, [$Never, $Then]>
|
|
21
|
-
: $ResolveBranch<T, $O, [$Else]>
|
|
22
|
-
|
|
23
|
-
export namespace $SpecialType {
|
|
24
|
-
export type $Options = $SelectionOptions & $InputOptions<$Any | $Unknown | $Never>
|
|
25
|
-
export type $Branch = $SelectionBranch & $BranchOptions<$Any | $Unknown | $Never>
|
|
26
|
-
}
|
package/src/type_plus/$type.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 🧰 *type util*
|
|
3
|
-
*
|
|
4
|
-
* Options for to control if the type is distributive.
|
|
5
|
-
*/
|
|
6
|
-
export type $DistributiveOptions = {
|
|
7
|
-
distributive?: boolean | undefined
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* 🧰 *type util*
|
|
12
|
-
*
|
|
13
|
-
* Default options for `distributive` behavior.
|
|
14
|
-
*
|
|
15
|
-
* By default it is `true`.
|
|
16
|
-
*/
|
|
17
|
-
export type $DistributiveDefault = {
|
|
18
|
-
distributive: true
|
|
19
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { $ResolveOptions } from '../$resolve_options.js'
|
|
2
|
-
import type { $InputOptions } from './$input_options.js'
|
|
3
|
-
import type { $Else, $Then } from './$selection.js'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 🧰 *type util*
|
|
7
|
-
*
|
|
8
|
-
* `$Exact.$Options` enables customizing the behavior of the `$exact` branch.
|
|
9
|
-
*
|
|
10
|
-
* The `$exact` branch is used to handle when it is an exact comparison.
|
|
11
|
-
*/
|
|
12
|
-
export type $ExactOptions = {
|
|
13
|
-
exact?: boolean | undefined
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type $ExactDefault = {
|
|
17
|
-
exact: false
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export type $IsExact<$Opt extends $ExactOptions, $O extends $InputOptions<$Then | $Else> = {}> = $ResolveOptions<
|
|
21
|
-
[$Opt['exact'], $ExactDefault]
|
|
22
|
-
> extends true
|
|
23
|
-
? '$then' extends keyof $O
|
|
24
|
-
? $O['$then']
|
|
25
|
-
: true
|
|
26
|
-
: '$else' extends keyof $O
|
|
27
|
-
? $O['$else']
|
|
28
|
-
: false
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { $ResolveOptions } from '../$resolve_options.js'
|
|
2
|
-
import type { $DistributiveDefault, $DistributiveOptions } from './$distributive.js'
|
|
3
|
-
import type { $InputOptions } from './$input_options.js'
|
|
4
|
-
import type { $Else, $Then } from './$selection.js'
|
|
5
|
-
|
|
6
|
-
export type $IsDistributive<
|
|
7
|
-
$Options extends $DistributiveOptions,
|
|
8
|
-
$O extends $InputOptions<$Then | $Else> = {},
|
|
9
|
-
> = $ResolveOptions<[$Options['distributive'], $DistributiveDefault['distributive']]> extends true
|
|
10
|
-
? '$then' extends keyof $O
|
|
11
|
-
? $O['$then']
|
|
12
|
-
: true
|
|
13
|
-
: '$else' extends keyof $O
|
|
14
|
-
? $O['$else']
|
|
15
|
-
: false
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { $Type } from '../$type.js'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 🧰 *type util*
|
|
5
|
-
*
|
|
6
|
-
* A utility type to override the behavior of a branch.
|
|
7
|
-
*
|
|
8
|
-
* ```ts
|
|
9
|
-
* type R = IsString<any, { $any: DoThisInstead }> // DoThisInstead
|
|
10
|
-
* type R = IsString<any, { $any: $Override<DoThisInstead> }> // use DoThisInstead as the sole branch logic
|
|
11
|
-
* ```
|
|
12
|
-
*/
|
|
13
|
-
export type $Override<T> = $Type<'override', 'override', T>
|
|
14
|
-
|
|
15
|
-
export namespace $Override {
|
|
16
|
-
/**
|
|
17
|
-
* 🧰 *type util*
|
|
18
|
-
*
|
|
19
|
-
* A utility type to unwrap an override.
|
|
20
|
-
*/
|
|
21
|
-
export type $Unwrap<T> = T extends $Override<infer U> ? U : T
|
|
22
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { $Branch } from './$branch.js'
|
|
2
|
-
import type { $Override } from './$override.js'
|
|
3
|
-
import type { $Else, $Then } from './$selection.js'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 🧰 *type util*
|
|
7
|
-
*
|
|
8
|
-
* Resolve option value based on list of branches.
|
|
9
|
-
* It returns the first branch value that is specified in the option,
|
|
10
|
-
* otherwise will return the default value.
|
|
11
|
-
*
|
|
12
|
-
* Since this is an type utility,
|
|
13
|
-
* it does not perform extensive validations.
|
|
14
|
-
* Please check the description of each input below for information.
|
|
15
|
-
*
|
|
16
|
-
* @typeparam $O Should be a Record, not any, unknown, or never
|
|
17
|
-
* @typeparam $B Tuple of branches with at least one entry.
|
|
18
|
-
* @typeparam $D When specified, resolve the branch in override mode.
|
|
19
|
-
* If no branch in `$B` is resolved to `$Override<X>`, `$D` will be returned.
|
|
20
|
-
*/
|
|
21
|
-
export type $ResolveBranch<
|
|
22
|
-
T,
|
|
23
|
-
$O extends Record<string, any>,
|
|
24
|
-
$B extends Array<$Branch<any> | unknown>,
|
|
25
|
-
$D = unknown,
|
|
26
|
-
> = [unknown, $D] extends [$D, unknown]
|
|
27
|
-
? $B extends [infer B]
|
|
28
|
-
? $ResolveBranch._Last<T, $O, B>
|
|
29
|
-
: $B extends [infer B, ...infer Bs extends Array<$Branch<any> | unknown>]
|
|
30
|
-
? $ResolveBranch._<$ResolveBranch<T, $O, Bs>, $O, B>
|
|
31
|
-
: never
|
|
32
|
-
: $ResolveBranch._Override<$D, $O, $B>
|
|
33
|
-
|
|
34
|
-
export namespace $ResolveBranch {
|
|
35
|
-
export type _Override<$D, $O extends Record<string, any>, $B extends Array<$Branch<any> | unknown>> = $B extends [
|
|
36
|
-
infer B,
|
|
37
|
-
]
|
|
38
|
-
? _OLast<$D, $O, B>
|
|
39
|
-
: $B extends [infer B, ...infer Bs extends Array<$Branch<any> | unknown>]
|
|
40
|
-
? _OLast<_Override<$D, $O, Bs>, $O, B>
|
|
41
|
-
: never
|
|
42
|
-
|
|
43
|
-
export type _OLast<$D, $O extends Record<string, any>, $B extends $Branch<any> | unknown> = $B extends $Branch<any>
|
|
44
|
-
? $B['value'] extends keyof $O
|
|
45
|
-
? $O[$B['value']] extends infer R extends $Override<any>
|
|
46
|
-
? [R, never] extends [never, R]
|
|
47
|
-
? $D
|
|
48
|
-
: R['value']
|
|
49
|
-
: $D
|
|
50
|
-
: $D
|
|
51
|
-
: $D
|
|
52
|
-
|
|
53
|
-
export type _<T, $O extends Record<string, any>, $B> = $B extends $Branch<any>
|
|
54
|
-
? $B['value'] extends keyof $O
|
|
55
|
-
? $Override.$Unwrap<$O[$B['value']]>
|
|
56
|
-
: T
|
|
57
|
-
: T
|
|
58
|
-
export type _Last<T, $O extends Record<string, any>, $B> = $B extends $Then
|
|
59
|
-
? '$then' extends keyof $O
|
|
60
|
-
? $Override.$Unwrap<$O['$then']>
|
|
61
|
-
: $O['selection'] extends 'filter'
|
|
62
|
-
? T
|
|
63
|
-
: true
|
|
64
|
-
: $B extends $Else
|
|
65
|
-
? '$else' extends keyof $O
|
|
66
|
-
? $Override.$Unwrap<$O['$else']>
|
|
67
|
-
: $O['selection'] extends 'filter'
|
|
68
|
-
? never
|
|
69
|
-
: false
|
|
70
|
-
: _<T, $O, $B>
|
|
71
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import type { $SpecialType } from '../$special_type.js'
|
|
2
|
-
import type { $Any } from '../../any/any.js'
|
|
3
|
-
import type { $Never } from '../../never/never.js'
|
|
4
|
-
import type { $Unknown } from '../../unknown/unknown.js'
|
|
5
|
-
import type { $DistributiveDefault, $DistributiveOptions } from './$distributive.js'
|
|
6
|
-
import type { $ExactOptions } from './$exact.js'
|
|
7
|
-
import type { $InputOptions } from './$input_options.js'
|
|
8
|
-
import type { $IsDistributive } from './$is_distributive.js'
|
|
9
|
-
import type { $ResolveBranch } from './$resolve_branch.js'
|
|
10
|
-
import type { $Else, $SelectionBranch, $SelectionPredicate, $Then } from './$selection.js'
|
|
11
|
-
import type { $SelectionOptions } from './$selection_options.js'
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* 🎭 *predicate*
|
|
15
|
-
* ㊙️ *internal*
|
|
16
|
-
*
|
|
17
|
-
* Validate if `T` is `U`.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```ts
|
|
21
|
-
* type R = $Select<undefined, undefined> // true
|
|
22
|
-
*
|
|
23
|
-
* type R = $Select<never, undefined> // false
|
|
24
|
-
* type R = $Select<unknown, undefined> // false
|
|
25
|
-
* type R = $Select<string | boolean, undefined> // false
|
|
26
|
-
*
|
|
27
|
-
* type R = $Select<string | undefined, undefined> // boolean
|
|
28
|
-
* ```
|
|
29
|
-
*
|
|
30
|
-
* 🔢 *customize*
|
|
31
|
-
*
|
|
32
|
-
* Filter to ensure `T` is `U`, otherwise returns `never`.
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```ts
|
|
36
|
-
* type R = $Select<undefined, undefined, { selection: 'filter' }> // undefined
|
|
37
|
-
*
|
|
38
|
-
* type R = $Select<never, undefined, { selection: 'filter' }> // never
|
|
39
|
-
* type R = $Select<unknown, undefined, { selection: 'filter' }> // never
|
|
40
|
-
* type R = $Select<string | boolean, undefined, { selection: 'filter' }> // never
|
|
41
|
-
*
|
|
42
|
-
* type R = $Select<string | undefined, undefined> // undefined
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* 🔢 *customize*:
|
|
46
|
-
*
|
|
47
|
-
* Disable distribution of union types.
|
|
48
|
-
*
|
|
49
|
-
* ```ts
|
|
50
|
-
* type R = $Select<undefined | 1, undefined> // boolean
|
|
51
|
-
* type R = $Select<undefined | 1, undefined, { distributive: false }> // false
|
|
52
|
-
* ```
|
|
53
|
-
*
|
|
54
|
-
* 🔢 *customize*
|
|
55
|
-
*
|
|
56
|
-
* Use unique branch identifiers to allow precise processing of the result.
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```ts
|
|
60
|
-
* type R = $Select<undefined, undefined, $SelectionBranch> // $Then
|
|
61
|
-
* type R = $Select<string, undefined, $SelectionBranch> // $Else
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
|
-
export type $Select<T, U, $O extends $Select.$Options = {}> = $SpecialType<
|
|
65
|
-
T,
|
|
66
|
-
{
|
|
67
|
-
$any: $ResolveBranch<T, $O, [$Any, $Else]>
|
|
68
|
-
$unknown: $ResolveBranch<T, $O, [$Unknown, $Else]>
|
|
69
|
-
$never: $ResolveBranch<T, $O, [$Never, $Else]>
|
|
70
|
-
$else: $ResolveBranch<T, $O, [$Else], $Select._<T, U, $O>>
|
|
71
|
-
}
|
|
72
|
-
>
|
|
73
|
-
|
|
74
|
-
export namespace $Select {
|
|
75
|
-
export type $Options = $SelectionOptions &
|
|
76
|
-
$DistributiveOptions &
|
|
77
|
-
$InputOptions<$Any | $Unknown | $Never> &
|
|
78
|
-
$ExactOptions
|
|
79
|
-
export type $Default = $SelectionPredicate & $DistributiveDefault
|
|
80
|
-
export type $Branch<$O extends $DistributiveOptions = $DistributiveDefault> = $SelectionBranch & $O
|
|
81
|
-
export type _<T, U, $O extends $Select.$Options> = $IsDistributive<$O> extends true ? _D<T, U, $O> : _N<T, U, $O>
|
|
82
|
-
|
|
83
|
-
export type _D<T, U, $O extends $Select.$Options> = T extends U
|
|
84
|
-
? $ResolveBranch<T, $O, [$Then]>
|
|
85
|
-
: $ResolveBranch<T, $O, [$Else]>
|
|
86
|
-
export type _N<T, U, $O extends $Select.$Options> = [T] extends [U]
|
|
87
|
-
? $ResolveBranch<T, $O, [$Then]>
|
|
88
|
-
: $ResolveBranch<T, $O, [$Else]>
|
|
89
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import type { $Any } from '../../any/any.js'
|
|
2
|
-
import type { $Never } from '../../never/never.js'
|
|
3
|
-
import type { $Unknown } from '../../unknown/unknown.js'
|
|
4
|
-
import type { $SpecialType } from '../$special_type.js'
|
|
5
|
-
import type { $DistributiveDefault, $DistributiveOptions } from './$distributive.js'
|
|
6
|
-
import type { $InputOptions } from './$input_options.js'
|
|
7
|
-
import type { $IsDistributive } from './$is_distributive.js'
|
|
8
|
-
import type { $ResolveBranch } from './$resolve_branch.js'
|
|
9
|
-
import type { $Else, $SelectionBranch, $SelectionPredicate, $Then } from './$selection.js'
|
|
10
|
-
import type { $SelectionOptions } from './$selection_options.js'
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 🎭 *predicate*
|
|
14
|
-
* ㊙️ *internal*
|
|
15
|
-
*
|
|
16
|
-
* Validate if `T` is `U`.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```ts
|
|
20
|
-
* type R = $SelectInvert<undefined, undefined> // true
|
|
21
|
-
*
|
|
22
|
-
* type R = $SelectInvert<never, undefined> // false
|
|
23
|
-
* type R = $SelectInvert<unknown, undefined> // false
|
|
24
|
-
* type R = $SelectInvert<string | boolean, undefined> // false
|
|
25
|
-
*
|
|
26
|
-
* type R = $SelectInvert<string | undefined, undefined> // boolean
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* 🔢 *customize*
|
|
30
|
-
*
|
|
31
|
-
* Filter to ensure `T` is `U`, otherwise returns `never`.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```ts
|
|
35
|
-
* type R = $SelectInvert<undefined, undefined, { selection: 'filter' }> // undefined
|
|
36
|
-
*
|
|
37
|
-
* type R = $SelectInvert<never, undefined, { selection: 'filter' }> // never
|
|
38
|
-
* type R = $SelectInvert<unknown, undefined, { selection: 'filter' }> // never
|
|
39
|
-
* type R = $SelectInvert<string | boolean, undefined, { selection: 'filter' }> // never
|
|
40
|
-
*
|
|
41
|
-
* type R = $SelectInvert<string | undefined, undefined> // undefined
|
|
42
|
-
* ```
|
|
43
|
-
*
|
|
44
|
-
* 🔢 *customize*:
|
|
45
|
-
*
|
|
46
|
-
* Disable distribution of union types.
|
|
47
|
-
*
|
|
48
|
-
* ```ts
|
|
49
|
-
* type R = $SelectInvert<undefined | 1, undefined> // boolean
|
|
50
|
-
* type R = $SelectInvert<undefined | 1, undefined, { distributive: false }> // false
|
|
51
|
-
* ```
|
|
52
|
-
*
|
|
53
|
-
* 🔢 *customize*
|
|
54
|
-
*
|
|
55
|
-
* Use unique branch identifiers to allow precise processing of the result.
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* ```ts
|
|
59
|
-
* type R = $SelectInvert<undefined, undefined, $SelectionBranch> // $Then
|
|
60
|
-
* type R = $SelectInvert<string, undefined, $SelectionBranch> // $Else
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
export type $SelectInvert<T, U, $O extends $SelectInvert.$Options = {}> = $SpecialType<
|
|
64
|
-
T,
|
|
65
|
-
{
|
|
66
|
-
$any: $ResolveBranch<T, $O, [$Any, $Then]>
|
|
67
|
-
$unknown: $ResolveBranch<T, $O, [$Unknown, $Then]>
|
|
68
|
-
$never: $ResolveBranch<T, $O, [$Never, $Then]>
|
|
69
|
-
$else: $IsDistributive<$O> extends true ? $SelectInvert._D<T, U, $O> : $SelectInvert._N<T, U, $O>
|
|
70
|
-
}
|
|
71
|
-
>
|
|
72
|
-
|
|
73
|
-
export namespace $SelectInvert {
|
|
74
|
-
export type $Options = $SelectionOptions & $DistributiveOptions & $InputOptions<$Any | $Unknown | $Never>
|
|
75
|
-
export type $Default = $SelectionPredicate & $DistributiveDefault
|
|
76
|
-
export type $Branch = $SelectionBranch & $DistributiveDefault
|
|
77
|
-
export type _D<T, U, $O extends $SelectInvert.$Options> = T extends U
|
|
78
|
-
? $ResolveBranch<T, $O, [$Else]>
|
|
79
|
-
: $ResolveBranch<T, $O, [$Then]>
|
|
80
|
-
export type _N<T, U, $O extends $SelectInvert.$Options> = [T] extends [U]
|
|
81
|
-
? $ResolveBranch<T, $O, [$Else]>
|
|
82
|
-
: $ResolveBranch<T, $O, [$Then]>
|
|
83
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import type { $Any } from '../../any/any.js'
|
|
2
|
-
import type { $Never } from '../../never/never.js'
|
|
3
|
-
import type { $Unknown } from '../../unknown/unknown.js'
|
|
4
|
-
import type { $SpecialType } from '../$special_type.js'
|
|
5
|
-
import type { $DistributiveDefault, $DistributiveOptions } from './$distributive.js'
|
|
6
|
-
import type { $InputOptions } from './$input_options.js'
|
|
7
|
-
import type { $IsDistributive } from './$is_distributive.js'
|
|
8
|
-
import type { $ResolveBranch } from './$resolve_branch.js'
|
|
9
|
-
import type { $Else, $SelectionBranch, $SelectionPredicate, $Then } from './$selection.js'
|
|
10
|
-
import type { $SelectionOptions } from './$selection_options.js'
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 🎭 *predicate*
|
|
14
|
-
* ㊙️ *internal*
|
|
15
|
-
*
|
|
16
|
-
* Validate if `T` is `U`.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```ts
|
|
20
|
-
* type R = $SelectInvertStrict<undefined, undefined> // true
|
|
21
|
-
*
|
|
22
|
-
* type R = $SelectInvertStrict<never, undefined> // false
|
|
23
|
-
* type R = $SelectInvertStrict<unknown, undefined> // false
|
|
24
|
-
* type R = $SelectInvertStrict<string | boolean, undefined> // false
|
|
25
|
-
*
|
|
26
|
-
* type R = $SelectInvertStrict<string | undefined, undefined> // boolean
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* 🔢 *customize*
|
|
30
|
-
*
|
|
31
|
-
* Filter to ensure `T` is `U`, otherwise returns `never`.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```ts
|
|
35
|
-
* type R = $SelectInvertStrict<undefined, undefined, { selection: 'filter' }> // undefined
|
|
36
|
-
*
|
|
37
|
-
* type R = $SelectInvertStrict<never, undefined, { selection: 'filter' }> // never
|
|
38
|
-
* type R = $SelectInvertStrict<unknown, undefined, { selection: 'filter' }> // never
|
|
39
|
-
* type R = $SelectInvertStrict<string | boolean, undefined, { selection: 'filter' }> // never
|
|
40
|
-
*
|
|
41
|
-
* type R = $SelectInvertStrict<string | undefined, undefined> // undefined
|
|
42
|
-
* ```
|
|
43
|
-
*
|
|
44
|
-
* 🔢 *customize*:
|
|
45
|
-
*
|
|
46
|
-
* Disable distribution of union types.
|
|
47
|
-
*
|
|
48
|
-
* ```ts
|
|
49
|
-
* type R = $SelectInvertStrict<undefined | 1, undefined> // boolean
|
|
50
|
-
* type R = $SelectInvertStrict<undefined | 1, undefined, { distributive: false }> // false
|
|
51
|
-
* ```
|
|
52
|
-
*
|
|
53
|
-
* 🔢 *customize*
|
|
54
|
-
*
|
|
55
|
-
* Use unique branch identifiers to allow precise processing of the result.
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* ```ts
|
|
59
|
-
* type R = $SelectInvertStrict<undefined, undefined, $SelectionBranch> // $Then
|
|
60
|
-
* type R = $SelectInvertStrict<string, undefined, $SelectionBranch> // $Else
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
export type $SelectInvertStrict<T, U, $O extends $SelectInvertStrict.$Options = {}> = $SpecialType<
|
|
64
|
-
T,
|
|
65
|
-
{
|
|
66
|
-
$any: $ResolveBranch<T, $O, [$Any, $Then]>
|
|
67
|
-
$unknown: $ResolveBranch<T, $O, [$Unknown, $Then]>
|
|
68
|
-
$never: $ResolveBranch<T, $O, [$Never, $Then]>
|
|
69
|
-
$else: $IsDistributive<$O> extends true ? $SelectInvertStrict._D<T, U, $O> : $SelectInvertStrict._N<T, U, $O>
|
|
70
|
-
}
|
|
71
|
-
>
|
|
72
|
-
|
|
73
|
-
export namespace $SelectInvertStrict {
|
|
74
|
-
export type $Options = $SelectionOptions & $DistributiveOptions & $InputOptions<$Any | $Unknown | $Never>
|
|
75
|
-
export type $Default = $SelectionPredicate & $DistributiveDefault
|
|
76
|
-
export type $Branch = $SelectionBranch & $DistributiveDefault
|
|
77
|
-
export type _D<T, U, $O extends $SelectInvertStrict.$Options> = T extends U
|
|
78
|
-
? $ResolveBranch<T, $O, [$Else]>
|
|
79
|
-
: $ResolveBranch<T, $O, [$Then]>
|
|
80
|
-
export type _N<T, U, $O extends $SelectInvertStrict.$Options> = [T, U] extends [U, T]
|
|
81
|
-
? $ResolveBranch<T, $O, [$Else]>
|
|
82
|
-
: $ResolveBranch<T, $O, [$Then]>
|
|
83
|
-
}
|