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/cjs/equal/equal.d.ts
CHANGED
|
@@ -1,103 +1,218 @@
|
|
|
1
|
+
import type { $InputOptions } from '../$type/branch/$input_options.js';
|
|
2
|
+
import type { $ResolveBranch } from '../$type/branch/$resolve_branch.js';
|
|
3
|
+
import type { $Else, $Selection, $Then } from '../$type/branch/$selection.js';
|
|
4
|
+
import type { $Distributive } from '../$type/distributive/$distributive.js';
|
|
5
|
+
import type { $Any } from '../$type/special/$any.js';
|
|
6
|
+
import type { $Never } from '../$type/special/$never.js';
|
|
7
|
+
import type { $Special } from '../$type/special/$special.js';
|
|
8
|
+
import type { $Unknown } from '../$type/special/$unknown.js';
|
|
9
|
+
import type { $Void } from '../$type/special/$void.js';
|
|
1
10
|
import type { IsAny } from '../any/is_any.js';
|
|
11
|
+
import type { And, Or } from '../logical/logical.js';
|
|
2
12
|
import type { IsNever } from '../never/is_never.js';
|
|
3
13
|
import type { IsObject } from '../object/is_object.js';
|
|
4
14
|
import type { Properties } from '../object/properties.js';
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type { IdentityEqual } from './identity_equal.js';
|
|
8
|
-
type BothNever<A, B, Both, One, None> = And<IsNever<A>, IsNever<B>, Both, Or<IsNever<A>, IsNever<B>, One, None>>;
|
|
9
|
-
type BothAny<A, B, Both, One, None> = And<IsAny<A>, IsAny<B>, Both, Or<IsAny<A>, IsAny<B>, One, None>>;
|
|
15
|
+
import type { Assignable } from '../predicates/assignable.js';
|
|
16
|
+
import type { IsEqual } from './is_equal.js';
|
|
10
17
|
/**
|
|
11
|
-
*
|
|
18
|
+
* 🎭 *predicate*
|
|
12
19
|
*
|
|
13
|
-
*
|
|
14
|
-
* type R = IsEqual<1, 1> // true
|
|
15
|
-
* type R = IsEqual<any, any> // true
|
|
16
|
-
* type R = IsEqual<boolean, boolean> // true
|
|
17
|
-
* type R = IsEqual<true, true> // true
|
|
18
|
-
* type R = IsEqual<[1], [1]> // true
|
|
19
|
-
*
|
|
20
|
-
* type R = IsEqual<boolean, true> // false
|
|
21
|
-
* type R = IsEqual<any, 1> // false
|
|
22
|
-
* type R = IsEqual<[any], [1]> // false
|
|
23
|
-
* type R = IsEqual<{ a: 1 }, { a: 1; b: 2 }> // false
|
|
24
|
-
* ```
|
|
20
|
+
* Validate `A` and `B` are "equal".
|
|
25
21
|
*
|
|
26
22
|
* Note that intersection type checks only works at first level.
|
|
27
23
|
* It cannot be check recursively,
|
|
28
24
|
* or else will run into infinite recursion if the type includes recursive types.
|
|
29
|
-
*/
|
|
30
|
-
export type IsEqual<A, B, Then = true, Else = false> = [A, B] extends [B, A] ? BothNever<A, B, Then, Else, BothAny<A, B, Then, Else, IdentityEqual<A, B, Then, And<IsObject<A>, IsObject<B>, IdentityEqual<Properties<A>, Properties<B>, [
|
|
31
|
-
A,
|
|
32
|
-
B
|
|
33
|
-
] extends [(...args: infer P1) => any, (...args: infer P2) => any] ? IsEqual<P1, P2, Then, Else> : Then, Else>, [
|
|
34
|
-
A,
|
|
35
|
-
B
|
|
36
|
-
] extends [B, A] ? Then : Else>>>> : And<IsSymbol<A, {
|
|
37
|
-
distributive: false;
|
|
38
|
-
}>, IsSymbol<B, {
|
|
39
|
-
distributive: false;
|
|
40
|
-
}>, Then, Else>;
|
|
41
|
-
/**
|
|
42
|
-
* Checks `A` and `B` are not equal.
|
|
43
25
|
*
|
|
26
|
+
* @example
|
|
44
27
|
* ```ts
|
|
45
|
-
* type R =
|
|
46
|
-
*
|
|
47
|
-
* type R =
|
|
48
|
-
* type R =
|
|
49
|
-
* type R =
|
|
50
|
-
*
|
|
51
|
-
* type R =
|
|
52
|
-
* type R = IsNotEqual<any, 1> // true
|
|
53
|
-
* type R = IsNotEqual<[any], [1]> // true
|
|
54
|
-
* type R = IsNotEqual<{ a: 1 }, { a: 1; b: 2 }> // true
|
|
28
|
+
* type R = Equal<undefined, undefined> // true
|
|
29
|
+
*
|
|
30
|
+
* type R = Equal<never, undefined> // false
|
|
31
|
+
* type R = Equal<unknown, undefined> // false
|
|
32
|
+
* type R = Equal<string | boolean, undefined> // false
|
|
33
|
+
*
|
|
34
|
+
* type R = Equal<string | undefined, undefined> // boolean
|
|
55
35
|
* ```
|
|
56
36
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
37
|
+
* 🔱 **branching**
|
|
38
|
+
*
|
|
39
|
+
* Use unique branch identifiers to allow precise processing of the result.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* type R = Equal<undefined, undefined, Equal.$Branch> // $Then
|
|
44
|
+
* type R = Equal<string, undefined, Equal.$Branch> // $Else
|
|
45
|
+
* ```
|
|
60
46
|
*/
|
|
61
|
-
export type
|
|
47
|
+
export type Equal<A, B, $O extends Equal.$Options = {}> = [A, B] extends [B, A] ? BothNever<A, B, $ResolveBranch<$O, [$Then]>, $ResolveBranch<$O, [$Else]>, BothAny<A, B, $ResolveBranch<$O, [$Then]>, $ResolveBranch<$O, [$Else]>, Equal.$Same<A, B, {
|
|
48
|
+
$then: $ResolveBranch<$O, [$Then]>;
|
|
49
|
+
$else: [IsObject<A>, IsObject<B>] extends [true, true] ? Equal.$Same<Properties<A>, Properties<B>, {
|
|
50
|
+
$then: [A, B] extends [(...args: infer P1) => any, (...args: infer P2) => any] ? IsEqual<P1, P2, $ResolveBranch<$O, [$Then]>, $ResolveBranch<$O, [$Else]>> : $ResolveBranch<$O, [$Then]>;
|
|
51
|
+
$else: $ResolveBranch<$O, [$Else]>;
|
|
52
|
+
}> : [
|
|
53
|
+
A,
|
|
54
|
+
B
|
|
55
|
+
] extends [B, A] ? $ResolveBranch<$O, [$Then]> : $ResolveBranch<$O, [$Else]>;
|
|
56
|
+
}>>> : $ResolveBranch<$O, [$Else], A>;
|
|
57
|
+
type BothNever<A, B, Both, One, None> = And<IsNever<A>, IsNever<B>, {
|
|
58
|
+
$then: Both;
|
|
59
|
+
$else: Or<IsNever<A>, IsNever<B>, {
|
|
60
|
+
$then: One;
|
|
61
|
+
$else: None;
|
|
62
|
+
}>;
|
|
63
|
+
}>;
|
|
64
|
+
type BothAny<A, B, Both, One, None> = And<IsAny<A>, IsAny<B>, {
|
|
65
|
+
$then: Both;
|
|
66
|
+
$else: Or<IsAny<A>, IsAny<B>, {
|
|
67
|
+
$then: One;
|
|
68
|
+
$else: None;
|
|
69
|
+
}>;
|
|
70
|
+
}>;
|
|
71
|
+
export declare namespace Equal {
|
|
72
|
+
type $Options = $Selection.$BaseOptions;
|
|
73
|
+
type $Default = $Selection.Predicate;
|
|
74
|
+
type $Branch = $Selection.Branch;
|
|
75
|
+
type _ExactEqualDistributive<T, U, $O extends $Options> = T extends U ? U extends T ? $ResolveBranch<$O, [$Then], T> : $ResolveBranch<$O, [$Else]> : $ResolveBranch<$O, [$Else]>;
|
|
76
|
+
type _ExactEqualNonDistributive<T, U, $O extends $Options> = [T, U] extends [U, T] ? $ResolveBranch<$O, [$Then], T> : $ResolveBranch<$O, [$Else]>;
|
|
77
|
+
/**
|
|
78
|
+
* 🎭 *predicate*
|
|
79
|
+
*
|
|
80
|
+
* Validate `A` and `B` are identically equal.
|
|
81
|
+
*/
|
|
82
|
+
type $Same<A, B, $O extends $Options> = (<_>() => _ extends (A & _) | _ ? 1 : 2) extends <_>() => _ extends (B & _) | _ ? 1 : 2 ? $O['$then'] : $O['$else'];
|
|
83
|
+
type $ToProps<T> = Assignable.$<object, T, {
|
|
84
|
+
$then: T & Properties<T>;
|
|
85
|
+
$else: T & Properties<T>;
|
|
86
|
+
}>;
|
|
87
|
+
}
|
|
62
88
|
/**
|
|
63
|
-
*
|
|
89
|
+
* 🎭 *predicate*
|
|
90
|
+
* ㊙️ *internal*
|
|
64
91
|
*
|
|
65
|
-
*
|
|
66
|
-
* Please use `IsEqual` for the `predicate` behavior.
|
|
92
|
+
* Validate if `T` is `U`.
|
|
67
93
|
*
|
|
94
|
+
* @example
|
|
68
95
|
* ```ts
|
|
69
|
-
* type R =
|
|
70
|
-
*
|
|
71
|
-
* type R =
|
|
72
|
-
* type R =
|
|
73
|
-
* type R =
|
|
74
|
-
*
|
|
75
|
-
* type R =
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
96
|
+
* type R = $SelectInvert<undefined, undefined> // true
|
|
97
|
+
*
|
|
98
|
+
* type R = $SelectInvert<never, undefined> // false
|
|
99
|
+
* type R = $SelectInvert<unknown, undefined> // false
|
|
100
|
+
* type R = $SelectInvert<string | boolean, undefined> // false
|
|
101
|
+
*
|
|
102
|
+
* type R = $SelectInvert<string | undefined, undefined> // boolean
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* 🔢 *customize*
|
|
106
|
+
*
|
|
107
|
+
* Filter to ensure `T` is `U`, otherwise returns `never`.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```ts
|
|
111
|
+
* type R = $SelectInvert<undefined, undefined, { selection: 'filter' }> // undefined
|
|
112
|
+
*
|
|
113
|
+
* type R = $SelectInvert<never, undefined, { selection: 'filter' }> // never
|
|
114
|
+
* type R = $SelectInvert<unknown, undefined, { selection: 'filter' }> // never
|
|
115
|
+
* type R = $SelectInvert<string | boolean, undefined, { selection: 'filter' }> // never
|
|
116
|
+
*
|
|
117
|
+
* type R = $SelectInvert<string | undefined, undefined> // undefined
|
|
118
|
+
* ```
|
|
119
|
+
*
|
|
120
|
+
* 🔢 *customize*:
|
|
121
|
+
*
|
|
122
|
+
* Disable distribution of union types.
|
|
123
|
+
*
|
|
124
|
+
* ```ts
|
|
125
|
+
* type R = $SelectInvert<undefined | 1, undefined> // boolean
|
|
126
|
+
* type R = $SelectInvert<undefined | 1, undefined, { distributive: false }> // false
|
|
127
|
+
* ```
|
|
128
|
+
*
|
|
129
|
+
* 🔢 *customize*
|
|
130
|
+
*
|
|
131
|
+
* Use unique branch identifiers to allow precise processing of the result.
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```ts
|
|
135
|
+
* type R = $SelectInvert<undefined, undefined, $SelectionBranch> // $Then
|
|
136
|
+
* type R = $SelectInvert<string, undefined, $SelectionBranch> // $Else
|
|
79
137
|
* ```
|
|
80
138
|
*/
|
|
81
|
-
export type
|
|
139
|
+
export type $SelectInvert<T, U, $O extends $SelectInvert.$Options = {}> = $Special<T, {
|
|
140
|
+
$any: $ResolveBranch<$O, [$Any, $Then], T>;
|
|
141
|
+
$never: $ResolveBranch<$O, [$Never, $Then], T>;
|
|
142
|
+
$unknown: $ResolveBranch<$O, [$Unknown, $Then], T>;
|
|
143
|
+
$void: $ResolveBranch<$O, [$Void, $Then], T>;
|
|
144
|
+
$else: $Distributive.Parse<$O> extends true ? $SelectInvert._D<T, U, $O> : $SelectInvert._N<T, U, $O>;
|
|
145
|
+
}>;
|
|
146
|
+
export declare namespace $SelectInvert {
|
|
147
|
+
type $Options = $Selection.Options & $Distributive.Options & $InputOptions<$Any | $Unknown | $Never>;
|
|
148
|
+
type $Default = $Selection.Predicate & $Distributive.Default;
|
|
149
|
+
type $Branch = $Selection.Branch & $Distributive.Default;
|
|
150
|
+
type _D<T, U, $O extends $SelectInvert.$Options> = T extends U ? $ResolveBranch<$O, [$Else]> : $ResolveBranch<$O, [$Then], T>;
|
|
151
|
+
type _N<T, U, $O extends $SelectInvert.$Options> = [T] extends [U] ? $ResolveBranch<$O, [$Else]> : $ResolveBranch<$O, [$Then], T>;
|
|
152
|
+
}
|
|
82
153
|
/**
|
|
83
|
-
*
|
|
154
|
+
* 🎭 *predicate*
|
|
155
|
+
* ㊙️ *internal*
|
|
156
|
+
*
|
|
157
|
+
* Validate if `T` is `U`.
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```ts
|
|
161
|
+
* type R = $SelectInvertStrict<undefined, undefined> // true
|
|
162
|
+
*
|
|
163
|
+
* type R = $SelectInvertStrict<never, undefined> // false
|
|
164
|
+
* type R = $SelectInvertStrict<unknown, undefined> // false
|
|
165
|
+
* type R = $SelectInvertStrict<string | boolean, undefined> // false
|
|
166
|
+
*
|
|
167
|
+
* type R = $SelectInvertStrict<string | undefined, undefined> // boolean
|
|
168
|
+
* ```
|
|
169
|
+
*
|
|
170
|
+
* 🔢 *customize*
|
|
171
|
+
*
|
|
172
|
+
* Filter to ensure `T` is `U`, otherwise returns `never`.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```ts
|
|
176
|
+
* type R = $SelectInvertStrict<undefined, undefined, { selection: 'filter' }> // undefined
|
|
177
|
+
*
|
|
178
|
+
* type R = $SelectInvertStrict<never, undefined, { selection: 'filter' }> // never
|
|
179
|
+
* type R = $SelectInvertStrict<unknown, undefined, { selection: 'filter' }> // never
|
|
180
|
+
* type R = $SelectInvertStrict<string | boolean, undefined, { selection: 'filter' }> // never
|
|
181
|
+
*
|
|
182
|
+
* type R = $SelectInvertStrict<string | undefined, undefined> // undefined
|
|
183
|
+
* ```
|
|
184
|
+
*
|
|
185
|
+
* 🔢 *customize*:
|
|
186
|
+
*
|
|
187
|
+
* Disable distribution of union types.
|
|
188
|
+
*
|
|
189
|
+
* ```ts
|
|
190
|
+
* type R = $SelectInvertStrict<undefined | 1, undefined> // boolean
|
|
191
|
+
* type R = $SelectInvertStrict<undefined | 1, undefined, { distributive: false }> // false
|
|
192
|
+
* ```
|
|
193
|
+
*
|
|
194
|
+
* 🔢 *customize*
|
|
84
195
|
*
|
|
85
|
-
*
|
|
86
|
-
* Please use `IsNotEqual` for the `predicate` behavior.
|
|
196
|
+
* Use unique branch identifiers to allow precise processing of the result.
|
|
87
197
|
*
|
|
198
|
+
* @example
|
|
88
199
|
* ```ts
|
|
89
|
-
* type R =
|
|
90
|
-
* type R =
|
|
91
|
-
* type R = NotEqual<boolean, boolean> // false
|
|
92
|
-
* type R = NotEqual<true, true> // false
|
|
93
|
-
* type R = NotEqual<[1], [1]> // false
|
|
94
|
-
*
|
|
95
|
-
* type R = NotEqual<boolean, true> // true
|
|
96
|
-
* type R = NotEqual<any, 1> // true
|
|
97
|
-
* type R = NotEqual<[any], [1]> // true
|
|
98
|
-
* type R = NotEqual<{ a: 1 }, { a: 1; b: 2 }> // true
|
|
200
|
+
* type R = $SelectInvertStrict<undefined, undefined, $SelectionBranch> // $Then
|
|
201
|
+
* type R = $SelectInvertStrict<string, undefined, $SelectionBranch> // $Else
|
|
99
202
|
* ```
|
|
100
203
|
*/
|
|
101
|
-
export type
|
|
204
|
+
export type $SelectInvertStrict<T, U, $O extends $SelectInvertStrict.$Options = {}> = $Special<T, {
|
|
205
|
+
$any: $ResolveBranch<$O, [$Any, $Then], T>;
|
|
206
|
+
$unknown: $ResolveBranch<$O, [$Unknown, $Then], T>;
|
|
207
|
+
$never: $ResolveBranch<$O, [$Never, $Then], T>;
|
|
208
|
+
$else: $Distributive.Parse<$O> extends true ? $SelectInvertStrict._D<T, U, $O> : $SelectInvertStrict._N<T, U, $O>;
|
|
209
|
+
}>;
|
|
210
|
+
export declare namespace $SelectInvertStrict {
|
|
211
|
+
type $Options = $Selection.Options & $Distributive.Options & $InputOptions<$Any | $Unknown | $Never>;
|
|
212
|
+
type $Default = $Selection.Predicate & $Distributive.Default;
|
|
213
|
+
type $Branch = $Selection.Branch & $Distributive.Default;
|
|
214
|
+
type _D<T, U, $O extends $SelectInvertStrict.$Options> = T extends U ? $ResolveBranch<$O, [$Else]> : $ResolveBranch<$O, [$Then], T>;
|
|
215
|
+
type _N<T, U, $O extends $SelectInvertStrict.$Options> = [T, U] extends [U, T] ? $ResolveBranch<$O, [$Else]> : $ResolveBranch<$O, [$Then], T>;
|
|
216
|
+
}
|
|
102
217
|
export {};
|
|
103
218
|
//# sourceMappingURL=equal.d.ts.map
|
package/cjs/equal/equal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equal.d.ts","sourceRoot":"","sources":["../../src/equal/equal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":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E,EAAE,CAAC,KAAK,CAAC,CAAC,GAC3B,cAAc,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;IACjC,KAAY,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,mBAAmB,CAAC,QAAQ,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAClF,cAAc,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,GAC3B,cAAc,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;CACjC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import type { Equal } from './equal.js';
|
|
1
2
|
/**
|
|
2
3
|
* This is a common equal check.
|
|
3
4
|
* It is good for some basic cases, but not for all.
|
|
4
5
|
*/
|
|
5
|
-
export type IdentityEqual<A, B, Then, Else> =
|
|
6
|
+
export type IdentityEqual<A, B, Then, Else> = Equal.$Same<A, B, {
|
|
7
|
+
$then: Then;
|
|
8
|
+
$else: Else;
|
|
9
|
+
}>;
|
|
6
10
|
//# sourceMappingURL=identity_equal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity_equal.d.ts","sourceRoot":"","sources":["../../src/equal/identity_equal.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"identity_equal.d.ts","sourceRoot":"","sources":["../../src/equal/identity_equal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvC;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE;IAAE,KAAK,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,IAAI,CAAA;CAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { IsAny } from '../any/is_any.js';
|
|
2
|
+
import type { And, Or } from '../logical/logical.js';
|
|
3
|
+
import type { IsNever } from '../never/is_never.js';
|
|
4
|
+
import type { IsObject } from '../object/is_object.js';
|
|
5
|
+
import type { Properties } from '../object/properties.js';
|
|
6
|
+
import type { IsSymbol } from '../symbol/is_symbol.js';
|
|
7
|
+
import type { IdentityEqual } from './identity_equal.js';
|
|
8
|
+
type BothNever<A, B, Both, One, None> = And<IsNever<A>, IsNever<B>, {
|
|
9
|
+
$then: Both;
|
|
10
|
+
$else: Or<IsNever<A>, IsNever<B>, {
|
|
11
|
+
$then: One;
|
|
12
|
+
$else: None;
|
|
13
|
+
}>;
|
|
14
|
+
}>;
|
|
15
|
+
type BothAny<A, B, Both, One, None> = And<IsAny<A>, IsAny<B>, {
|
|
16
|
+
$then: Both;
|
|
17
|
+
$else: Or<IsAny<A>, IsAny<B>, {
|
|
18
|
+
$then: One;
|
|
19
|
+
$else: None;
|
|
20
|
+
}>;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* Checks `A` and `B` are equal.
|
|
24
|
+
*
|
|
25
|
+
* ```ts
|
|
26
|
+
* type R = IsEqual<1, 1> // true
|
|
27
|
+
* type R = IsEqual<any, any> // true
|
|
28
|
+
* type R = IsEqual<boolean, boolean> // true
|
|
29
|
+
* type R = IsEqual<true, true> // true
|
|
30
|
+
* type R = IsEqual<[1], [1]> // true
|
|
31
|
+
*
|
|
32
|
+
* type R = IsEqual<boolean, true> // false
|
|
33
|
+
* type R = IsEqual<any, 1> // false
|
|
34
|
+
* type R = IsEqual<[any], [1]> // false
|
|
35
|
+
* type R = IsEqual<{ a: 1 }, { a: 1; b: 2 }> // false
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* Note that intersection type checks only works at first level.
|
|
39
|
+
* It cannot be check recursively,
|
|
40
|
+
* or else will run into infinite recursion if the type includes recursive types.
|
|
41
|
+
*
|
|
42
|
+
* @deprecated 💀 **deprecated since 8.0.0**: use `Equal` instead.
|
|
43
|
+
*/
|
|
44
|
+
export type IsEqual<A, B, Then = true, Else = false> = [A, B] extends [B, A] ? BothNever<A, B, Then, Else, BothAny<A, B, Then, Else, IdentityEqual<A, B, Then, And<IsObject<A>, IsObject<B>, {
|
|
45
|
+
$then: IdentityEqual<Properties<A>, Properties<B>, [
|
|
46
|
+
A,
|
|
47
|
+
B
|
|
48
|
+
] extends [(...args: infer P1) => any, (...args: infer P2) => any] ? IsEqual<P1, P2, Then, Else> : Then, Else>;
|
|
49
|
+
$else: [A, B] extends [B, A] ? Then : Else;
|
|
50
|
+
}>>>> : And<IsSymbol<A, {
|
|
51
|
+
distributive: false;
|
|
52
|
+
}>, IsSymbol<B, {
|
|
53
|
+
distributive: false;
|
|
54
|
+
}>, {
|
|
55
|
+
$then: Then;
|
|
56
|
+
$else: Else;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Checks `A` and `B` are not equal.
|
|
60
|
+
*
|
|
61
|
+
* ```ts
|
|
62
|
+
* type R = IsNotEqual<1, 1> // false
|
|
63
|
+
* type R = IsNotEqual<any, any> // false
|
|
64
|
+
* type R = IsNotEqual<boolean, boolean> // false
|
|
65
|
+
* type R = IsNotEqual<true, true> // false
|
|
66
|
+
* type R = IsNotEqual<[1], [1]> // false
|
|
67
|
+
*
|
|
68
|
+
* type R = IsNotEqual<boolean, true> // true
|
|
69
|
+
* type R = IsNotEqual<any, 1> // true
|
|
70
|
+
* type R = IsNotEqual<[any], [1]> // true
|
|
71
|
+
* type R = IsNotEqual<{ a: 1 }, { a: 1; b: 2 }> // true
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* Note that intersection type checks only works at first level.
|
|
75
|
+
* It cannot be check recursively,
|
|
76
|
+
* or else will run into infinite recursion if the type includes recursive types.
|
|
77
|
+
*
|
|
78
|
+
* @deprecated 💀 **deprecated since 8.0.0**: use `Equal` instead.
|
|
79
|
+
*/
|
|
80
|
+
export type IsNotEqual<A, B, Then = true, Else = false> = IsEqual<A, B, Else, Then>;
|
|
81
|
+
/**
|
|
82
|
+
* Checks `A` and `B` are not equal.
|
|
83
|
+
*
|
|
84
|
+
* @deprecated this will be changed to `filter` variant in the future.
|
|
85
|
+
* Please use `IsNotEqual` for the `predicate` behavior.
|
|
86
|
+
*
|
|
87
|
+
* ```ts
|
|
88
|
+
* type R = NotEqual<1, 1> // false
|
|
89
|
+
* type R = NotEqual<any, any> // false
|
|
90
|
+
* type R = NotEqual<boolean, boolean> // false
|
|
91
|
+
* type R = NotEqual<true, true> // false
|
|
92
|
+
* type R = NotEqual<[1], [1]> // false
|
|
93
|
+
*
|
|
94
|
+
* type R = NotEqual<boolean, true> // true
|
|
95
|
+
* type R = NotEqual<any, 1> // true
|
|
96
|
+
* type R = NotEqual<[any], [1]> // true
|
|
97
|
+
* type R = NotEqual<{ a: 1 }, { a: 1; b: 2 }> // true
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
export type NotEqual<A, B, Then = true, Else = false> = IsNotEqual<A, B, Then, Else>;
|
|
101
|
+
export {};
|
|
102
|
+
//# sourceMappingURL=is_equal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is_equal.d.ts","sourceRoot":"","sources":["../../src/equal/is_equal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACzD,O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equal/is_equal.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract_function.d.ts","sourceRoot":"","sources":["../../src/function/extract_function.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpD;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,WAAW,IAAI,CAAC,SAAS,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,KAAK,CAAA;AAExH;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EAAE,EAAE,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"extract_function.d.ts","sourceRoot":"","sources":["../../src/function/extract_function.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpD;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,WAAW,IAAI,CAAC,SAAS,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,KAAK,CAAA;AAExH;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EAAE,EAAE,EAAE,CAAC,GACnC,eAAe,CAAC,CAAC,CAAC,CAC1C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.extractFunction =
|
|
3
|
+
exports.extractFunction = extractFunction;
|
|
4
4
|
/**
|
|
5
5
|
* Extract the function signature from a composite function.
|
|
6
6
|
*
|
|
@@ -9,5 +9,4 @@ exports.extractFunction = void 0;
|
|
|
9
9
|
function extractFunction(fn) {
|
|
10
10
|
return fn;
|
|
11
11
|
}
|
|
12
|
-
exports.extractFunction = extractFunction;
|
|
13
12
|
//# sourceMappingURL=extract_function.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract_function.js","sourceRoot":"","sources":["../../src/function/extract_function.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"extract_function.js","sourceRoot":"","sources":["../../src/function/extract_function.ts"],"names":[],"mappings":";;AAwBA,0CAEC;AAPD;;;;GAIG;AACH,SAAgB,eAAe,CAAwB,EAAK;IAC3D,OAAO,EAAmC,CAAA;AAC3C,CAAC"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
import type { $
|
|
1
|
+
import type { $InputOptions } from '../$type/branch/$input_options.js';
|
|
2
|
+
import type { $ResolveBranch } from '../$type/branch/$resolve_branch.js';
|
|
3
|
+
import type { $Else, $Selection } from '../$type/branch/$selection.js';
|
|
4
|
+
import type { $Distributive } from '../$type/distributive/$distributive.js';
|
|
5
|
+
import type { $Exact } from '../$type/exact/$exact.js';
|
|
6
|
+
import type { $Any } from '../$type/special/$any.js';
|
|
7
|
+
import type { $Never } from '../$type/special/$never.js';
|
|
8
|
+
import type { $Special } from '../$type/special/$special.js';
|
|
9
|
+
import type { $Unknown } from '../$type/special/$unknown.js';
|
|
10
|
+
import type { $Void } from '../$type/special/$void.js';
|
|
11
|
+
import type { $MergeOptions } from '../$type/utils/$merge_options.js';
|
|
12
|
+
import type { Assignable } from '../predicates/assignable.js';
|
|
2
13
|
/**
|
|
3
14
|
* 🎭 *predicate*
|
|
4
15
|
*
|
|
@@ -52,10 +63,22 @@ import type { $Select } from '../type_plus/branch/$select.js';
|
|
|
52
63
|
* type R = IsFunction<string, $SelectionBranch> // $Else
|
|
53
64
|
* ```
|
|
54
65
|
*/
|
|
55
|
-
export type IsFunction<T, $O extends IsFunction.$Options = {}> = $
|
|
66
|
+
export type IsFunction<T, $O extends IsFunction.$Options = {}> = $Special<T, $MergeOptions<$O, {
|
|
67
|
+
$then: $ResolveBranch<$O, [$Else]>;
|
|
68
|
+
$else: IsFunction.$<T, $O>;
|
|
69
|
+
}>>;
|
|
56
70
|
export declare namespace IsFunction {
|
|
57
|
-
type $Options = $
|
|
58
|
-
type $Default = $
|
|
59
|
-
type $Branch = $
|
|
71
|
+
type $Options = $Selection.Options & $Distributive.Options & $Exact.Options & $InputOptions<$Any | $Unknown | $Never | $Void>;
|
|
72
|
+
type $Default = $Selection.Predicate & $Distributive.Default & $Exact.Default;
|
|
73
|
+
type $Branch<$O extends $Options = {}> = $Selection.Branch<$O>;
|
|
74
|
+
/**
|
|
75
|
+
* 🧰 *type util*
|
|
76
|
+
*
|
|
77
|
+
* Validate if `T` is `Function`.
|
|
78
|
+
*
|
|
79
|
+
* This is a type util for building custom types.
|
|
80
|
+
* It does not check against special types.
|
|
81
|
+
*/
|
|
82
|
+
type $<T, $O extends Assignable.$UtilOptions> = Assignable.$<T, Function, $O>;
|
|
60
83
|
}
|
|
61
84
|
//# sourceMappingURL=is_function.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is_function.d.ts","sourceRoot":"","sources":["../../src/function/is_function.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"is_function.d.ts","sourceRoot":"","sources":["../../src/function/is_function.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAC3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OA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QAAQ,EAAE,EAAE,CAAC,CAAA;CACpF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is_not_function.d.ts","sourceRoot":"","sources":["../../src/function/is_not_function.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"is_not_function.d.ts","sourceRoot":"","sources":["../../src/function/is_not_function.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEtD;;;;;;;;;;;GAWG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,EAAE,SAAS,aAAa,CAAC,QAAQ,GAAG,EAAE,IAAI,aAAa,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAA;AAErG,yBAAiB,aAAa,CAAC;IAC9B,KAAY,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAA;IAC7C,KAAY,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAA;IAC7C,KAAY,OAAO,GAAG,aAAa,CAAC,OAAO,CAAA;CAC3C"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import type { $
|
|
2
|
-
import type { $
|
|
3
|
-
import type { $
|
|
4
|
-
import type { $
|
|
5
|
-
import type { $
|
|
6
|
-
import type { $
|
|
7
|
-
import type { $
|
|
8
|
-
import type { $
|
|
1
|
+
import type { $ResolveOptions } from '../$type/$resolve_options.js';
|
|
2
|
+
import type { $ResolveBranch } from '../$type/branch/$resolve_branch.js';
|
|
3
|
+
import type { $Else, $Then } from '../$type/branch/$selection.js';
|
|
4
|
+
import type { $Any } from '../$type/special/$any.js';
|
|
5
|
+
import type { $Never } from '../$type/special/$never.js';
|
|
6
|
+
import type { $Special } from '../$type/special/$special.js';
|
|
7
|
+
import type { $Unknown } from '../$type/special/$unknown.js';
|
|
8
|
+
import type { $Void } from '../$type/special/$void.js';
|
|
9
|
+
import type { $SelectInvertStrict } from '../equal/equal.js';
|
|
9
10
|
/**
|
|
10
11
|
* Is `T` not exactly `Function`.
|
|
11
12
|
*
|
|
@@ -16,16 +17,17 @@ import type { $Unknown } from '../unknown/unknown.js';
|
|
|
16
17
|
* type R = IsNotStrictFunction<(() => void) & { a: 1 }> // true
|
|
17
18
|
* ```
|
|
18
19
|
*/
|
|
19
|
-
export type IsNotStrictFunction<T, $O extends IsNotStrictFunction.$Options = {}> = $
|
|
20
|
-
$any: $ResolveBranch
|
|
21
|
-
$unknown: $ResolveBranch
|
|
22
|
-
$never: $ResolveBranch
|
|
20
|
+
export type IsNotStrictFunction<T, $O extends IsNotStrictFunction.$Options = {}> = $Special<T, {
|
|
21
|
+
$any: $ResolveBranch<$O, [$Any, $Then], T>;
|
|
22
|
+
$unknown: $ResolveBranch<$O, [$Unknown, $Then], T>;
|
|
23
|
+
$never: $ResolveBranch<$O, [$Never, $Then], T>;
|
|
24
|
+
$void: $ResolveBranch<$O, [$Void, $Then], T>;
|
|
23
25
|
$else: $ResolveOptions<[$O['distributive'], $SelectInvertStrict.$Default['distributive']]> extends true ? IsNotStrictFunction._D<T, $O> : $SelectInvertStrict._N<T, Function, $O>;
|
|
24
26
|
}>;
|
|
25
27
|
export declare namespace IsNotStrictFunction {
|
|
26
28
|
type $Options = $SelectInvertStrict.$Options;
|
|
27
29
|
type $Default = $SelectInvertStrict.$Default;
|
|
28
30
|
type $Branch = $SelectInvertStrict.$Branch;
|
|
29
|
-
type _D<T, $O extends IsNotStrictFunction.$Options> = T extends Function ? $ResolveBranch
|
|
31
|
+
type _D<T, $O extends IsNotStrictFunction.$Options> = T extends Function ? $ResolveBranch<$O, [T extends (...args: any[]) => any ? $Then : $Else], T> : $ResolveBranch<$O, [$Then], T>;
|
|
30
32
|
}
|
|
31
33
|
//# sourceMappingURL=is_not_strict_function.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is_not_strict_function.d.ts","sourceRoot":"","sources":["../../src/function/is_not_strict_function.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"is_not_strict_function.d.ts","sourceRoot":"","sources":["../../src/function/is_not_strict_function.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACxE,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAE5D;;;;;;;;;GASG;AAEH,MAAM,MAAM,mBAAmB,CAAC,CAAC,EAAE,EAAE,SAAS,mBAAmB,CAAC,QAAQ,GAAG,EAAE,IAAI,QAAQ,CAC1F,CAAC,EACD;IACC,IAAI,EAAE,cAAc,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;IAC1C,QAAQ,EAAE,cAAc,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;IAClD,MAAM,EAAE,cAAc,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;IAC9C,KAAK,EAAE,cAAc,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,KA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