type-plus 7.6.2 → 8.0.0-beta.2
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/any/any.d.ts +49 -0
- package/esm/any/any.d.ts.map +1 -0
- package/esm/any/any.js +2 -0
- package/esm/any/any.js.map +1 -0
- package/esm/any/is_any.d.ts +55 -0
- package/esm/any/is_any.d.ts.map +1 -0
- package/esm/any/is_any.js +2 -0
- package/esm/any/is_any.js.map +1 -0
- package/esm/any/is_not_any.d.ts +55 -0
- package/esm/any/is_not_any.d.ts.map +1 -0
- package/esm/any/is_not_any.js +2 -0
- package/esm/any/is_not_any.js.map +1 -0
- package/esm/array/array.at.d.ts +11 -4
- package/esm/array/array.at.d.ts.map +1 -1
- package/esm/array/array.at.js.map +1 -1
- package/esm/array/array.entries.d.ts +6 -3
- package/esm/array/array.entries.d.ts.map +1 -1
- package/esm/array/array.entries.js.map +1 -1
- package/esm/array/array.find_last.d.ts +5 -2
- package/esm/array/array.find_last.d.ts.map +1 -1
- package/esm/array/array.find_last.js.map +1 -1
- package/esm/array/array.reverse.d.ts +5 -1
- package/esm/array/array.reverse.d.ts.map +1 -1
- package/esm/array/array.reverse.js.map +1 -1
- package/esm/array/array.some.d.ts +7 -7
- package/esm/array/array.some.d.ts.map +1 -1
- package/esm/array/array.some.js.map +1 -1
- package/esm/array/array_plus.common_prop_keys.d.ts +9 -5
- package/esm/array/array_plus.common_prop_keys.d.ts.map +1 -1
- package/esm/array/array_plus.common_prop_keys.js.map +1 -1
- package/esm/array/array_plus.concat.d.ts +1 -1
- package/esm/array/array_plus.concat.d.ts.map +1 -1
- package/esm/array/array_plus.concat.js.map +1 -1
- package/esm/array/array_plus.d.ts +3 -1
- package/esm/array/array_plus.d.ts.map +1 -1
- package/esm/array/array_plus.drop_match.d.ts +4 -3
- package/esm/array/array_plus.drop_match.d.ts.map +1 -1
- package/esm/array/array_plus.drop_match.js.map +1 -1
- package/esm/array/array_plus.element_match.d.ts +15 -12
- package/esm/array/array_plus.element_match.d.ts.map +1 -1
- package/esm/array/array_plus.element_match.js.map +1 -1
- package/esm/array/array_plus.filter.d.ts +28 -1
- package/esm/array/array_plus.filter.d.ts.map +1 -1
- package/esm/array/array_plus.filter.js +1 -0
- package/esm/array/array_plus.filter.js.map +1 -1
- package/esm/array/array_plus.find.d.ts +17 -14
- package/esm/array/array_plus.find.d.ts.map +1 -1
- package/esm/array/array_plus.find.js.map +1 -1
- package/esm/array/array_plus.index_at.d.ts +42 -0
- package/esm/array/array_plus.index_at.d.ts.map +1 -0
- package/esm/array/array_plus.index_at.js +84 -0
- package/esm/array/array_plus.index_at.js.map +1 -0
- package/esm/array/array_plus.is_index_out_of_bound.d.ts +21 -0
- package/esm/array/array_plus.is_index_out_of_bound.d.ts.map +1 -0
- package/esm/array/array_plus.is_index_out_of_bound.js +2 -0
- package/esm/array/array_plus.is_index_out_of_bound.js.map +1 -0
- package/esm/array/array_plus.is_readonly.d.ts +35 -0
- package/esm/array/array_plus.is_readonly.d.ts.map +1 -0
- package/esm/array/array_plus.is_readonly.js +2 -0
- package/esm/array/array_plus.is_readonly.js.map +1 -0
- package/esm/array/array_plus.js.map +1 -1
- package/esm/array/array_plus.pad_start.d.ts +1 -1
- package/esm/array/array_plus.pad_start.d.ts.map +1 -1
- package/esm/array/array_plus.pad_start.js.map +1 -1
- package/esm/array/array_plus.split_at.d.ts +23 -13
- package/esm/array/array_plus.split_at.d.ts.map +1 -1
- package/esm/array/array_plus.split_at.js.map +1 -1
- package/esm/array/filter.d.ts +2 -2
- package/esm/array/filter.d.ts.map +1 -1
- package/esm/array/filter.js.map +1 -1
- package/esm/array/find_first.d.ts +10 -7
- package/esm/array/find_first.d.ts.map +1 -1
- package/esm/array/find_first.js.map +1 -1
- package/esm/array/head.d.ts +7 -5
- package/esm/array/head.d.ts.map +1 -1
- package/esm/array/head.js.map +1 -1
- package/esm/array/intersect_of_props.d.ts +1 -1
- package/esm/array/intersect_of_props.d.ts.map +1 -1
- package/esm/array/intersect_of_props.js.map +1 -1
- package/esm/array/is_array.d.ts +89 -0
- package/esm/array/is_array.d.ts.map +1 -0
- package/esm/array/is_array.js +2 -0
- package/esm/array/is_array.js.map +1 -0
- package/esm/array/is_not_array.d.ts +89 -0
- package/esm/array/is_not_array.d.ts.map +1 -0
- package/esm/array/is_not_array.js +2 -0
- package/esm/array/is_not_array.js.map +1 -0
- package/esm/array/last.d.ts +7 -5
- package/esm/array/last.d.ts.map +1 -1
- package/esm/array/last.js.map +1 -1
- package/esm/array/literal_array.d.ts.map +1 -1
- package/esm/array/literal_array.js.map +1 -1
- package/esm/array/loose_array_type.d.ts +65 -0
- package/esm/array/loose_array_type.d.ts.map +1 -0
- package/esm/array/loose_array_type.js +2 -0
- package/esm/array/loose_array_type.js.map +1 -0
- package/esm/array/pad_start.d.ts +1 -1
- package/esm/array/pad_start.d.ts.map +1 -1
- package/esm/array/pad_start.js.map +1 -1
- package/esm/array/reduce_while.d.ts.map +1 -1
- package/esm/array/reduce_while.js.map +1 -1
- package/esm/array/reverse.d.ts.map +1 -1
- package/esm/array/reverse.js.map +1 -1
- package/esm/array/union_of_props.d.ts +2 -2
- package/esm/array/union_of_props.d.ts.map +1 -1
- package/esm/array/union_of_props.js.map +1 -1
- package/esm/array/union_of_values.d.ts +2 -2
- package/esm/array/union_of_values.d.ts.map +1 -1
- package/esm/array/union_of_values.js.map +1 -1
- package/esm/assertion/assert_type.d.ts +2 -2
- package/esm/assertion/assert_type.d.ts.map +1 -1
- package/esm/assertion/assert_type.js +44 -47
- package/esm/assertion/assert_type.js.map +1 -1
- package/esm/bigint/cast.d.ts.map +1 -1
- package/esm/bigint/cast.js.map +1 -1
- package/esm/bigint/is_bigint.d.ts +97 -0
- package/esm/bigint/is_bigint.d.ts.map +1 -0
- package/esm/bigint/is_bigint.js +2 -0
- package/esm/bigint/is_bigint.js.map +1 -0
- package/esm/bigint/is_bigint_literal.d.ts +85 -0
- package/esm/bigint/is_bigint_literal.d.ts.map +1 -0
- package/esm/bigint/is_bigint_literal.js +2 -0
- package/esm/bigint/is_bigint_literal.js.map +1 -0
- package/esm/bigint/is_not_bigint.d.ts +94 -0
- package/esm/bigint/is_not_bigint.d.ts.map +1 -0
- package/esm/bigint/is_not_bigint.js +2 -0
- package/esm/bigint/is_not_bigint.js.map +1 -0
- package/esm/bigint/is_not_bigint_literal.d.ts +83 -0
- package/esm/bigint/is_not_bigint_literal.d.ts.map +1 -0
- package/esm/bigint/is_not_bigint_literal.js +2 -0
- package/esm/bigint/is_not_bigint_literal.js.map +1 -0
- package/esm/binary/Bit.d.ts.map +1 -1
- package/esm/binary/Bit.js.map +1 -1
- package/esm/binary/_binary.d.ts.map +1 -1
- package/esm/binary/_binary.js.map +1 -1
- package/esm/binary/index.d.ts.map +1 -1
- package/esm/binary/index.js.map +1 -1
- package/esm/boolean/is_boolean.d.ts +91 -0
- package/esm/boolean/is_boolean.d.ts.map +1 -0
- package/esm/boolean/is_boolean.js +2 -0
- package/esm/boolean/is_boolean.js.map +1 -0
- package/esm/boolean/is_false.d.ts +78 -0
- package/esm/boolean/is_false.d.ts.map +1 -0
- package/esm/boolean/is_false.js +2 -0
- package/esm/boolean/is_false.js.map +1 -0
- package/esm/boolean/is_not_boolean.d.ts +91 -0
- package/esm/boolean/is_not_boolean.d.ts.map +1 -0
- package/esm/boolean/is_not_boolean.js +2 -0
- package/esm/boolean/is_not_boolean.js.map +1 -0
- package/esm/boolean/is_not_false.d.ts +79 -0
- package/esm/boolean/is_not_false.d.ts.map +1 -0
- package/esm/boolean/is_not_false.js +2 -0
- package/esm/boolean/is_not_false.js.map +1 -0
- package/esm/boolean/is_not_true.d.ts +80 -0
- package/esm/boolean/is_not_true.d.ts.map +1 -0
- package/esm/boolean/is_not_true.js +2 -0
- package/esm/boolean/is_not_true.js.map +1 -0
- package/esm/boolean/is_true.d.ts +78 -0
- package/esm/boolean/is_true.d.ts.map +1 -0
- package/esm/boolean/is_true.js +2 -0
- package/esm/boolean/is_true.js.map +1 -0
- package/esm/class/AnyConstructor.d.ts +1 -1
- package/esm/class/AnyConstructor.d.ts.map +1 -1
- package/esm/class/AnyConstructor.js.map +1 -1
- package/esm/class/index.d.ts.map +1 -1
- package/esm/class/index.js.map +1 -1
- package/esm/class/isConstructor.d.ts +1 -1
- package/esm/class/isConstructor.d.ts.map +1 -1
- package/esm/class/isConstructor.js +2 -2
- package/esm/class/isConstructor.js.map +1 -1
- package/esm/composable_types.d.ts.map +1 -1
- package/esm/composable_types.js.map +1 -1
- package/esm/equal/equal.d.ts +10 -6
- package/esm/equal/equal.d.ts.map +1 -1
- package/esm/equal/equal.js.map +1 -1
- package/esm/equal/identity_equal.d.ts +6 -0
- package/esm/equal/identity_equal.d.ts.map +1 -0
- package/esm/equal/identity_equal.js +2 -0
- package/esm/equal/identity_equal.js.map +1 -0
- package/esm/function/any_function.d.ts.map +1 -1
- package/esm/function/any_function.js.map +1 -1
- package/esm/function/extract_function.d.ts.map +1 -1
- package/esm/function/extract_function.js.map +1 -1
- package/esm/function/is_function.d.ts +61 -0
- package/esm/function/is_function.d.ts.map +1 -0
- package/esm/function/is_function.js +2 -0
- package/esm/function/is_function.js.map +1 -0
- package/esm/function/is_not_function.d.ts +73 -0
- package/esm/function/is_not_function.d.ts.map +1 -0
- package/esm/function/is_not_function.js +2 -0
- package/esm/function/is_not_function.js.map +1 -0
- package/esm/function/is_not_strict_function.d.ts +31 -0
- package/esm/function/is_not_strict_function.d.ts.map +1 -0
- package/esm/function/is_not_strict_function.js +2 -0
- package/esm/function/is_not_strict_function.js.map +1 -0
- package/esm/function/is_strict_function.d.ts +31 -0
- package/esm/function/is_strict_function.d.ts.map +1 -0
- package/esm/function/is_strict_function.js +2 -0
- package/esm/function/is_strict_function.js.map +1 -0
- package/esm/functional/ChainFn.d.ts.map +1 -1
- package/esm/functional/ChainFn.js.map +1 -1
- package/esm/functional/Maybe.d.ts +1 -1
- package/esm/functional/Maybe.d.ts.map +1 -1
- package/esm/functional/Maybe.js.map +1 -1
- package/esm/functional/compose.d.ts.map +1 -1
- package/esm/functional/compose.js +1 -0
- package/esm/functional/compose.js.map +1 -1
- package/esm/functional/context.d.ts.map +1 -1
- package/esm/functional/context.js +1 -1
- package/esm/functional/context.js.map +1 -1
- package/esm/functional/index.d.ts.map +1 -1
- package/esm/functional/index.js.map +1 -1
- package/esm/index.d.ts +83 -28
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -0
- package/esm/index.js.map +1 -1
- package/esm/json.d.ts.map +1 -1
- package/esm/json.js.map +1 -1
- package/esm/math/abs.d.ts +4 -5
- package/esm/math/abs.d.ts.map +1 -1
- package/esm/math/abs.js.map +1 -1
- package/esm/math/add.d.ts.map +1 -1
- package/esm/math/add.js.map +1 -1
- package/esm/math/greater_than.d.ts +1 -1
- package/esm/math/greater_than.d.ts.map +1 -1
- package/esm/math/greater_than.js.map +1 -1
- package/esm/math/index.d.ts +1 -1
- package/esm/math/index.d.ts.map +1 -1
- package/esm/math/index.js.map +1 -1
- package/esm/math/math_plus.d.ts.map +1 -1
- package/esm/math/math_plus.js.map +1 -1
- package/esm/math/math_plus.to_negative.d.ts.map +1 -1
- package/esm/math/math_plus.to_negative.js.map +1 -1
- package/esm/math/max.d.ts +1 -1
- package/esm/math/max.d.ts.map +1 -1
- package/esm/math/max.js.map +1 -1
- package/esm/math/multiply.d.ts.map +1 -1
- package/esm/math/multiply.js.map +1 -1
- package/esm/math/numeric_struct.d.ts.map +1 -1
- package/esm/math/numeric_struct.js.map +1 -1
- package/esm/math/subtract.d.ts.map +1 -1
- package/esm/math/subtract.js.map +1 -1
- package/esm/mix_types/box.d.ts +47 -0
- package/esm/mix_types/box.d.ts.map +1 -0
- package/esm/mix_types/box.js +2 -0
- package/esm/mix_types/box.js.map +1 -0
- package/esm/mix_types/exclude.d.ts +19 -0
- package/esm/mix_types/exclude.d.ts.map +1 -0
- package/esm/mix_types/exclude.js +2 -0
- package/esm/mix_types/exclude.js.map +1 -0
- package/esm/mix_types/is_any_or_never.d.ts +28 -0
- package/esm/mix_types/is_any_or_never.d.ts.map +1 -0
- package/esm/mix_types/is_any_or_never.js +2 -0
- package/esm/mix_types/is_any_or_never.js.map +1 -0
- package/esm/mix_types/merge.d.ts +38 -0
- package/esm/mix_types/merge.d.ts.map +1 -0
- package/esm/mix_types/merge.js +14 -0
- package/esm/mix_types/merge.js.map +1 -0
- package/esm/never/is_never.d.ts +59 -0
- package/esm/never/is_never.d.ts.map +1 -0
- package/esm/never/is_never.js +2 -0
- package/esm/never/is_never.js.map +1 -0
- package/esm/never/is_not_never.d.ts +59 -0
- package/esm/never/is_not_never.d.ts.map +1 -0
- package/esm/never/is_not_never.js +2 -0
- package/esm/never/is_not_never.js.map +1 -0
- package/esm/never/never.d.ts +75 -0
- package/esm/never/never.d.ts.map +1 -0
- package/esm/never/never.js +2 -0
- package/esm/never/never.js.map +1 -0
- package/esm/nodejs/index.d.ts.map +1 -1
- package/esm/nodejs/index.js.map +1 -1
- package/esm/nodejs/isNodeError.d.ts.map +1 -1
- package/esm/nodejs/isNodeError.js.map +1 -1
- package/esm/nominal/brand.d.ts.map +1 -1
- package/esm/nominal/brand.js +1 -3
- package/esm/nominal/brand.js.map +1 -1
- package/esm/nominal/constants.d.ts.map +1 -1
- package/esm/nominal/constants.js.map +1 -1
- package/esm/nominal/flavor.d.ts.map +1 -1
- package/esm/nominal/flavor.js +1 -3
- package/esm/nominal/flavor.js.map +1 -1
- package/esm/nominal/index.d.ts.map +1 -1
- package/esm/nominal/index.js.map +1 -1
- package/esm/nominal/nominal_match.d.ts.map +1 -1
- package/esm/nominal/nominal_match.js +1 -3
- package/esm/nominal/nominal_match.js.map +1 -1
- package/esm/null/is_not_null.d.ts +71 -0
- package/esm/null/is_not_null.d.ts.map +1 -0
- package/esm/null/is_not_null.js +2 -0
- package/esm/null/is_not_null.js.map +1 -0
- package/esm/null/is_null.d.ts +75 -0
- package/esm/null/is_null.d.ts.map +1 -0
- package/esm/null/is_null.js +2 -0
- package/esm/null/is_null.js.map +1 -0
- package/esm/number/cast.d.ts.map +1 -1
- package/esm/number/cast.js.map +1 -1
- package/esm/number/is_not_number.d.ts +84 -0
- package/esm/number/is_not_number.d.ts.map +1 -0
- package/esm/number/is_not_number.js +2 -0
- package/esm/number/is_not_number.js.map +1 -0
- package/esm/number/is_not_number_literal.d.ts +83 -0
- package/esm/number/is_not_number_literal.d.ts.map +1 -0
- package/esm/number/is_not_number_literal.js +2 -0
- package/esm/number/is_not_number_literal.js.map +1 -0
- package/esm/number/is_number.d.ts +87 -0
- package/esm/number/is_number.d.ts.map +1 -0
- package/esm/number/is_number.js +2 -0
- package/esm/number/is_number.js.map +1 -0
- package/esm/number/is_number_literal.d.ts +85 -0
- package/esm/number/is_number_literal.d.ts.map +1 -0
- package/esm/number/is_number_literal.js +2 -0
- package/esm/number/is_number_literal.js.map +1 -0
- package/esm/number/number_array.d.ts.map +1 -1
- package/esm/number/number_array.js.map +1 -1
- package/esm/number/number_plus.d.ts +11 -6
- package/esm/number/number_plus.d.ts.map +1 -1
- package/esm/number/number_plus.js +1 -0
- package/esm/number/number_plus.js.map +1 -1
- package/esm/numeric/cast.d.ts.map +1 -1
- package/esm/numeric/cast.js.map +1 -1
- package/esm/numeric/is_integer.d.ts +30 -0
- package/esm/numeric/is_integer.d.ts.map +1 -0
- package/esm/numeric/is_integer.js +2 -0
- package/esm/numeric/is_integer.js.map +1 -0
- package/esm/numeric/is_negative.d.ts +35 -0
- package/esm/numeric/is_negative.d.ts.map +1 -0
- package/esm/numeric/is_negative.js +2 -0
- package/esm/numeric/is_negative.js.map +1 -0
- package/esm/numeric/is_not_integer.d.ts +32 -0
- package/esm/numeric/is_not_integer.d.ts.map +1 -0
- package/esm/numeric/is_not_integer.js +2 -0
- package/esm/numeric/is_not_integer.js.map +1 -0
- package/esm/numeric/is_not_negative.d.ts +35 -0
- package/esm/numeric/is_not_negative.d.ts.map +1 -0
- package/esm/numeric/is_not_negative.js +2 -0
- package/esm/numeric/is_not_negative.js.map +1 -0
- package/esm/numeric/is_not_numeric.d.ts +19 -0
- package/esm/numeric/is_not_numeric.d.ts.map +1 -0
- package/esm/numeric/is_not_numeric.js +2 -0
- package/esm/numeric/is_not_numeric.js.map +1 -0
- package/esm/numeric/is_not_positive.d.ts +36 -0
- package/esm/numeric/is_not_positive.d.ts.map +1 -0
- package/esm/numeric/is_not_positive.js +2 -0
- package/esm/numeric/is_not_positive.js.map +1 -0
- package/esm/numeric/is_numeric.d.ts +19 -0
- package/esm/numeric/is_numeric.d.ts.map +1 -0
- package/esm/numeric/is_numeric.js +2 -0
- package/esm/numeric/is_numeric.js.map +1 -0
- package/esm/numeric/is_positive.d.ts +35 -0
- package/esm/numeric/is_positive.d.ts.map +1 -0
- package/esm/numeric/is_positive.js +2 -0
- package/esm/numeric/is_positive.js.map +1 -0
- package/esm/numeric/numeric_plus.d.ts +9 -4
- package/esm/numeric/numeric_plus.d.ts.map +1 -1
- package/esm/numeric/numeric_plus.js.map +1 -1
- package/esm/numeric/numeric_type.d.ts +0 -50
- package/esm/numeric/numeric_type.d.ts.map +1 -1
- package/esm/numeric/numeric_type.js.map +1 -1
- package/esm/object/ANotB.d.ts +1 -1
- package/esm/object/ANotB.d.ts.map +1 -1
- package/esm/object/ANotB.js.map +1 -1
- package/esm/object/ExcludePropType.d.ts.map +1 -1
- package/esm/object/ExcludePropType.js.map +1 -1
- package/esm/object/IsDisjoint.d.ts +1 -1
- package/esm/object/IsDisjoint.d.ts.map +1 -1
- package/esm/object/IsDisjoint.js.map +1 -1
- package/esm/object/IsRecord.d.ts.map +1 -1
- package/esm/object/IsRecord.js.map +1 -1
- package/esm/object/KeyTypes.d.ts.map +1 -1
- package/esm/object/KeyTypes.js.map +1 -1
- package/esm/object/KeyofOptional.d.ts.map +1 -1
- package/esm/object/KeyofOptional.js.map +1 -1
- package/esm/object/KeysWithDiffType.d.ts +2 -2
- package/esm/object/KeysWithDiffType.d.ts.map +1 -1
- package/esm/object/KeysWithDiffType.js.map +1 -1
- package/esm/object/KnownKeys.d.ts.map +1 -1
- package/esm/object/KnownKeys.js.map +1 -1
- package/esm/object/Partial.d.ts.map +1 -1
- package/esm/object/Partial.js.map +1 -1
- package/esm/object/RecursiveIntersect.d.ts +2 -2
- package/esm/object/RecursiveIntersect.d.ts.map +1 -1
- package/esm/object/RecursiveIntersect.js.map +1 -1
- package/esm/object/RecursiveRequired.d.ts +1 -1
- package/esm/object/RecursiveRequired.d.ts.map +1 -1
- package/esm/object/RecursiveRequired.js.map +1 -1
- package/esm/object/Required.d.ts +1 -2
- package/esm/object/Required.d.ts.map +1 -1
- package/esm/object/Required.js.map +1 -1
- package/esm/object/RequiredKeys.d.ts +2 -2
- package/esm/object/RequiredKeys.d.ts.map +1 -1
- package/esm/object/RequiredKeys.js.map +1 -1
- package/esm/object/SpreadRecord.d.ts.map +1 -1
- package/esm/object/SpreadRecord.js.map +1 -1
- package/esm/object/ValueOf.d.ts.map +1 -1
- package/esm/object/ValueOf.js.map +1 -1
- package/esm/object/any_record.d.ts +3 -0
- package/esm/object/any_record.d.ts.map +1 -0
- package/esm/object/any_record.js +2 -0
- package/esm/object/any_record.js.map +1 -0
- package/esm/object/everyKey.d.ts.map +1 -1
- package/esm/object/everyKey.js.map +1 -1
- package/esm/object/facade.d.ts +1 -1
- package/esm/object/facade.d.ts.map +1 -1
- package/esm/object/facade.js.map +1 -1
- package/esm/object/filterKey.d.ts.map +1 -1
- package/esm/object/filterKey.js.map +1 -1
- package/esm/object/findKey.d.ts.map +1 -1
- package/esm/object/findKey.js.map +1 -1
- package/esm/object/forEachKey.d.ts.map +1 -1
- package/esm/object/forEachKey.js +1 -1
- package/esm/object/forEachKey.js.map +1 -1
- package/esm/object/getField.d.ts.map +1 -1
- package/esm/object/getField.js.map +1 -1
- package/esm/object/hasKey.d.ts +1 -1
- package/esm/object/hasKey.d.ts.map +1 -1
- package/esm/object/hasKey.js.map +1 -1
- package/esm/object/hasProperty.d.ts.map +1 -1
- package/esm/object/hasProperty.js.map +1 -1
- package/esm/object/index.d.ts +15 -16
- 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 +119 -0
- package/esm/object/is_not_object.d.ts.map +1 -0
- package/esm/object/is_not_object.js +2 -0
- package/esm/object/is_not_object.js.map +1 -0
- package/esm/object/is_object.d.ts +104 -0
- package/esm/object/is_object.d.ts.map +1 -0
- package/esm/object/is_object.js +2 -0
- package/esm/object/is_object.js.map +1 -0
- package/esm/object/left_join.d.ts +1 -6
- package/esm/object/left_join.d.ts.map +1 -1
- package/esm/object/left_join.js.map +1 -1
- package/esm/object/mapKey.d.ts.map +1 -1
- package/esm/object/mapKey.js.map +1 -1
- package/esm/object/mapProperties.d.ts +1 -1
- package/esm/object/mapProperties.d.ts.map +1 -1
- package/esm/object/mapProperties.js.map +1 -1
- package/esm/object/merge.d.ts +80 -0
- package/esm/object/merge.d.ts.map +1 -0
- package/esm/object/merge.js +2 -0
- package/esm/object/merge.js.map +1 -0
- package/esm/object/object_plus.d.ts +2 -0
- package/esm/object/object_plus.d.ts.map +1 -0
- package/esm/object/object_plus.js +2 -0
- package/esm/object/object_plus.js.map +1 -0
- package/esm/object/omit.d.ts +1 -8
- package/esm/object/omit.d.ts.map +1 -1
- package/esm/object/omit.js.map +1 -1
- package/esm/object/optional_key.d.ts +2 -2
- package/esm/object/optional_key.d.ts.map +1 -1
- package/esm/object/optional_key.js.map +1 -1
- package/esm/object/pick.d.ts +1 -1
- package/esm/object/pick.d.ts.map +1 -1
- package/esm/object/pick.js.map +1 -1
- package/esm/object/properties.d.ts.map +1 -1
- package/esm/object/properties.js.map +1 -1
- package/esm/object/record.d.ts.map +1 -1
- package/esm/object/record.js.map +1 -1
- package/esm/object/recursive_partial.d.ts +1 -1
- package/esm/object/recursive_partial.d.ts.map +1 -1
- package/esm/object/recursive_partial.js.map +1 -1
- package/esm/object/reduceKey.d.ts.map +1 -1
- package/esm/object/reduceKey.js.map +1 -1
- package/esm/object/replaceProperty.d.ts +1 -1
- package/esm/object/replaceProperty.d.ts.map +1 -1
- package/esm/object/replaceProperty.js.map +1 -1
- package/esm/object/someKey.d.ts.map +1 -1
- package/esm/object/someKey.js.map +1 -1
- package/esm/object/split.d.ts +2 -3
- package/esm/object/split.d.ts.map +1 -1
- package/esm/object/split.js.map +1 -1
- package/esm/object/typeOverrideIncompatible.d.ts.map +1 -1
- package/esm/object/typeOverrideIncompatible.js +4 -6
- package/esm/object/typeOverrideIncompatible.js.map +1 -1
- package/esm/predicates/CanAssign.d.ts +12 -4
- package/esm/predicates/CanAssign.d.ts.map +1 -1
- package/esm/predicates/CanAssign.js.map +1 -1
- package/esm/predicates/Extends.d.ts +3 -0
- package/esm/predicates/Extends.d.ts.map +1 -1
- package/esm/predicates/Extends.js.map +1 -1
- package/esm/predicates/If.d.ts.map +1 -1
- package/esm/predicates/If.js.map +1 -1
- package/esm/predicates/IsEmptyObject.d.ts.map +1 -1
- package/esm/predicates/IsEmptyObject.js.map +1 -1
- package/esm/predicates/assignable.d.ts +89 -0
- package/esm/predicates/assignable.d.ts.map +1 -0
- package/esm/predicates/assignable.js +2 -0
- package/esm/predicates/assignable.js.map +1 -0
- package/esm/predicates/index.d.ts.map +1 -1
- package/esm/predicates/index.js.map +1 -1
- package/esm/predicates/literal.d.ts +1 -1
- package/esm/predicates/literal.d.ts.map +1 -1
- package/esm/predicates/literal.js.map +1 -1
- package/esm/predicates/logical.d.ts.map +1 -1
- package/esm/predicates/logical.js.map +1 -1
- package/esm/predicates/not_assignable.d.ts +89 -0
- package/esm/predicates/not_assignable.d.ts.map +1 -0
- package/esm/predicates/not_assignable.js +2 -0
- package/esm/predicates/not_assignable.js.map +1 -0
- package/esm/primitive.d.ts.map +1 -1
- package/esm/primitive.js.map +1 -1
- package/esm/promise/MaybePromise.d.ts.map +1 -1
- package/esm/promise/MaybePromise.js.map +1 -1
- package/esm/promise/PromiseValue.d.ts.map +1 -1
- package/esm/promise/PromiseValue.js.map +1 -1
- package/esm/promise/PromiseValueMerge.d.ts.map +1 -1
- package/esm/promise/PromiseValueMerge.js.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.map +1 -1
- package/esm/promise/isPromise.d.ts.map +1 -1
- package/esm/promise/isPromise.js.map +1 -1
- package/esm/promise/mapSeries.d.ts.map +1 -1
- package/esm/promise/mapSeries.js.map +1 -1
- package/esm/string/$extract_manipulated_string.d.ts +18 -0
- package/esm/string/$extract_manipulated_string.d.ts.map +1 -0
- package/esm/string/$extract_manipulated_string.js +2 -0
- package/esm/string/$extract_manipulated_string.js.map +1 -0
- package/esm/string/_string_type.d.ts +5 -0
- package/esm/string/_string_type.d.ts.map +1 -0
- package/esm/string/_string_type.js +2 -0
- package/esm/string/_string_type.js.map +1 -0
- package/esm/string/is_not_string.d.ts +84 -0
- package/esm/string/is_not_string.d.ts.map +1 -0
- package/esm/string/is_not_string.js +2 -0
- package/esm/string/is_not_string.js.map +1 -0
- package/esm/string/is_not_string_literal.d.ts +104 -0
- package/esm/string/is_not_string_literal.d.ts.map +1 -0
- package/esm/string/is_not_string_literal.js +2 -0
- package/esm/string/is_not_string_literal.js.map +1 -0
- package/esm/string/is_not_template_literal.d.ts +73 -0
- package/esm/string/is_not_template_literal.d.ts.map +1 -0
- package/esm/string/is_not_template_literal.js +2 -0
- package/esm/string/is_not_template_literal.js.map +1 -0
- package/esm/string/is_string.d.ts +83 -0
- package/esm/string/is_string.d.ts.map +1 -0
- package/esm/string/is_string.js +2 -0
- package/esm/string/is_string.js.map +1 -0
- package/esm/string/is_string_literal.d.ts +104 -0
- package/esm/string/is_string_literal.d.ts.map +1 -0
- package/esm/string/is_string_literal.js +2 -0
- package/esm/string/is_string_literal.js.map +1 -0
- package/esm/string/is_template_literal.d.ts +75 -0
- package/esm/string/is_template_literal.d.ts.map +1 -0
- package/esm/string/is_template_literal.js +2 -0
- package/esm/string/is_template_literal.js.map +1 -0
- package/esm/string/string.d.ts +1 -1
- package/esm/string/string.d.ts.map +1 -1
- package/esm/string/string.js.map +1 -1
- package/esm/string/string_plus.d.ts.map +1 -1
- package/esm/string/string_plus.js.map +1 -1
- package/esm/symbol/is_not_symbol.d.ts +71 -0
- package/esm/symbol/is_not_symbol.d.ts.map +1 -0
- package/esm/symbol/is_not_symbol.js +2 -0
- package/esm/symbol/is_not_symbol.js.map +1 -0
- package/esm/symbol/is_symbol.d.ts +73 -0
- package/esm/symbol/is_symbol.d.ts.map +1 -0
- package/esm/symbol/is_symbol.js +2 -0
- package/esm/symbol/is_symbol.js.map +1 -0
- package/esm/testing/stub.d.ts.map +1 -1
- package/esm/testing/stub.js.map +1 -1
- package/esm/testing/test_type.d.ts +84 -44
- package/esm/testing/test_type.d.ts.map +1 -1
- package/esm/testing/test_type.js.map +1 -1
- package/esm/tuple/common_prop_keys.d.ts +1 -1
- package/esm/tuple/common_prop_keys.d.ts.map +1 -1
- package/esm/tuple/common_prop_keys.js.map +1 -1
- package/esm/tuple/create_tuple.d.ts +2 -2
- package/esm/tuple/create_tuple.d.ts.map +1 -1
- package/esm/tuple/create_tuple.js.map +1 -1
- package/esm/tuple/drop.d.ts +8 -8
- package/esm/tuple/drop.d.ts.map +1 -1
- package/esm/tuple/drop.js.map +1 -1
- package/esm/tuple/is_not_tuple.d.ts +78 -0
- package/esm/tuple/is_not_tuple.d.ts.map +1 -0
- package/esm/tuple/is_not_tuple.js +2 -0
- package/esm/tuple/is_not_tuple.js.map +1 -0
- package/esm/tuple/is_tuple.d.ts +76 -0
- package/esm/tuple/is_tuple.d.ts.map +1 -0
- package/esm/tuple/is_tuple.js +2 -0
- package/esm/tuple/is_tuple.js.map +1 -0
- package/esm/tuple/tail.d.ts +1 -1
- package/esm/tuple/tail.d.ts.map +1 -1
- package/esm/tuple/tail.js.map +1 -1
- package/esm/tuple/tuple_plus.common_prop_keys.d.ts +9 -5
- package/esm/tuple/tuple_plus.common_prop_keys.d.ts.map +1 -1
- package/esm/tuple/tuple_plus.common_prop_keys.js.map +1 -1
- package/esm/tuple/tuple_plus.d.ts.map +1 -1
- package/esm/tuple/tuple_plus.drop_match.d.ts.map +1 -1
- package/esm/tuple/tuple_plus.drop_match.js.map +1 -1
- package/esm/tuple/tuple_plus.filter.d.ts +1 -1
- package/esm/tuple/tuple_plus.filter.d.ts.map +1 -1
- package/esm/tuple/tuple_plus.filter.js.map +1 -1
- package/esm/tuple/tuple_plus.find.d.ts +21 -18
- package/esm/tuple/tuple_plus.find.d.ts.map +1 -1
- package/esm/tuple/tuple_plus.find.js.map +1 -1
- package/esm/tuple/tuple_plus.js.map +1 -1
- package/esm/tuple/tuple_plus.pad_start.d.ts +3 -3
- package/esm/tuple/tuple_plus.pad_start.d.ts.map +1 -1
- package/esm/tuple/tuple_plus.pad_start.js.map +1 -1
- package/esm/type/failed.d.ts.map +1 -1
- package/esm/type/failed.js.map +1 -1
- package/esm/type/no_infer.d.ts +4 -3
- package/esm/type/no_infer.d.ts.map +1 -1
- package/esm/type/no_infer.js.map +1 -1
- package/esm/type-guard/is_type.d.ts +1 -1
- package/esm/type-guard/is_type.d.ts.map +1 -1
- package/esm/type-guard/is_type.js +3 -7
- package/esm/type-guard/is_type.js.map +1 -1
- package/esm/type_plus/$equality.d.ts +12 -0
- package/esm/type_plus/$equality.d.ts.map +1 -0
- package/esm/type_plus/$equality.js +2 -0
- package/esm/type_plus/$equality.js.map +1 -0
- package/esm/type_plus/$error.d.ts +8 -0
- package/esm/type_plus/$error.d.ts.map +1 -0
- package/esm/type_plus/$error.js +2 -0
- package/esm/type_plus/$error.js.map +1 -0
- package/esm/type_plus/$infer_error.d.ts +21 -0
- package/esm/type_plus/$infer_error.d.ts.map +1 -0
- package/esm/type_plus/$infer_error.js +2 -0
- package/esm/type_plus/$infer_error.js.map +1 -0
- package/esm/type_plus/$merge_options.d.ts +11 -0
- package/esm/type_plus/$merge_options.d.ts.map +1 -0
- package/esm/type_plus/$merge_options.js +2 -0
- package/esm/type_plus/$merge_options.js.map +1 -0
- package/esm/type_plus/$resolve_options.d.ts +11 -0
- package/esm/type_plus/$resolve_options.d.ts.map +1 -0
- package/esm/type_plus/$resolve_options.js +2 -0
- package/esm/type_plus/$resolve_options.js.map +1 -0
- package/esm/type_plus/$special_type.d.ts +25 -0
- package/esm/type_plus/$special_type.d.ts.map +1 -0
- package/esm/type_plus/$special_type.js +2 -0
- package/esm/type_plus/$special_type.js.map +1 -0
- package/esm/type_plus/$type.d.ts +11 -0
- package/esm/type_plus/$type.d.ts.map +1 -0
- package/esm/type_plus/$type.js +2 -0
- package/esm/type_plus/$type.js.map +1 -0
- package/esm/type_plus/branch/$branch.d.ts +29 -0
- package/esm/type_plus/branch/$branch.d.ts.map +1 -0
- package/esm/type_plus/branch/$branch.js +2 -0
- package/esm/type_plus/branch/$branch.js.map +1 -0
- package/esm/type_plus/branch/$distributive.d.ts +19 -0
- package/esm/type_plus/branch/$distributive.d.ts.map +1 -0
- package/esm/type_plus/branch/$distributive.js +2 -0
- package/esm/type_plus/branch/$distributive.js.map +1 -0
- package/esm/type_plus/branch/$exact.d.ts +27 -0
- package/esm/type_plus/branch/$exact.d.ts.map +1 -0
- package/esm/type_plus/branch/$exact.js +2 -0
- package/esm/type_plus/branch/$exact.js.map +1 -0
- package/esm/type_plus/branch/$input_options.d.ts +10 -0
- package/esm/type_plus/branch/$input_options.d.ts.map +1 -0
- package/esm/type_plus/branch/$input_options.js +2 -0
- package/esm/type_plus/branch/$input_options.js.map +1 -0
- package/esm/type_plus/branch/$is_distributive.d.ts +6 -0
- package/esm/type_plus/branch/$is_distributive.d.ts.map +1 -0
- package/esm/type_plus/branch/$is_distributive.js +2 -0
- package/esm/type_plus/branch/$is_distributive.js.map +1 -0
- package/esm/type_plus/branch/$override.d.ts +21 -0
- package/esm/type_plus/branch/$override.d.ts.map +1 -0
- package/esm/type_plus/branch/$override.js +2 -0
- package/esm/type_plus/branch/$override.js.map +1 -0
- package/esm/type_plus/branch/$resolve_branch.d.ts +30 -0
- package/esm/type_plus/branch/$resolve_branch.d.ts.map +1 -0
- package/esm/type_plus/branch/$resolve_branch.js +2 -0
- package/esm/type_plus/branch/$resolve_branch.js.map +1 -0
- package/esm/type_plus/branch/$select.d.ts +79 -0
- package/esm/type_plus/branch/$select.d.ts.map +1 -0
- package/esm/type_plus/branch/$select.js +2 -0
- package/esm/type_plus/branch/$select.js.map +1 -0
- package/esm/type_plus/branch/$select_invert.d.ts +77 -0
- package/esm/type_plus/branch/$select_invert.d.ts.map +1 -0
- package/esm/type_plus/branch/$select_invert.js +2 -0
- package/esm/type_plus/branch/$select_invert.js.map +1 -0
- package/esm/type_plus/branch/$select_invert_strict.d.ts +78 -0
- package/esm/type_plus/branch/$select_invert_strict.d.ts.map +1 -0
- package/esm/type_plus/branch/$select_invert_strict.js +2 -0
- package/esm/type_plus/branch/$select_invert_strict.js.map +1 -0
- package/esm/type_plus/branch/$select_strict.d.ts +79 -0
- package/esm/type_plus/branch/$select_strict.d.ts.map +1 -0
- package/esm/type_plus/branch/$select_strict.js +2 -0
- package/esm/type_plus/branch/$select_strict.js.map +1 -0
- package/esm/type_plus/branch/$selection.d.ts +127 -0
- package/esm/type_plus/branch/$selection.d.ts.map +1 -0
- package/esm/type_plus/branch/$selection.js +2 -0
- package/esm/type_plus/branch/$selection.js.map +1 -0
- package/esm/type_plus/branch/$selection_options.d.ts +37 -0
- package/esm/type_plus/branch/$selection_options.d.ts.map +1 -0
- package/esm/type_plus/branch/$selection_options.js +2 -0
- package/esm/type_plus/branch/$selection_options.js.map +1 -0
- package/esm/undefined/has_undefined.d.ts +41 -0
- package/esm/undefined/has_undefined.d.ts.map +1 -0
- package/esm/undefined/has_undefined.js +2 -0
- package/esm/undefined/has_undefined.js.map +1 -0
- package/esm/undefined/is_not_undefined.d.ts +72 -0
- package/esm/undefined/is_not_undefined.d.ts.map +1 -0
- package/esm/undefined/is_not_undefined.js +2 -0
- package/esm/undefined/is_not_undefined.js.map +1 -0
- package/esm/undefined/is_undefined.d.ts +75 -0
- package/esm/undefined/is_undefined.d.ts.map +1 -0
- package/esm/undefined/is_undefined.js +2 -0
- package/esm/undefined/is_undefined.js.map +1 -0
- package/esm/union/union.d.ts +1 -1
- package/esm/union/union.d.ts.map +1 -1
- package/esm/union/union.js.map +1 -1
- package/esm/union/union_to_intersection.d.ts.map +1 -1
- package/esm/union/union_to_intersection.js.map +1 -1
- package/esm/union_keys.d.ts.map +1 -1
- package/esm/union_keys.js.map +1 -1
- package/esm/unknown/is_not_unknown.d.ts +53 -0
- package/esm/unknown/is_not_unknown.d.ts.map +1 -0
- package/esm/unknown/is_not_unknown.js +2 -0
- package/esm/unknown/is_not_unknown.js.map +1 -0
- package/esm/unknown/is_unknown.d.ts +53 -0
- package/esm/unknown/is_unknown.d.ts.map +1 -0
- package/esm/unknown/is_unknown.js +2 -0
- package/esm/unknown/is_unknown.js.map +1 -0
- package/esm/unknown/not_unknown_or.d.ts +30 -0
- package/esm/unknown/not_unknown_or.d.ts.map +1 -0
- package/esm/unknown/not_unknown_or.js +2 -0
- package/esm/unknown/not_unknown_or.js.map +1 -0
- package/esm/unknown/unknown.d.ts +55 -0
- package/esm/unknown/unknown.d.ts.map +1 -0
- package/esm/unknown/unknown.js +2 -0
- package/esm/unknown/unknown.js.map +1 -0
- package/esm/unpartial.d.ts.map +1 -1
- package/esm/unpartial.js.map +1 -1
- package/esm/utils/Widen.d.ts.map +1 -1
- package/esm/utils/Widen.js.map +1 -1
- package/esm/utils/as.d.ts.map +1 -1
- package/esm/utils/as.js.map +1 -1
- package/esm/utils/index.d.ts +0 -2
- package/esm/utils/index.d.ts.map +1 -1
- package/esm/utils/index.js.map +1 -1
- package/esm/utils/inspect.d.ts.map +1 -1
- package/esm/utils/inspect.js.map +1 -1
- package/esm/utils/options.d.ts +14 -9
- package/esm/utils/options.d.ts.map +1 -1
- package/esm/utils/options.js.map +1 -1
- package/esm/void/is_not_void.d.ts +78 -0
- package/esm/void/is_not_void.d.ts.map +1 -0
- package/esm/void/is_not_void.js +2 -0
- package/esm/void/is_not_void.js.map +1 -0
- package/esm/void/is_void.d.ts +79 -0
- package/esm/void/is_void.d.ts.map +1 -0
- package/esm/void/is_void.js +2 -0
- package/esm/void/is_void.js.map +1 -0
- package/package.json +31 -33
- package/readme.md +1376 -0
- package/src/any/any.ts +46 -0
- package/src/any/is_any.ts +59 -0
- package/src/any/is_not_any.ts +59 -0
- package/src/any/readme.md +104 -0
- package/src/array/array.at.ts +40 -0
- package/src/array/array.entries.ts +28 -0
- package/src/array/array.find_last.ts +31 -0
- package/src/array/array.reverse.ts +25 -0
- package/src/array/array.some.ts +67 -0
- package/src/array/array_plus.common_prop_keys.ts +38 -0
- package/src/array/array_plus.concat.ts +15 -0
- package/src/array/array_plus.drop_match.ts +16 -0
- package/src/array/array_plus.element_match.ts +61 -0
- package/src/array/array_plus.filter.ts +52 -0
- package/src/array/array_plus.find.ts +71 -0
- package/src/array/array_plus.index_at.ts +169 -0
- package/src/array/array_plus.is_index_out_of_bound.ts +24 -0
- package/src/array/array_plus.is_readonly.ts +50 -0
- package/src/array/array_plus.pad_start.ts +13 -0
- package/src/array/array_plus.split_at.ts +79 -0
- package/src/array/array_plus.ts +16 -0
- package/src/array/filter.ts +32 -0
- package/src/array/find_first.ts +73 -0
- package/src/array/head.ts +45 -0
- package/src/array/intersect_of_props.ts +21 -0
- package/src/array/is_array.ts +116 -0
- package/src/array/is_not_array.ts +114 -0
- package/src/array/last.ts +42 -0
- package/src/array/loose_array_type.ts +71 -0
- package/src/array/pad_start.ts +39 -0
- package/src/array/readme.md +567 -0
- package/src/array/union_of_props.ts +17 -0
- package/src/array/union_of_values.ts +14 -0
- package/src/assertion/assert_type.ts +117 -0
- package/src/bigint/is_bigint.ts +114 -0
- package/src/bigint/is_bigint_literal.ts +100 -0
- package/src/bigint/is_not_bigint.ts +110 -0
- package/src/bigint/is_not_bigint_literal.ts +101 -0
- package/src/bigint/readme.md +109 -0
- package/src/boolean/is_boolean.ts +126 -0
- package/src/boolean/is_false.ts +85 -0
- package/src/boolean/is_not_boolean.ts +109 -0
- package/src/boolean/is_not_false.ts +86 -0
- package/src/boolean/is_not_true.ts +86 -0
- package/src/boolean/is_true.ts +85 -0
- package/src/boolean/readme.md +430 -0
- package/src/class/AnyConstructor.ts +1 -0
- package/src/class/isConstructor.ts +34 -0
- package/src/equal/equal.ts +135 -0
- package/src/equal/identity_equal.ts +9 -0
- package/src/function/is_function.ts +62 -0
- package/src/function/is_not_function.ts +75 -0
- package/src/function/is_not_strict_function.ts +40 -0
- package/src/function/is_strict_function.ts +43 -0
- package/src/functional/Maybe.ts +22 -0
- package/src/functional/compose.ts +18 -0
- package/src/functional/context.ts +66 -0
- package/src/index.ts +139 -0
- package/src/math/abs.ts +23 -0
- package/src/math/greater_than.ts +12 -0
- package/src/math/index.ts +7 -0
- package/src/math/max.ts +13 -0
- package/src/math/numeric_struct.ts +656 -0
- package/src/mix_types/box.ts +74 -0
- package/src/mix_types/exclude.ts +18 -0
- package/src/mix_types/is_any_or_never.ts +31 -0
- package/src/mix_types/merge.ts +61 -0
- package/src/mix_types/readme.md +87 -0
- package/src/never/is_never.ts +62 -0
- package/src/never/is_not_never.ts +62 -0
- package/src/never/never.ts +78 -0
- package/src/never/readme.md +148 -0
- package/src/nominal/brand.ts +41 -0
- package/src/nominal/flavor.ts +51 -0
- package/src/nominal/nominal_match.ts +21 -0
- package/src/null/is_not_null.ts +79 -0
- package/src/null/is_null.ts +83 -0
- package/src/null/readme.md +107 -0
- package/src/number/is_not_number.ts +99 -0
- package/src/number/is_not_number_literal.ts +101 -0
- package/src/number/is_number.ts +103 -0
- package/src/number/is_number_literal.ts +100 -0
- package/src/number/number_plus.ts +13 -0
- package/src/number/readme.md +225 -0
- package/src/numeric/is_integer.ts +48 -0
- package/src/numeric/is_negative.ts +51 -0
- package/src/numeric/is_not_integer.ts +49 -0
- package/src/numeric/is_not_negative.ts +49 -0
- package/src/numeric/is_not_numeric.ts +21 -0
- package/src/numeric/is_not_positive.ts +50 -0
- package/src/numeric/is_numeric.ts +20 -0
- package/src/numeric/is_positive.ts +51 -0
- package/src/numeric/numeric_plus.ts +10 -0
- package/src/numeric/numeric_type.ts +10 -0
- package/src/object/ANotB.ts +12 -0
- package/src/object/IsDisjoint.ts +12 -0
- package/src/object/KeysWithDiffType.ts +9 -0
- package/src/object/KnownKeys.ts +17 -0
- package/src/object/RecursiveIntersect.ts +25 -0
- package/src/object/RecursiveRequired.ts +9 -0
- package/src/object/Required.ts +7 -0
- package/src/object/RequiredKeys.ts +8 -0
- package/src/object/facade.ts +214 -0
- package/src/object/forEachKey.ts +9 -0
- package/src/object/hasKey.ts +7 -0
- package/src/object/index.ts +38 -0
- package/src/object/is_not_object.ts +132 -0
- package/src/object/is_object.ts +119 -0
- package/src/object/left_join.ts +10 -0
- package/src/object/mapProperties.ts +22 -0
- package/src/object/merge.ts +117 -0
- package/src/object/object_plus.ts +1 -0
- package/src/object/omit.ts +220 -0
- package/src/object/optional_key.ts +38 -0
- package/src/object/pick.ts +220 -0
- package/src/object/readme.md +79 -0
- package/src/object/record.ts +23 -0
- package/src/object/recursive_partial.ts +39 -0
- package/src/object/replaceProperty.ts +11 -0
- package/src/object/split.ts +202 -0
- package/src/object/typeOverrideIncompatible.ts +8 -0
- package/src/predicates/CanAssign.ts +61 -0
- package/src/predicates/Extends.ts +7 -0
- package/src/predicates/assignable.ts +102 -0
- package/src/predicates/index.ts +6 -0
- package/src/predicates/literal.ts +35 -0
- package/src/predicates/not_assignable.ts +100 -0
- package/src/promise/index.ts +5 -0
- package/src/string/$extract_manipulated_string.ts +45 -0
- package/src/string/_string_type.ts +11 -0
- package/src/string/is_not_string.ts +100 -0
- package/src/string/is_not_string_literal.ts +132 -0
- package/src/string/is_not_template_literal.ts +90 -0
- package/src/string/is_string.ts +101 -0
- package/src/string/is_string_literal.ts +132 -0
- package/src/string/is_template_literal.ts +91 -0
- package/src/string/string.ts +36 -0
- package/src/string/string_plus.ts +34 -0
- package/src/symbol/is_not_symbol.ts +78 -0
- package/src/symbol/is_symbol.ts +80 -0
- package/src/testing/stub.ts +81 -0
- package/src/testing/test_type.ts +313 -0
- package/src/tuple/common_prop_keys.ts +41 -0
- package/src/tuple/create_tuple.ts +42 -0
- package/src/tuple/drop.ts +125 -0
- package/src/tuple/is_not_tuple.ts +101 -0
- package/src/tuple/is_tuple.ts +99 -0
- package/src/tuple/readme.md +282 -0
- package/src/tuple/tail.ts +10 -0
- package/src/tuple/tuple_plus.common_prop_keys.ts +50 -0
- package/src/tuple/tuple_plus.filter.ts +29 -0
- package/src/tuple/tuple_plus.find.ts +89 -0
- package/src/tuple/tuple_plus.pad_start.ts +61 -0
- package/src/type/no_infer.ts +28 -0
- package/src/type-guard/is_type.ts +48 -0
- package/src/type_plus/$equality.ts +14 -0
- package/src/type_plus/$error.ts +8 -0
- package/src/type_plus/$infer_error.ts +21 -0
- package/src/type_plus/$merge_options.ts +9 -0
- package/src/type_plus/$resolve_options.ts +16 -0
- package/src/type_plus/$special_type.ts +24 -0
- package/src/type_plus/$type.ts +10 -0
- package/src/type_plus/branch/$branch.ts +27 -0
- package/src/type_plus/branch/$distributive.ts +19 -0
- package/src/type_plus/branch/$exact.ts +34 -0
- package/src/type_plus/branch/$input_options.ts +9 -0
- package/src/type_plus/branch/$is_distributive.ts +12 -0
- package/src/type_plus/branch/$override.ts +22 -0
- package/src/type_plus/branch/$resolve_branch.ts +81 -0
- package/src/type_plus/branch/$select.ts +90 -0
- package/src/type_plus/branch/$select_invert.ts +88 -0
- package/src/type_plus/branch/$select_invert_strict.ts +88 -0
- package/src/type_plus/branch/$select_strict.ts +90 -0
- package/src/type_plus/branch/$selection.ts +135 -0
- package/src/type_plus/branch/$selection_options.ts +36 -0
- package/src/type_plus/readme.md +25 -0
- package/src/undefined/has_undefined.ts +44 -0
- package/src/undefined/is_not_undefined.ts +80 -0
- package/src/undefined/is_undefined.ts +82 -0
- package/src/undefined/readme.md +140 -0
- package/src/union/readme.md +81 -0
- package/src/union/union.ts +37 -0
- package/src/unknown/is_not_unknown.ts +57 -0
- package/src/unknown/is_unknown.ts +57 -0
- package/src/unknown/not_unknown_or.ts +29 -0
- package/src/unknown/readme.md +108 -0
- package/src/unknown/unknown.ts +58 -0
- package/src/utils/index.ts +61 -0
- package/src/utils/options.ts +15 -0
- package/src/void/is_not_void.ts +90 -0
- package/src/void/is_void.ts +91 -0
- package/src/void/readme.md +108 -0
- package/README.md +0 -1356
- package/cjs/any/any_type.d.ts +0 -63
- package/cjs/any/any_type.d.ts.map +0 -1
- package/cjs/any/any_type.js +0 -3
- package/cjs/any/any_type.js.map +0 -1
- package/cjs/array/array.at.d.ts +0 -20
- package/cjs/array/array.at.d.ts.map +0 -1
- package/cjs/array/array.at.js +0 -3
- package/cjs/array/array.at.js.map +0 -1
- package/cjs/array/array.entries.d.ts +0 -18
- package/cjs/array/array.entries.d.ts.map +0 -1
- package/cjs/array/array.entries.js +0 -3
- package/cjs/array/array.entries.js.map +0 -1
- package/cjs/array/array.find_last.d.ts +0 -19
- package/cjs/array/array.find_last.d.ts.map +0 -1
- package/cjs/array/array.find_last.js +0 -3
- package/cjs/array/array.find_last.js.map +0 -1
- package/cjs/array/array.reverse.d.ts +0 -2
- package/cjs/array/array.reverse.d.ts.map +0 -1
- package/cjs/array/array.reverse.js +0 -3
- package/cjs/array/array.reverse.js.map +0 -1
- package/cjs/array/array.some.d.ts +0 -33
- package/cjs/array/array.some.d.ts.map +0 -1
- package/cjs/array/array.some.js +0 -3
- package/cjs/array/array.some.js.map +0 -1
- package/cjs/array/array_index.d.ts +0 -37
- package/cjs/array/array_index.d.ts.map +0 -1
- package/cjs/array/array_index.js +0 -3
- package/cjs/array/array_index.js.map +0 -1
- package/cjs/array/array_plus.common_prop_keys.d.ts +0 -27
- package/cjs/array/array_plus.common_prop_keys.d.ts.map +0 -1
- package/cjs/array/array_plus.common_prop_keys.js +0 -3
- package/cjs/array/array_plus.common_prop_keys.js.map +0 -1
- package/cjs/array/array_plus.concat.d.ts +0 -16
- package/cjs/array/array_plus.concat.d.ts.map +0 -1
- package/cjs/array/array_plus.concat.js +0 -3
- package/cjs/array/array_plus.concat.js.map +0 -1
- package/cjs/array/array_plus.d.ts +0 -15
- package/cjs/array/array_plus.d.ts.map +0 -1
- package/cjs/array/array_plus.drop_match.d.ts +0 -4
- package/cjs/array/array_plus.drop_match.d.ts.map +0 -1
- package/cjs/array/array_plus.drop_match.js +0 -3
- package/cjs/array/array_plus.drop_match.js.map +0 -1
- package/cjs/array/array_plus.element_match.d.ts +0 -44
- package/cjs/array/array_plus.element_match.d.ts.map +0 -1
- package/cjs/array/array_plus.element_match.js +0 -3
- package/cjs/array/array_plus.element_match.js.map +0 -1
- package/cjs/array/array_plus.filter.d.ts +0 -2
- package/cjs/array/array_plus.filter.d.ts.map +0 -1
- package/cjs/array/array_plus.filter.js +0 -3
- package/cjs/array/array_plus.filter.js.map +0 -1
- package/cjs/array/array_plus.find.d.ts +0 -57
- package/cjs/array/array_plus.find.d.ts.map +0 -1
- package/cjs/array/array_plus.find.js +0 -3
- package/cjs/array/array_plus.find.js.map +0 -1
- package/cjs/array/array_plus.js +0 -3
- package/cjs/array/array_plus.js.map +0 -1
- package/cjs/array/array_plus.pad_start.d.ts +0 -5
- package/cjs/array/array_plus.pad_start.d.ts.map +0 -1
- package/cjs/array/array_plus.pad_start.js +0 -3
- package/cjs/array/array_plus.pad_start.js.map +0 -1
- package/cjs/array/array_plus.split_at.d.ts +0 -40
- package/cjs/array/array_plus.split_at.d.ts.map +0 -1
- package/cjs/array/array_plus.split_at.js +0 -3
- package/cjs/array/array_plus.split_at.js.map +0 -1
- package/cjs/array/array_type.d.ts +0 -66
- package/cjs/array/array_type.d.ts.map +0 -1
- package/cjs/array/array_type.js +0 -3
- package/cjs/array/array_type.js.map +0 -1
- package/cjs/array/filter.d.ts +0 -29
- package/cjs/array/filter.d.ts.map +0 -1
- package/cjs/array/filter.js +0 -3
- package/cjs/array/filter.js.map +0 -1
- package/cjs/array/find_first.d.ts +0 -62
- package/cjs/array/find_first.d.ts.map +0 -1
- package/cjs/array/find_first.js +0 -3
- package/cjs/array/find_first.js.map +0 -1
- package/cjs/array/head.d.ts +0 -31
- package/cjs/array/head.d.ts.map +0 -1
- package/cjs/array/head.js +0 -3
- package/cjs/array/head.js.map +0 -1
- package/cjs/array/intersect_of_props.d.ts +0 -14
- package/cjs/array/intersect_of_props.d.ts.map +0 -1
- package/cjs/array/intersect_of_props.js +0 -3
- package/cjs/array/intersect_of_props.js.map +0 -1
- package/cjs/array/last.d.ts +0 -30
- package/cjs/array/last.d.ts.map +0 -1
- package/cjs/array/last.js +0 -3
- package/cjs/array/last.js.map +0 -1
- package/cjs/array/literal_array.d.ts +0 -8
- package/cjs/array/literal_array.d.ts.map +0 -1
- package/cjs/array/literal_array.js +0 -13
- package/cjs/array/literal_array.js.map +0 -1
- package/cjs/array/pad_start.d.ts +0 -32
- package/cjs/array/pad_start.d.ts.map +0 -1
- package/cjs/array/pad_start.js +0 -3
- package/cjs/array/pad_start.js.map +0 -1
- package/cjs/array/reduce_while.d.ts +0 -8
- package/cjs/array/reduce_while.d.ts.map +0 -1
- package/cjs/array/reduce_while.js +0 -21
- package/cjs/array/reduce_while.js.map +0 -1
- package/cjs/array/reverse.d.ts +0 -7
- package/cjs/array/reverse.d.ts.map +0 -1
- package/cjs/array/reverse.js +0 -3
- package/cjs/array/reverse.js.map +0 -1
- package/cjs/array/union_of_props.d.ts +0 -12
- package/cjs/array/union_of_props.d.ts.map +0 -1
- package/cjs/array/union_of_props.js +0 -3
- package/cjs/array/union_of_props.js.map +0 -1
- package/cjs/array/union_of_values.d.ts +0 -10
- package/cjs/array/union_of_values.d.ts.map +0 -1
- package/cjs/array/union_of_values.js +0 -3
- package/cjs/array/union_of_values.js.map +0 -1
- package/cjs/assertion/assert_type.d.ts +0 -40
- package/cjs/assertion/assert_type.d.ts.map +0 -1
- package/cjs/assertion/assert_type.js +0 -113
- package/cjs/assertion/assert_type.js.map +0 -1
- package/cjs/bigint/bigint_type.d.ts +0 -54
- package/cjs/bigint/bigint_type.d.ts.map +0 -1
- package/cjs/bigint/bigint_type.js +0 -3
- package/cjs/bigint/bigint_type.js.map +0 -1
- package/cjs/bigint/cast.d.ts +0 -10
- package/cjs/bigint/cast.d.ts.map +0 -1
- package/cjs/bigint/cast.js +0 -3
- package/cjs/bigint/cast.js.map +0 -1
- package/cjs/bigint/strict_bigint_type.d.ts +0 -56
- package/cjs/bigint/strict_bigint_type.d.ts.map +0 -1
- package/cjs/bigint/strict_bigint_type.js +0 -3
- package/cjs/bigint/strict_bigint_type.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 +0 -3
- package/cjs/binary/Bit.js.map +0 -1
- package/cjs/binary/_binary.d.ts +0 -2
- package/cjs/binary/_binary.d.ts.map +0 -1
- package/cjs/binary/_binary.js +0 -3
- package/cjs/binary/_binary.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/boolean/boolean_type.d.ts +0 -56
- package/cjs/boolean/boolean_type.d.ts.map +0 -1
- package/cjs/boolean/boolean_type.js +0 -3
- package/cjs/boolean/boolean_type.js.map +0 -1
- package/cjs/boolean/false_type.d.ts +0 -49
- package/cjs/boolean/false_type.d.ts.map +0 -1
- package/cjs/boolean/false_type.js +0 -3
- package/cjs/boolean/false_type.js.map +0 -1
- package/cjs/boolean/strict_boolean_type.d.ts +0 -53
- package/cjs/boolean/strict_boolean_type.d.ts.map +0 -1
- package/cjs/boolean/strict_boolean_type.js +0 -3
- package/cjs/boolean/strict_boolean_type.js.map +0 -1
- package/cjs/boolean/true_type.d.ts +0 -49
- package/cjs/boolean/true_type.d.ts.map +0 -1
- package/cjs/boolean/true_type.js +0 -3
- package/cjs/boolean/true_type.js.map +0 -1
- package/cjs/class/AnyConstructor.d.ts +0 -2
- package/cjs/class/AnyConstructor.d.ts.map +0 -1
- package/cjs/class/AnyConstructor.js +0 -3
- package/cjs/class/AnyConstructor.js.map +0 -1
- package/cjs/class/index.d.ts +0 -3
- package/cjs/class/index.d.ts.map +0 -1
- package/cjs/class/index.js +0 -18
- package/cjs/class/index.js.map +0 -1
- package/cjs/class/isConstructor.d.ts +0 -18
- package/cjs/class/isConstructor.d.ts.map +0 -1
- package/cjs/class/isConstructor.js +0 -35
- package/cjs/class/isConstructor.js.map +0 -1
- package/cjs/composable_types.d.ts +0 -9
- package/cjs/composable_types.d.ts.map +0 -1
- package/cjs/composable_types.js +0 -3
- package/cjs/composable_types.js.map +0 -1
- package/cjs/equal/equal.d.ts +0 -99
- package/cjs/equal/equal.d.ts.map +0 -1
- package/cjs/equal/equal.js +0 -3
- package/cjs/equal/equal.js.map +0 -1
- package/cjs/function/any_function.d.ts +0 -2
- package/cjs/function/any_function.d.ts.map +0 -1
- package/cjs/function/any_function.js +0 -3
- package/cjs/function/any_function.js.map +0 -1
- package/cjs/function/extract_function.d.ts +0 -24
- package/cjs/function/extract_function.d.ts.map +0 -1
- package/cjs/function/extract_function.js +0 -13
- package/cjs/function/extract_function.js.map +0 -1
- package/cjs/function/function_type.d.ts +0 -59
- package/cjs/function/function_type.d.ts.map +0 -1
- package/cjs/function/function_type.js +0 -3
- package/cjs/function/function_type.js.map +0 -1
- package/cjs/function/strict_function_type.d.ts +0 -49
- package/cjs/function/strict_function_type.d.ts.map +0 -1
- package/cjs/function/strict_function_type.js +0 -3
- package/cjs/function/strict_function_type.js.map +0 -1
- package/cjs/functional/ChainFn.d.ts +0 -6
- package/cjs/functional/ChainFn.d.ts.map +0 -1
- package/cjs/functional/ChainFn.js +0 -3
- package/cjs/functional/ChainFn.js.map +0 -1
- package/cjs/functional/Maybe.d.ts +0 -13
- package/cjs/functional/Maybe.d.ts.map +0 -1
- package/cjs/functional/Maybe.js +0 -17
- package/cjs/functional/Maybe.js.map +0 -1
- package/cjs/functional/compose.d.ts +0 -12
- package/cjs/functional/compose.d.ts.map +0 -1
- package/cjs/functional/compose.js +0 -16
- package/cjs/functional/compose.js.map +0 -1
- package/cjs/functional/context.d.ts +0 -40
- package/cjs/functional/context.d.ts.map +0 -1
- package/cjs/functional/context.js +0 -32
- package/cjs/functional/context.js.map +0 -1
- package/cjs/functional/index.d.ts +0 -4
- package/cjs/functional/index.d.ts.map +0 -1
- package/cjs/functional/index.js +0 -19
- package/cjs/functional/index.js.map +0 -1
- package/cjs/index.d.ts +0 -84
- package/cjs/index.d.ts.map +0 -1
- package/cjs/index.js +0 -45
- package/cjs/index.js.map +0 -1
- package/cjs/json.d.ts +0 -12
- package/cjs/json.d.ts.map +0 -1
- package/cjs/json.js +0 -14
- package/cjs/json.js.map +0 -1
- package/cjs/math/abs.d.ts +0 -6
- package/cjs/math/abs.d.ts.map +0 -1
- package/cjs/math/abs.js +0 -3
- package/cjs/math/abs.js.map +0 -1
- package/cjs/math/add.d.ts +0 -7
- package/cjs/math/add.d.ts.map +0 -1
- package/cjs/math/add.js +0 -3
- package/cjs/math/add.js.map +0 -1
- package/cjs/math/greater_than.d.ts +0 -4
- package/cjs/math/greater_than.d.ts.map +0 -1
- package/cjs/math/greater_than.js +0 -3
- package/cjs/math/greater_than.js.map +0 -1
- package/cjs/math/index.d.ts +0 -7
- package/cjs/math/index.d.ts.map +0 -1
- package/cjs/math/index.js +0 -3
- package/cjs/math/index.js.map +0 -1
- package/cjs/math/math_plus.d.ts +0 -5
- package/cjs/math/math_plus.d.ts.map +0 -1
- package/cjs/math/math_plus.js +0 -3
- package/cjs/math/math_plus.js.map +0 -1
- package/cjs/math/math_plus.to_negative.d.ts +0 -13
- package/cjs/math/math_plus.to_negative.d.ts.map +0 -1
- package/cjs/math/math_plus.to_negative.js +0 -3
- package/cjs/math/math_plus.to_negative.js.map +0 -1
- package/cjs/math/max.d.ts +0 -4
- package/cjs/math/max.d.ts.map +0 -1
- package/cjs/math/max.js +0 -3
- package/cjs/math/max.js.map +0 -1
- package/cjs/math/multiply.d.ts +0 -6
- package/cjs/math/multiply.d.ts.map +0 -1
- package/cjs/math/multiply.js +0 -3
- package/cjs/math/multiply.js.map +0 -1
- package/cjs/math/numeric_struct.d.ts +0 -1480
- package/cjs/math/numeric_struct.d.ts.map +0 -1
- package/cjs/math/numeric_struct.js +0 -3
- package/cjs/math/numeric_struct.js.map +0 -1
- package/cjs/math/subtract.d.ts +0 -7
- package/cjs/math/subtract.d.ts.map +0 -1
- package/cjs/math/subtract.js +0 -3
- package/cjs/math/subtract.js.map +0 -1
- package/cjs/merge.d.ts +0 -55
- package/cjs/merge.d.ts.map +0 -1
- package/cjs/merge.js +0 -18
- package/cjs/merge.js.map +0 -1
- package/cjs/mix_types/any_or_never_type.d.ts +0 -37
- package/cjs/mix_types/any_or_never_type.d.ts.map +0 -1
- package/cjs/mix_types/any_or_never_type.js +0 -3
- package/cjs/mix_types/any_or_never_type.js.map +0 -1
- package/cjs/never/never_type.d.ts +0 -62
- package/cjs/never/never_type.d.ts.map +0 -1
- package/cjs/never/never_type.js +0 -3
- package/cjs/never/never_type.js.map +0 -1
- package/cjs/nodejs/index.d.ts +0 -2
- package/cjs/nodejs/index.d.ts.map +0 -1
- package/cjs/nodejs/index.js +0 -18
- package/cjs/nodejs/index.js.map +0 -1
- package/cjs/nodejs/isNodeError.d.ts +0 -31
- package/cjs/nodejs/isNodeError.d.ts.map +0 -1
- package/cjs/nodejs/isNodeError.js +0 -13
- package/cjs/nodejs/isNodeError.js.map +0 -1
- package/cjs/nominal/brand.d.ts +0 -23
- package/cjs/nominal/brand.d.ts.map +0 -1
- package/cjs/nominal/brand.js +0 -20
- package/cjs/nominal/brand.js.map +0 -1
- package/cjs/nominal/constants.d.ts +0 -3
- package/cjs/nominal/constants.d.ts.map +0 -1
- package/cjs/nominal/constants.js +0 -6
- package/cjs/nominal/constants.js.map +0 -1
- package/cjs/nominal/flavor.d.ts +0 -31
- package/cjs/nominal/flavor.d.ts.map +0 -1
- package/cjs/nominal/flavor.js +0 -20
- package/cjs/nominal/flavor.js.map +0 -1
- package/cjs/nominal/index.d.ts +0 -4
- package/cjs/nominal/index.d.ts.map +0 -1
- package/cjs/nominal/index.js +0 -20
- package/cjs/nominal/index.js.map +0 -1
- package/cjs/nominal/nominal_match.d.ts +0 -5
- package/cjs/nominal/nominal_match.d.ts.map +0 -1
- package/cjs/nominal/nominal_match.js +0 -13
- package/cjs/nominal/nominal_match.js.map +0 -1
- package/cjs/null/null_type.d.ts +0 -50
- package/cjs/null/null_type.d.ts.map +0 -1
- package/cjs/null/null_type.js +0 -3
- package/cjs/null/null_type.js.map +0 -1
- package/cjs/number/cast.d.ts +0 -10
- package/cjs/number/cast.d.ts.map +0 -1
- package/cjs/number/cast.js +0 -3
- package/cjs/number/cast.js.map +0 -1
- package/cjs/number/number_array.d.ts +0 -1
- package/cjs/number/number_array.d.ts.map +0 -1
- package/cjs/number/number_array.js +0 -16
- package/cjs/number/number_array.js.map +0 -1
- package/cjs/number/number_plus.d.ts +0 -7
- package/cjs/number/number_plus.d.ts.map +0 -1
- package/cjs/number/number_plus.js +0 -3
- package/cjs/number/number_plus.js.map +0 -1
- package/cjs/number/number_type.d.ts +0 -50
- package/cjs/number/number_type.d.ts.map +0 -1
- package/cjs/number/number_type.js +0 -3
- package/cjs/number/number_type.js.map +0 -1
- package/cjs/number/strict_number_type.d.ts +0 -65
- package/cjs/number/strict_number_type.d.ts.map +0 -1
- package/cjs/number/strict_number_type.js +0 -3
- package/cjs/number/strict_number_type.js.map +0 -1
- package/cjs/numeric/cast.d.ts +0 -27
- package/cjs/numeric/cast.d.ts.map +0 -1
- package/cjs/numeric/cast.js +0 -3
- package/cjs/numeric/cast.js.map +0 -1
- package/cjs/numeric/integer.d.ts +0 -69
- package/cjs/numeric/integer.d.ts.map +0 -1
- package/cjs/numeric/integer.js +0 -3
- package/cjs/numeric/integer.js.map +0 -1
- package/cjs/numeric/negative.d.ts +0 -70
- package/cjs/numeric/negative.d.ts.map +0 -1
- package/cjs/numeric/negative.js +0 -3
- package/cjs/numeric/negative.js.map +0 -1
- package/cjs/numeric/numeric_plus.d.ts +0 -5
- package/cjs/numeric/numeric_plus.d.ts.map +0 -1
- package/cjs/numeric/numeric_plus.js +0 -3
- package/cjs/numeric/numeric_plus.js.map +0 -1
- package/cjs/numeric/numeric_type.d.ts +0 -59
- package/cjs/numeric/numeric_type.d.ts.map +0 -1
- package/cjs/numeric/numeric_type.js +0 -3
- package/cjs/numeric/numeric_type.js.map +0 -1
- package/cjs/numeric/positive.d.ts +0 -53
- package/cjs/numeric/positive.d.ts.map +0 -1
- package/cjs/numeric/positive.js +0 -3
- package/cjs/numeric/positive.js.map +0 -1
- package/cjs/object/ANotB.d.ts +0 -9
- package/cjs/object/ANotB.d.ts.map +0 -1
- package/cjs/object/ANotB.js +0 -3
- package/cjs/object/ANotB.js.map +0 -1
- package/cjs/object/AnyRecord.d.ts +0 -3
- package/cjs/object/AnyRecord.d.ts.map +0 -1
- package/cjs/object/AnyRecord.js +0 -3
- package/cjs/object/AnyRecord.js.map +0 -1
- package/cjs/object/ExcludePropType.d.ts +0 -7
- package/cjs/object/ExcludePropType.d.ts.map +0 -1
- package/cjs/object/ExcludePropType.js +0 -3
- package/cjs/object/ExcludePropType.js.map +0 -1
- package/cjs/object/IsDisjoint.d.ts +0 -9
- package/cjs/object/IsDisjoint.d.ts.map +0 -1
- package/cjs/object/IsDisjoint.js +0 -3
- package/cjs/object/IsDisjoint.js.map +0 -1
- package/cjs/object/IsRecord.d.ts +0 -2
- package/cjs/object/IsRecord.d.ts.map +0 -1
- package/cjs/object/IsRecord.js +0 -3
- package/cjs/object/IsRecord.js.map +0 -1
- package/cjs/object/KeyTypes.d.ts +0 -7
- package/cjs/object/KeyTypes.d.ts.map +0 -1
- package/cjs/object/KeyTypes.js +0 -3
- package/cjs/object/KeyTypes.js.map +0 -1
- package/cjs/object/KeyofOptional.d.ts +0 -6
- package/cjs/object/KeyofOptional.d.ts.map +0 -1
- package/cjs/object/KeyofOptional.js +0 -3
- package/cjs/object/KeyofOptional.js.map +0 -1
- package/cjs/object/KeysWithDiffType.d.ts +0 -7
- package/cjs/object/KeysWithDiffType.d.ts.map +0 -1
- package/cjs/object/KeysWithDiffType.js +0 -3
- package/cjs/object/KeysWithDiffType.js.map +0 -1
- package/cjs/object/KnownKeys.d.ts +0 -7
- package/cjs/object/KnownKeys.d.ts.map +0 -1
- package/cjs/object/KnownKeys.js +0 -6
- package/cjs/object/KnownKeys.js.map +0 -1
- package/cjs/object/OptionalKeys.d.ts +0 -8
- package/cjs/object/OptionalKeys.d.ts.map +0 -1
- package/cjs/object/OptionalKeys.js +0 -3
- package/cjs/object/OptionalKeys.js.map +0 -1
- package/cjs/object/Partial.d.ts +0 -22
- package/cjs/object/Partial.d.ts.map +0 -1
- package/cjs/object/Partial.js +0 -3
- package/cjs/object/Partial.js.map +0 -1
- package/cjs/object/RecursiveIntersect.d.ts +0 -16
- package/cjs/object/RecursiveIntersect.d.ts.map +0 -1
- package/cjs/object/RecursiveIntersect.js +0 -3
- package/cjs/object/RecursiveIntersect.js.map +0 -1
- package/cjs/object/RecursiveRequired.d.ts +0 -5
- package/cjs/object/RecursiveRequired.d.ts.map +0 -1
- package/cjs/object/RecursiveRequired.js +0 -3
- package/cjs/object/RecursiveRequired.js.map +0 -1
- package/cjs/object/Required.d.ts +0 -7
- package/cjs/object/Required.d.ts.map +0 -1
- package/cjs/object/Required.js +0 -4
- package/cjs/object/Required.js.map +0 -1
- package/cjs/object/RequiredKeys.d.ts +0 -7
- package/cjs/object/RequiredKeys.d.ts.map +0 -1
- package/cjs/object/RequiredKeys.js +0 -3
- package/cjs/object/RequiredKeys.js.map +0 -1
- package/cjs/object/SpreadRecord.d.ts +0 -3
- package/cjs/object/SpreadRecord.d.ts.map +0 -1
- package/cjs/object/SpreadRecord.js +0 -3
- package/cjs/object/SpreadRecord.js.map +0 -1
- package/cjs/object/ValueOf.d.ts +0 -2
- package/cjs/object/ValueOf.d.ts.map +0 -1
- package/cjs/object/ValueOf.js +0 -3
- package/cjs/object/ValueOf.js.map +0 -1
- package/cjs/object/everyKey.d.ts +0 -3
- package/cjs/object/everyKey.d.ts.map +0 -1
- package/cjs/object/everyKey.js +0 -8
- package/cjs/object/everyKey.js.map +0 -1
- package/cjs/object/facade.d.ts +0 -17
- package/cjs/object/facade.d.ts.map +0 -1
- package/cjs/object/facade.js +0 -27
- package/cjs/object/facade.js.map +0 -1
- package/cjs/object/filterKey.d.ts +0 -3
- package/cjs/object/filterKey.d.ts.map +0 -1
- package/cjs/object/filterKey.js +0 -10
- package/cjs/object/filterKey.js.map +0 -1
- package/cjs/object/findKey.d.ts +0 -3
- package/cjs/object/findKey.d.ts.map +0 -1
- package/cjs/object/findKey.js +0 -10
- package/cjs/object/findKey.js.map +0 -1
- package/cjs/object/forEachKey.d.ts +0 -3
- package/cjs/object/forEachKey.d.ts.map +0 -1
- package/cjs/object/forEachKey.js +0 -8
- package/cjs/object/forEachKey.js.map +0 -1
- package/cjs/object/getField.d.ts +0 -4
- package/cjs/object/getField.d.ts.map +0 -1
- package/cjs/object/getField.js +0 -8
- package/cjs/object/getField.js.map +0 -1
- package/cjs/object/hasKey.d.ts +0 -4
- package/cjs/object/hasKey.d.ts.map +0 -1
- package/cjs/object/hasKey.js +0 -8
- package/cjs/object/hasKey.js.map +0 -1
- package/cjs/object/hasProperty.d.ts +0 -3
- package/cjs/object/hasProperty.d.ts.map +0 -1
- package/cjs/object/hasProperty.js +0 -8
- package/cjs/object/hasProperty.js.map +0 -1
- package/cjs/object/index.d.ts +0 -39
- package/cjs/object/index.d.ts.map +0 -1
- package/cjs/object/index.js +0 -36
- package/cjs/object/index.js.map +0 -1
- package/cjs/object/left_join.d.ts +0 -15
- package/cjs/object/left_join.d.ts.map +0 -1
- package/cjs/object/left_join.js +0 -3
- package/cjs/object/left_join.js.map +0 -1
- package/cjs/object/mapKey.d.ts +0 -3
- package/cjs/object/mapKey.d.ts.map +0 -1
- package/cjs/object/mapKey.js +0 -10
- package/cjs/object/mapKey.js.map +0 -1
- package/cjs/object/mapProperties.d.ts +0 -14
- package/cjs/object/mapProperties.d.ts.map +0 -1
- package/cjs/object/mapProperties.js +0 -17
- package/cjs/object/mapProperties.js.map +0 -1
- package/cjs/object/object_type.d.ts +0 -54
- package/cjs/object/object_type.d.ts.map +0 -1
- package/cjs/object/object_type.js +0 -3
- package/cjs/object/object_type.js.map +0 -1
- package/cjs/object/omit.d.ts +0 -29
- package/cjs/object/omit.d.ts.map +0 -1
- package/cjs/object/omit.js +0 -14
- package/cjs/object/omit.js.map +0 -1
- package/cjs/object/optional_key.d.ts +0 -35
- package/cjs/object/optional_key.d.ts.map +0 -1
- package/cjs/object/optional_key.js +0 -3
- package/cjs/object/optional_key.js.map +0 -1
- package/cjs/object/pick.d.ts +0 -29
- package/cjs/object/pick.d.ts.map +0 -1
- package/cjs/object/pick.js +0 -14
- package/cjs/object/pick.js.map +0 -1
- package/cjs/object/properties.d.ts +0 -7
- package/cjs/object/properties.d.ts.map +0 -1
- package/cjs/object/properties.js +0 -3
- package/cjs/object/properties.js.map +0 -1
- package/cjs/object/record.d.ts +0 -17
- package/cjs/object/record.d.ts.map +0 -1
- package/cjs/object/record.js +0 -9
- package/cjs/object/record.js.map +0 -1
- package/cjs/object/recursive_partial.d.ts +0 -29
- package/cjs/object/recursive_partial.d.ts.map +0 -1
- package/cjs/object/recursive_partial.js +0 -4
- package/cjs/object/recursive_partial.js.map +0 -1
- package/cjs/object/reduceKey.d.ts +0 -7
- package/cjs/object/reduceKey.d.ts.map +0 -1
- package/cjs/object/reduceKey.js +0 -12
- package/cjs/object/reduceKey.js.map +0 -1
- package/cjs/object/replaceProperty.d.ts +0 -6
- package/cjs/object/replaceProperty.d.ts.map +0 -1
- package/cjs/object/replaceProperty.js +0 -8
- package/cjs/object/replaceProperty.js.map +0 -1
- package/cjs/object/someKey.d.ts +0 -3
- package/cjs/object/someKey.d.ts.map +0 -1
- package/cjs/object/someKey.js +0 -10
- package/cjs/object/someKey.js.map +0 -1
- package/cjs/object/split.d.ts +0 -76
- package/cjs/object/split.d.ts.map +0 -1
- package/cjs/object/split.js +0 -12
- package/cjs/object/split.js.map +0 -1
- package/cjs/object/typeOverrideIncompatible.d.ts +0 -3
- package/cjs/object/typeOverrideIncompatible.d.ts.map +0 -1
- package/cjs/object/typeOverrideIncompatible.js +0 -13
- package/cjs/object/typeOverrideIncompatible.js.map +0 -1
- package/cjs/package.json +0 -3
- package/cjs/predicates/CanAssign.d.ts +0 -45
- package/cjs/predicates/CanAssign.d.ts.map +0 -1
- package/cjs/predicates/CanAssign.js +0 -8
- package/cjs/predicates/CanAssign.js.map +0 -1
- package/cjs/predicates/Extends.d.ts +0 -5
- package/cjs/predicates/Extends.d.ts.map +0 -1
- package/cjs/predicates/Extends.js +0 -3
- package/cjs/predicates/Extends.js.map +0 -1
- package/cjs/predicates/If.d.ts +0 -2
- package/cjs/predicates/If.d.ts.map +0 -1
- package/cjs/predicates/If.js +0 -3
- package/cjs/predicates/If.js.map +0 -1
- package/cjs/predicates/IsEmptyObject.d.ts +0 -2
- package/cjs/predicates/IsEmptyObject.d.ts.map +0 -1
- package/cjs/predicates/IsEmptyObject.js +0 -3
- package/cjs/predicates/IsEmptyObject.js.map +0 -1
- package/cjs/predicates/index.d.ts +0 -7
- package/cjs/predicates/index.d.ts.map +0 -1
- package/cjs/predicates/index.js +0 -18
- package/cjs/predicates/index.js.map +0 -1
- package/cjs/predicates/literal.d.ts +0 -22
- package/cjs/predicates/literal.d.ts.map +0 -1
- package/cjs/predicates/literal.js +0 -3
- package/cjs/predicates/literal.js.map +0 -1
- package/cjs/predicates/logical.d.ts +0 -5
- package/cjs/predicates/logical.d.ts.map +0 -1
- package/cjs/predicates/logical.js +0 -3
- package/cjs/predicates/logical.js.map +0 -1
- package/cjs/primitive.d.ts +0 -5
- package/cjs/primitive.d.ts.map +0 -1
- package/cjs/primitive.js +0 -3
- package/cjs/primitive.js.map +0 -1
- package/cjs/promise/MaybePromise.d.ts +0 -22
- package/cjs/promise/MaybePromise.d.ts.map +0 -1
- package/cjs/promise/MaybePromise.js +0 -12
- package/cjs/promise/MaybePromise.js.map +0 -1
- package/cjs/promise/PromiseValue.d.ts +0 -13
- package/cjs/promise/PromiseValue.d.ts.map +0 -1
- package/cjs/promise/PromiseValue.js +0 -3
- package/cjs/promise/PromiseValue.js.map +0 -1
- package/cjs/promise/PromiseValueMerge.d.ts +0 -5
- package/cjs/promise/PromiseValueMerge.d.ts.map +0 -1
- package/cjs/promise/PromiseValueMerge.js +0 -3
- package/cjs/promise/PromiseValueMerge.js.map +0 -1
- package/cjs/promise/index.d.ts +0 -6
- package/cjs/promise/index.d.ts.map +0 -1
- package/cjs/promise/index.js +0 -20
- package/cjs/promise/index.js.map +0 -1
- package/cjs/promise/isPromise.d.ts +0 -2
- package/cjs/promise/isPromise.d.ts.map +0 -1
- package/cjs/promise/isPromise.js +0 -9
- package/cjs/promise/isPromise.js.map +0 -1
- package/cjs/promise/mapSeries.d.ts +0 -2
- package/cjs/promise/mapSeries.d.ts.map +0 -1
- package/cjs/promise/mapSeries.js +0 -8
- package/cjs/promise/mapSeries.js.map +0 -1
- package/cjs/string/strict_string_type.d.ts +0 -61
- package/cjs/string/strict_string_type.d.ts.map +0 -1
- package/cjs/string/strict_string_type.js +0 -3
- package/cjs/string/strict_string_type.js.map +0 -1
- package/cjs/string/string.d.ts +0 -24
- package/cjs/string/string.d.ts.map +0 -1
- package/cjs/string/string.js +0 -3
- package/cjs/string/string.js.map +0 -1
- package/cjs/string/string_plus.d.ts +0 -27
- package/cjs/string/string_plus.d.ts.map +0 -1
- package/cjs/string/string_plus.js +0 -3
- package/cjs/string/string_plus.js.map +0 -1
- package/cjs/string/string_type.d.ts +0 -58
- package/cjs/string/string_type.d.ts.map +0 -1
- package/cjs/string/string_type.js +0 -3
- package/cjs/string/string_type.js.map +0 -1
- package/cjs/symbol/symbol_type.d.ts +0 -50
- package/cjs/symbol/symbol_type.d.ts.map +0 -1
- package/cjs/symbol/symbol_type.js +0 -3
- package/cjs/symbol/symbol_type.js.map +0 -1
- package/cjs/testing/stub.d.ts +0 -31
- package/cjs/testing/stub.d.ts.map +0 -1
- package/cjs/testing/stub.js +0 -60
- package/cjs/testing/stub.js.map +0 -1
- package/cjs/testing/test_type.d.ts +0 -310
- package/cjs/testing/test_type.d.ts.map +0 -1
- package/cjs/testing/test_type.js +0 -16
- package/cjs/testing/test_type.js.map +0 -1
- package/cjs/tuple/common_prop_keys.d.ts +0 -34
- package/cjs/tuple/common_prop_keys.d.ts.map +0 -1
- package/cjs/tuple/common_prop_keys.js +0 -3
- package/cjs/tuple/common_prop_keys.js.map +0 -1
- package/cjs/tuple/create_tuple.d.ts +0 -28
- package/cjs/tuple/create_tuple.d.ts.map +0 -1
- package/cjs/tuple/create_tuple.js +0 -3
- package/cjs/tuple/create_tuple.js.map +0 -1
- package/cjs/tuple/drop.d.ts +0 -91
- package/cjs/tuple/drop.d.ts.map +0 -1
- package/cjs/tuple/drop.js +0 -13
- package/cjs/tuple/drop.js.map +0 -1
- package/cjs/tuple/tail.d.ts +0 -6
- package/cjs/tuple/tail.d.ts.map +0 -1
- package/cjs/tuple/tail.js +0 -3
- package/cjs/tuple/tail.js.map +0 -1
- package/cjs/tuple/tuple_plus.common_prop_keys.d.ts +0 -28
- package/cjs/tuple/tuple_plus.common_prop_keys.d.ts.map +0 -1
- package/cjs/tuple/tuple_plus.common_prop_keys.js +0 -3
- package/cjs/tuple/tuple_plus.common_prop_keys.js.map +0 -1
- package/cjs/tuple/tuple_plus.d.ts +0 -6
- package/cjs/tuple/tuple_plus.d.ts.map +0 -1
- package/cjs/tuple/tuple_plus.drop_match.d.ts +0 -6
- package/cjs/tuple/tuple_plus.drop_match.d.ts.map +0 -1
- package/cjs/tuple/tuple_plus.drop_match.js +0 -3
- package/cjs/tuple/tuple_plus.drop_match.js.map +0 -1
- package/cjs/tuple/tuple_plus.filter.d.ts +0 -13
- package/cjs/tuple/tuple_plus.filter.d.ts.map +0 -1
- package/cjs/tuple/tuple_plus.filter.js +0 -3
- package/cjs/tuple/tuple_plus.filter.js.map +0 -1
- package/cjs/tuple/tuple_plus.find.d.ts +0 -64
- package/cjs/tuple/tuple_plus.find.d.ts.map +0 -1
- package/cjs/tuple/tuple_plus.find.js +0 -3
- package/cjs/tuple/tuple_plus.find.js.map +0 -1
- package/cjs/tuple/tuple_plus.js +0 -3
- package/cjs/tuple/tuple_plus.js.map +0 -1
- package/cjs/tuple/tuple_plus.pad_start.d.ts +0 -28
- package/cjs/tuple/tuple_plus.pad_start.d.ts.map +0 -1
- package/cjs/tuple/tuple_plus.pad_start.js +0 -3
- package/cjs/tuple/tuple_plus.pad_start.js.map +0 -1
- package/cjs/tuple/tuple_type.d.ts +0 -77
- package/cjs/tuple/tuple_type.d.ts.map +0 -1
- package/cjs/tuple/tuple_type.js +0 -3
- package/cjs/tuple/tuple_type.js.map +0 -1
- package/cjs/type/failed.d.ts +0 -32
- package/cjs/type/failed.d.ts.map +0 -1
- package/cjs/type/failed.js +0 -3
- package/cjs/type/failed.js.map +0 -1
- package/cjs/type/no_infer.d.ts +0 -27
- package/cjs/type/no_infer.d.ts.map +0 -1
- package/cjs/type/no_infer.js +0 -3
- package/cjs/type/no_infer.js.map +0 -1
- package/cjs/type-guard/is_type.d.ts +0 -27
- package/cjs/type-guard/is_type.d.ts.map +0 -1
- package/cjs/type-guard/is_type.js +0 -32
- package/cjs/type-guard/is_type.js.map +0 -1
- package/cjs/undefined/undefined_type.d.ts +0 -53
- package/cjs/undefined/undefined_type.d.ts.map +0 -1
- package/cjs/undefined/undefined_type.js +0 -3
- package/cjs/undefined/undefined_type.js.map +0 -1
- package/cjs/union/union.d.ts +0 -33
- package/cjs/union/union.d.ts.map +0 -1
- package/cjs/union/union.js +0 -3
- package/cjs/union/union.js.map +0 -1
- package/cjs/union/union_to_intersection.d.ts +0 -3
- package/cjs/union/union_to_intersection.d.ts.map +0 -1
- package/cjs/union/union_to_intersection.js +0 -8
- package/cjs/union/union_to_intersection.js.map +0 -1
- package/cjs/union_keys.d.ts +0 -6
- package/cjs/union_keys.d.ts.map +0 -1
- package/cjs/union_keys.js +0 -3
- package/cjs/union_keys.js.map +0 -1
- package/cjs/unknown/unknown_type.d.ts +0 -63
- package/cjs/unknown/unknown_type.d.ts.map +0 -1
- package/cjs/unknown/unknown_type.js +0 -3
- package/cjs/unknown/unknown_type.js.map +0 -1
- package/cjs/unpartial.d.ts +0 -2
- package/cjs/unpartial.d.ts.map +0 -1
- package/cjs/unpartial.js +0 -8
- package/cjs/unpartial.js.map +0 -1
- package/cjs/utils/NonNull.d.ts +0 -2
- package/cjs/utils/NonNull.d.ts.map +0 -1
- package/cjs/utils/NonNull.js +0 -3
- package/cjs/utils/NonNull.js.map +0 -1
- package/cjs/utils/NonUndefined.d.ts +0 -2
- package/cjs/utils/NonUndefined.d.ts.map +0 -1
- package/cjs/utils/NonUndefined.js +0 -3
- package/cjs/utils/NonUndefined.js.map +0 -1
- package/cjs/utils/Widen.d.ts +0 -6
- package/cjs/utils/Widen.d.ts.map +0 -1
- package/cjs/utils/Widen.js +0 -3
- package/cjs/utils/Widen.js.map +0 -1
- package/cjs/utils/as.d.ts +0 -10
- package/cjs/utils/as.d.ts.map +0 -1
- package/cjs/utils/as.js +0 -26
- package/cjs/utils/as.js.map +0 -1
- package/cjs/utils/index.d.ts +0 -43
- package/cjs/utils/index.d.ts.map +0 -1
- package/cjs/utils/index.js +0 -19
- package/cjs/utils/index.js.map +0 -1
- package/cjs/utils/inspect.d.ts +0 -5
- package/cjs/utils/inspect.d.ts.map +0 -1
- package/cjs/utils/inspect.js +0 -13
- package/cjs/utils/inspect.js.map +0 -1
- package/cjs/utils/options.d.ts +0 -10
- package/cjs/utils/options.d.ts.map +0 -1
- package/cjs/utils/options.js +0 -3
- package/cjs/utils/options.js.map +0 -1
- package/cjs/void/void_type.d.ts +0 -43
- package/cjs/void/void_type.d.ts.map +0 -1
- package/cjs/void/void_type.js +0 -3
- package/cjs/void/void_type.js.map +0 -1
- package/esm/any/any_type.d.ts +0 -63
- package/esm/any/any_type.d.ts.map +0 -1
- package/esm/any/any_type.js +0 -2
- package/esm/any/any_type.js.map +0 -1
- package/esm/array/array_index.d.ts +0 -37
- package/esm/array/array_index.d.ts.map +0 -1
- package/esm/array/array_index.js +0 -2
- package/esm/array/array_index.js.map +0 -1
- package/esm/array/array_type.d.ts +0 -66
- package/esm/array/array_type.d.ts.map +0 -1
- package/esm/array/array_type.js +0 -2
- package/esm/array/array_type.js.map +0 -1
- package/esm/bigint/bigint_type.d.ts +0 -54
- package/esm/bigint/bigint_type.d.ts.map +0 -1
- package/esm/bigint/bigint_type.js +0 -2
- package/esm/bigint/bigint_type.js.map +0 -1
- package/esm/bigint/strict_bigint_type.d.ts +0 -56
- package/esm/bigint/strict_bigint_type.d.ts.map +0 -1
- package/esm/bigint/strict_bigint_type.js +0 -2
- package/esm/bigint/strict_bigint_type.js.map +0 -1
- package/esm/boolean/boolean_type.d.ts +0 -56
- package/esm/boolean/boolean_type.d.ts.map +0 -1
- package/esm/boolean/boolean_type.js +0 -2
- package/esm/boolean/boolean_type.js.map +0 -1
- package/esm/boolean/false_type.d.ts +0 -49
- package/esm/boolean/false_type.d.ts.map +0 -1
- package/esm/boolean/false_type.js +0 -2
- package/esm/boolean/false_type.js.map +0 -1
- package/esm/boolean/strict_boolean_type.d.ts +0 -53
- package/esm/boolean/strict_boolean_type.d.ts.map +0 -1
- package/esm/boolean/strict_boolean_type.js +0 -2
- package/esm/boolean/strict_boolean_type.js.map +0 -1
- package/esm/boolean/true_type.d.ts +0 -49
- package/esm/boolean/true_type.d.ts.map +0 -1
- package/esm/boolean/true_type.js +0 -2
- package/esm/boolean/true_type.js.map +0 -1
- package/esm/function/function_type.d.ts +0 -59
- package/esm/function/function_type.d.ts.map +0 -1
- package/esm/function/function_type.js +0 -2
- package/esm/function/function_type.js.map +0 -1
- package/esm/function/strict_function_type.d.ts +0 -49
- package/esm/function/strict_function_type.d.ts.map +0 -1
- package/esm/function/strict_function_type.js +0 -2
- package/esm/function/strict_function_type.js.map +0 -1
- package/esm/merge.d.ts +0 -55
- package/esm/merge.d.ts.map +0 -1
- package/esm/merge.js +0 -14
- package/esm/merge.js.map +0 -1
- package/esm/mix_types/any_or_never_type.d.ts +0 -37
- package/esm/mix_types/any_or_never_type.d.ts.map +0 -1
- package/esm/mix_types/any_or_never_type.js +0 -2
- package/esm/mix_types/any_or_never_type.js.map +0 -1
- package/esm/never/never_type.d.ts +0 -62
- package/esm/never/never_type.d.ts.map +0 -1
- package/esm/never/never_type.js +0 -2
- package/esm/never/never_type.js.map +0 -1
- package/esm/null/null_type.d.ts +0 -50
- package/esm/null/null_type.d.ts.map +0 -1
- package/esm/null/null_type.js +0 -2
- package/esm/null/null_type.js.map +0 -1
- package/esm/number/number_type.d.ts +0 -50
- package/esm/number/number_type.d.ts.map +0 -1
- package/esm/number/number_type.js +0 -2
- package/esm/number/number_type.js.map +0 -1
- package/esm/number/strict_number_type.d.ts +0 -65
- package/esm/number/strict_number_type.d.ts.map +0 -1
- package/esm/number/strict_number_type.js +0 -2
- package/esm/number/strict_number_type.js.map +0 -1
- package/esm/numeric/integer.d.ts +0 -69
- package/esm/numeric/integer.d.ts.map +0 -1
- package/esm/numeric/integer.js +0 -2
- package/esm/numeric/integer.js.map +0 -1
- package/esm/numeric/negative.d.ts +0 -70
- package/esm/numeric/negative.d.ts.map +0 -1
- package/esm/numeric/negative.js +0 -2
- package/esm/numeric/negative.js.map +0 -1
- package/esm/numeric/positive.d.ts +0 -53
- package/esm/numeric/positive.d.ts.map +0 -1
- package/esm/numeric/positive.js +0 -2
- package/esm/numeric/positive.js.map +0 -1
- package/esm/object/AnyRecord.d.ts +0 -3
- package/esm/object/AnyRecord.d.ts.map +0 -1
- package/esm/object/AnyRecord.js +0 -2
- package/esm/object/AnyRecord.js.map +0 -1
- package/esm/object/OptionalKeys.d.ts +0 -8
- package/esm/object/OptionalKeys.d.ts.map +0 -1
- package/esm/object/OptionalKeys.js +0 -2
- package/esm/object/OptionalKeys.js.map +0 -1
- package/esm/object/object_type.d.ts +0 -54
- package/esm/object/object_type.d.ts.map +0 -1
- package/esm/object/object_type.js +0 -2
- package/esm/object/object_type.js.map +0 -1
- package/esm/string/strict_string_type.d.ts +0 -61
- package/esm/string/strict_string_type.d.ts.map +0 -1
- package/esm/string/strict_string_type.js +0 -2
- package/esm/string/strict_string_type.js.map +0 -1
- package/esm/string/string_type.d.ts +0 -58
- package/esm/string/string_type.d.ts.map +0 -1
- package/esm/string/string_type.js +0 -2
- package/esm/string/string_type.js.map +0 -1
- package/esm/symbol/symbol_type.d.ts +0 -50
- package/esm/symbol/symbol_type.d.ts.map +0 -1
- package/esm/symbol/symbol_type.js +0 -2
- package/esm/symbol/symbol_type.js.map +0 -1
- package/esm/tuple/tuple_type.d.ts +0 -77
- package/esm/tuple/tuple_type.d.ts.map +0 -1
- package/esm/tuple/tuple_type.js +0 -2
- package/esm/tuple/tuple_type.js.map +0 -1
- package/esm/undefined/undefined_type.d.ts +0 -53
- package/esm/undefined/undefined_type.d.ts.map +0 -1
- package/esm/undefined/undefined_type.js +0 -2
- package/esm/undefined/undefined_type.js.map +0 -1
- package/esm/unknown/unknown_type.d.ts +0 -63
- package/esm/unknown/unknown_type.d.ts.map +0 -1
- package/esm/unknown/unknown_type.js +0 -2
- package/esm/unknown/unknown_type.js.map +0 -1
- package/esm/utils/NonNull.d.ts +0 -2
- package/esm/utils/NonNull.d.ts.map +0 -1
- package/esm/utils/NonNull.js +0 -2
- package/esm/utils/NonNull.js.map +0 -1
- package/esm/utils/NonUndefined.d.ts +0 -2
- package/esm/utils/NonUndefined.d.ts.map +0 -1
- package/esm/utils/NonUndefined.js +0 -2
- package/esm/utils/NonUndefined.js.map +0 -1
- package/esm/void/void_type.d.ts +0 -43
- package/esm/void/void_type.d.ts.map +0 -1
- package/esm/void/void_type.js +0 -2
- package/esm/void/void_type.js.map +0 -1
- package/ts/any/any_type.ts +0 -65
- package/ts/any/readme.md +0 -110
- package/ts/array/array.at.ts +0 -30
- package/ts/array/array.entries.ts +0 -26
- package/ts/array/array.find_last.ts +0 -29
- package/ts/array/array.reverse.ts +0 -16
- package/ts/array/array.some.ts +0 -67
- package/ts/array/array_index.ts +0 -83
- package/ts/array/array_plus.common_prop_keys.ts +0 -35
- package/ts/array/array_plus.concat.ts +0 -15
- package/ts/array/array_plus.drop_match.ts +0 -16
- package/ts/array/array_plus.element_match.ts +0 -61
- package/ts/array/array_plus.filter.ts +0 -5
- package/ts/array/array_plus.find.ts +0 -71
- package/ts/array/array_plus.pad_start.ts +0 -13
- package/ts/array/array_plus.split_at.ts +0 -74
- package/ts/array/array_plus.ts +0 -14
- package/ts/array/array_type.ts +0 -71
- package/ts/array/filter.ts +0 -32
- package/ts/array/find_first.ts +0 -71
- package/ts/array/head.ts +0 -40
- package/ts/array/intersect_of_props.ts +0 -21
- package/ts/array/last.ts +0 -38
- package/ts/array/pad_start.ts +0 -39
- package/ts/array/readme.md +0 -497
- package/ts/array/union_of_props.ts +0 -17
- package/ts/array/union_of_values.ts +0 -14
- package/ts/assertion/assert_type.ts +0 -119
- package/ts/bigint/bigint_type.ts +0 -57
- package/ts/bigint/readme.md +0 -51
- package/ts/bigint/strict_bigint_type.ts +0 -61
- package/ts/boolean/boolean_type.ts +0 -61
- package/ts/boolean/false_type.ts +0 -53
- package/ts/boolean/readme.md +0 -85
- package/ts/boolean/strict_boolean_type.ts +0 -57
- package/ts/boolean/true_type.ts +0 -53
- package/ts/class/AnyConstructor.ts +0 -1
- package/ts/class/isConstructor.ts +0 -34
- package/ts/equal/equal.ts +0 -142
- package/ts/function/function_type.ts +0 -64
- package/ts/function/strict_function_type.ts +0 -53
- package/ts/functional/Maybe.ts +0 -22
- package/ts/functional/compose.ts +0 -17
- package/ts/functional/context.ts +0 -66
- package/ts/index.ts +0 -121
- package/ts/math/abs.ts +0 -18
- package/ts/math/greater_than.ts +0 -12
- package/ts/math/index.ts +0 -7
- package/ts/math/max.ts +0 -13
- package/ts/math/numeric_struct.ts +0 -656
- package/ts/merge.ts +0 -72
- package/ts/mix_types/any_or_never_type.ts +0 -38
- package/ts/mix_types/readme.md +0 -40
- package/ts/never/never_type.ts +0 -70
- package/ts/never/readme.md +0 -37
- package/ts/nominal/brand.ts +0 -43
- package/ts/nominal/flavor.ts +0 -53
- package/ts/nominal/nominal_match.ts +0 -22
- package/ts/null/null_type.ts +0 -53
- package/ts/null/readme.md +0 -24
- package/ts/number/number_plus.ts +0 -20
- package/ts/number/number_type.ts +0 -53
- package/ts/number/readme.md +0 -47
- package/ts/number/strict_number_type.ts +0 -69
- package/ts/numeric/integer.ts +0 -75
- package/ts/numeric/negative.ts +0 -101
- package/ts/numeric/numeric_plus.ts +0 -12
- package/ts/numeric/numeric_type.ts +0 -64
- package/ts/numeric/positive.ts +0 -60
- package/ts/object/ANotB.ts +0 -12
- package/ts/object/IsDisjoint.ts +0 -12
- package/ts/object/KeysWithDiffType.ts +0 -9
- package/ts/object/KnownKeys.ts +0 -17
- package/ts/object/OptionalKeys.ts +0 -9
- package/ts/object/RecursiveIntersect.ts +0 -25
- package/ts/object/RecursiveRequired.ts +0 -9
- package/ts/object/Required.ts +0 -9
- package/ts/object/RequiredKeys.ts +0 -8
- package/ts/object/facade.ts +0 -214
- package/ts/object/forEachKey.ts +0 -9
- package/ts/object/hasKey.ts +0 -7
- package/ts/object/index.ts +0 -38
- package/ts/object/left_join.ts +0 -19
- package/ts/object/mapProperties.ts +0 -22
- package/ts/object/object_type.ts +0 -57
- package/ts/object/omit.ts +0 -224
- package/ts/object/optional_key.ts +0 -38
- package/ts/object/pick.ts +0 -220
- package/ts/object/readme.md +0 -65
- package/ts/object/record.ts +0 -23
- package/ts/object/recursive_partial.ts +0 -39
- package/ts/object/replaceProperty.ts +0 -11
- package/ts/object/split.ts +0 -203
- package/ts/object/typeOverrideIncompatible.ts +0 -10
- package/ts/predicates/CanAssign.ts +0 -71
- package/ts/predicates/Extends.ts +0 -4
- package/ts/predicates/index.ts +0 -7
- package/ts/predicates/literal.ts +0 -35
- package/ts/promise/index.ts +0 -5
- package/ts/string/strict_string_type.ts +0 -65
- package/ts/string/string.ts +0 -36
- package/ts/string/string_plus.ts +0 -33
- package/ts/string/string_type.ts +0 -61
- package/ts/symbol/symbol_type.ts +0 -53
- package/ts/testing/stub.ts +0 -80
- package/ts/testing/test_type.ts +0 -317
- package/ts/tuple/common_prop_keys.ts +0 -41
- package/ts/tuple/create_tuple.ts +0 -42
- package/ts/tuple/drop.ts +0 -125
- package/ts/tuple/readme.md +0 -282
- package/ts/tuple/tail.ts +0 -12
- package/ts/tuple/tuple_plus.common_prop_keys.ts +0 -47
- package/ts/tuple/tuple_plus.filter.ts +0 -29
- package/ts/tuple/tuple_plus.find.ts +0 -88
- package/ts/tuple/tuple_plus.pad_start.ts +0 -58
- package/ts/tuple/tuple_type.ts +0 -106
- package/ts/type/no_infer.ts +0 -27
- package/ts/type-guard/is_type.ts +0 -52
- package/ts/undefined/readme.md +0 -18
- package/ts/undefined/undefined_type.ts +0 -57
- package/ts/union/readme.md +0 -81
- package/ts/union/union.ts +0 -37
- package/ts/unknown/readme.md +0 -27
- package/ts/unknown/unknown_type.ts +0 -68
- package/ts/utils/NonNull.ts +0 -1
- package/ts/utils/NonUndefined.ts +0 -1
- package/ts/utils/index.ts +0 -63
- package/ts/utils/options.ts +0 -10
- package/ts/void/readme.md +0 -26
- package/ts/void/void_type.ts +0 -50
- /package/{ts → src}/array/literal_array.ts +0 -0
- /package/{ts → src}/array/reduce_while.ts +0 -0
- /package/{ts → src}/array/reverse.ts +0 -0
- /package/{ts → src}/assertion/readme.md +0 -0
- /package/{ts → src}/bigint/cast.ts +0 -0
- /package/{ts → src}/binary/Bit.ts +0 -0
- /package/{ts → src}/binary/_binary.ts +0 -0
- /package/{ts → src}/binary/index.ts +0 -0
- /package/{ts → src}/class/index.ts +0 -0
- /package/{ts → src}/composable_types.ts +0 -0
- /package/{ts → src}/equal/readme.md +0 -0
- /package/{ts → src}/function/any_function.ts +0 -0
- /package/{ts → src}/function/extract_function.ts +0 -0
- /package/{ts → src}/function/readme.md +0 -0
- /package/{ts → src}/functional/ChainFn.ts +0 -0
- /package/{ts → src}/functional/index.ts +0 -0
- /package/{ts → src}/json.ts +0 -0
- /package/{ts → src}/math/README.md +0 -0
- /package/{ts → src}/math/add.ts +0 -0
- /package/{ts → src}/math/math_plus.to_negative.ts +0 -0
- /package/{ts → src}/math/math_plus.ts +0 -0
- /package/{ts → src}/math/multiply.ts +0 -0
- /package/{ts → src}/math/subtract.ts +0 -0
- /package/{ts → src}/nodejs/index.ts +0 -0
- /package/{ts → src}/nodejs/isNodeError.ts +0 -0
- /package/{ts → src}/nominal/constants.ts +0 -0
- /package/{ts → src}/nominal/index.ts +0 -0
- /package/{ts → src}/number/cast.ts +0 -0
- /package/{ts → src}/number/number_array.ts +0 -0
- /package/{ts → src}/numeric/cast.ts +0 -0
- /package/{ts → src}/numeric/readme.md +0 -0
- /package/{ts → src}/object/ExcludePropType.ts +0 -0
- /package/{ts → src}/object/IsRecord.ts +0 -0
- /package/{ts → src}/object/KeyTypes.ts +0 -0
- /package/{ts → src}/object/KeyofOptional.ts +0 -0
- /package/{ts → src}/object/Partial.ts +0 -0
- /package/{ts → src}/object/SpreadRecord.ts +0 -0
- /package/{ts → src}/object/ValueOf.ts +0 -0
- /package/{ts/object/AnyRecord.ts → src/object/any_record.ts} +0 -0
- /package/{ts → src}/object/everyKey.ts +0 -0
- /package/{ts → src}/object/filterKey.ts +0 -0
- /package/{ts → src}/object/findKey.ts +0 -0
- /package/{ts → src}/object/getField.ts +0 -0
- /package/{ts → src}/object/hasProperty.ts +0 -0
- /package/{ts → src}/object/mapKey.ts +0 -0
- /package/{ts → src}/object/properties.ts +0 -0
- /package/{ts → src}/object/reduceKey.ts +0 -0
- /package/{ts → src}/object/someKey.ts +0 -0
- /package/{ts → src}/predicates/If.ts +0 -0
- /package/{ts → src}/predicates/IsEmptyObject.ts +0 -0
- /package/{ts → src}/predicates/logical.ts +0 -0
- /package/{ts → src}/primitive.ts +0 -0
- /package/{ts → src}/promise/MaybePromise.ts +0 -0
- /package/{ts → src}/promise/PromiseValue.ts +0 -0
- /package/{ts → src}/promise/PromiseValueMerge.ts +0 -0
- /package/{ts → src}/promise/isPromise.ts +0 -0
- /package/{ts → src}/promise/mapSeries.ts +0 -0
- /package/{ts → src}/string/readme.md +0 -0
- /package/{ts → src}/symbol/readme.md +0 -0
- /package/{ts → src}/testing/readme.md +0 -0
- /package/{ts → src}/tuple/tuple_plus.drop_match.ts +0 -0
- /package/{ts → src}/tuple/tuple_plus.ts +0 -0
- /package/{ts → src}/type/failed.ts +0 -0
- /package/{ts → src}/type/readme.md +0 -0
- /package/{ts → src}/type-guard/readme.md +0 -0
- /package/{ts → src}/union/union_to_intersection.ts +0 -0
- /package/{ts → src}/union_keys.ts +0 -0
- /package/{ts → src}/unpartial.ts +0 -0
- /package/{ts → src}/utils/Widen.ts +0 -0
- /package/{ts → src}/utils/as.ts +0 -0
- /package/{ts → src}/utils/inspect.ts +0 -0
package/README.md
DELETED
|
@@ -1,1356 +0,0 @@
|
|
|
1
|
-
# type-plus
|
|
2
|
-
|
|
3
|
-
[![NPM version][npm_image]][npm_url]
|
|
4
|
-
[![NPM downloads][downloads_image]][npm_url]
|
|
5
|
-
|
|
6
|
-
[![Release][github_release]][github_action_url]
|
|
7
|
-
[![Codecov][codecov_image]][codecov_url]
|
|
8
|
-
|
|
9
|
-
[![Visual Studio Code][vscode_image]][vscode_url]
|
|
10
|
-
|
|
11
|
-
More than 200 type utilities for [TypeScript] for applications, library, and type-level programming.
|
|
12
|
-
|
|
13
|
-
## Table of Contents
|
|
14
|
-
|
|
15
|
-
1. [What's in the package?](#whats-in-the-package)
|
|
16
|
-
1. [Update organization](#update-organization)
|
|
17
|
-
2. [Update documentation](#update-documentation)
|
|
18
|
-
2. [Assertion Function](#assertion-function)
|
|
19
|
-
1. [assertType](#asserttype)
|
|
20
|
-
3. [Type Guard](#type-guard)
|
|
21
|
-
4. [Type Utilities](#type-utilities)
|
|
22
|
-
5. [Type Specific Utilities](#type-specific-utilities)
|
|
23
|
-
1. [any](#any)
|
|
24
|
-
2. [Array](#array)
|
|
25
|
-
3. [union](#union)
|
|
26
|
-
4. [bigint](#bigint)
|
|
27
|
-
5. [boolean](#boolean)
|
|
28
|
-
6. [function](#function)
|
|
29
|
-
7. [never](#never)
|
|
30
|
-
8. [null](#null)
|
|
31
|
-
9. [number](#number)
|
|
32
|
-
10. [numeric](#numeric)
|
|
33
|
-
11. [object](#object)
|
|
34
|
-
12. [Promise](#promise)
|
|
35
|
-
13. [string](#string)
|
|
36
|
-
14. [symbol](#symbol)
|
|
37
|
-
15. [tuple](#tuple)
|
|
38
|
-
16. [undefined](#undefined)
|
|
39
|
-
17. [unknown](#unknown)
|
|
40
|
-
18. [void](#void)
|
|
41
|
-
6. [Constant Types](#constant-types)
|
|
42
|
-
7. [JSON Support](#json-support)
|
|
43
|
-
8. [Type manipulation](#type-manipulation)
|
|
44
|
-
9. [Type Predicates](#type-predicates)
|
|
45
|
-
1. [Logical](#logical)
|
|
46
|
-
10. [Math](#math)
|
|
47
|
-
11. [Utility Functions](#utility-functions)
|
|
48
|
-
12. [Nominal Types](#nominal-types)
|
|
49
|
-
13. [Functional Types](#functional-types)
|
|
50
|
-
14. [Attribution](#attribution)
|
|
51
|
-
15. [Useful Tips](#useful-tips)
|
|
52
|
-
16. [Similar projects](#similar-projects)
|
|
53
|
-
|
|
54
|
-
## Installation
|
|
55
|
-
|
|
56
|
-
```sh
|
|
57
|
-
npm install type-plus
|
|
58
|
-
|
|
59
|
-
yarn add type-plus
|
|
60
|
-
|
|
61
|
-
pnpm add type-plus
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## What's in the package?
|
|
65
|
-
|
|
66
|
-
With over 200 types in [type-plus],
|
|
67
|
-
it can become difficult to find the types you need.
|
|
68
|
-
|
|
69
|
-
Also, some of the types need to be updated as TypeScript continue to evolve.
|
|
70
|
-
|
|
71
|
-
Currently, we are updating [type-plus] with the following objective:
|
|
72
|
-
|
|
73
|
-
- Update organization
|
|
74
|
-
- Update documentation
|
|
75
|
-
- Clean up and deprecate types
|
|
76
|
-
- Upgrade TypeScript from 5.0.4 to 5.1 (potential breaking changes)
|
|
77
|
-
|
|
78
|
-
### Update organization
|
|
79
|
-
|
|
80
|
-
Top-level exports of [type-plus] will contain types and functions that do not expect the input to be a specific type. For example,
|
|
81
|
-
|
|
82
|
-
- `assertType()`, `isType()`, and `testType()`
|
|
83
|
-
- Type filters and predicates such as `AnyType` or `IsArray`
|
|
84
|
-
|
|
85
|
-
It can also have types and functions for specific types if it is a common convention,
|
|
86
|
-
or the is no ambiguity, or for backwards compatibility purpose.
|
|
87
|
-
|
|
88
|
-
Other type specific utilities will be added under their respective `*Plus` namespaces such as `ArrayPlus.At` or `NumberPlus.Positive`.
|
|
89
|
-
|
|
90
|
-
### Update documentation
|
|
91
|
-
|
|
92
|
-
Each type and utility function in [type-plus] will be updated to include examples and tags to indicate its category and behavior.
|
|
93
|
-
|
|
94
|
-
Each tag has an associated icon:
|
|
95
|
-
|
|
96
|
-
- 👽 *alias*: Alias of another type
|
|
97
|
-
- 🚦 *assertion*: assertion function
|
|
98
|
-
- 🔢 *customizable*: the behavior of the type is customizable.
|
|
99
|
-
- 💀 *deprecated*: deprecated and will be removed soon
|
|
100
|
-
- 🌪️ *filter*: a.k.a. *parse* These types perform some kind of test. If the input passes the test, the input is returned. Otherwise, it returns `never`
|
|
101
|
-
- 🛡️ *guard*: type guard function
|
|
102
|
-
- 💥 *immediate*: the effect of the type can be observed immediately during development
|
|
103
|
-
- ㊙️ *internal*: the type is internal and should not be used directly
|
|
104
|
-
- 🏃 *runtime*: the function has runtime effect
|
|
105
|
-
- 🩳 *shortcut*: Shortcut or convenient types
|
|
106
|
-
- 🧪 *testing*: the type or function are designed for test
|
|
107
|
-
- ⚗️ *transform*: these types transforms the input to another category
|
|
108
|
-
- 🦴 *utilities*: provide various functionalities
|
|
109
|
-
- 🎭 *validate*: a.k.a. *predicate* or *logical*. These types perform some kind of test. If the input passes the test, it returns `true` or `false`
|
|
110
|
-
|
|
111
|
-
## Assertion Function
|
|
112
|
-
|
|
113
|
-
[Assertion Functions][assertion_functions] are special functions that asserts certain conditions of your program.
|
|
114
|
-
|
|
115
|
-
It is introduced in TypeScript 3.7.
|
|
116
|
-
|
|
117
|
-
They throw an error if the condition is not met, and return nothing otherwise.
|
|
118
|
-
|
|
119
|
-
These assertion functions are typically used in runtime,
|
|
120
|
-
so that that type of the value can be narrowed down.
|
|
121
|
-
|
|
122
|
-
### assertType
|
|
123
|
-
|
|
124
|
-
[`assertType`](./ts/assertion/assert_type.ts) provides a generic assertion function,
|
|
125
|
-
as well as many assertion functions for builtin types.
|
|
126
|
-
|
|
127
|
-
> [`assertType<T>(subject)`](./ts/assertion/readme.md#asserttype)
|
|
128
|
-
|
|
129
|
-
💀 deprecated. Use `assertType.as()` instead.
|
|
130
|
-
|
|
131
|
-
`assertType<T>(subject, validator)`:
|
|
132
|
-
|
|
133
|
-
🚦`assertion`: assert the `subject` is type `T` with the specified `validator`.
|
|
134
|
-
|
|
135
|
-
If `subject` fails the assertion,
|
|
136
|
-
a standard `TypeError` will be thrown and provide better error info.
|
|
137
|
-
For example:
|
|
138
|
-
|
|
139
|
-
```ts
|
|
140
|
-
const s: unknown = 1
|
|
141
|
-
|
|
142
|
-
// TypeError: subject fails to satisfy s => typeof s === 'boolean'
|
|
143
|
-
assertType<boolean>(s, s => typeof s === 'boolean')
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
The message beautification is provided by [`tersify`](https://github.com/unional/tersify).
|
|
147
|
-
|
|
148
|
-
> [`assertType.isUndefined()`](./ts/assertion/readme.md#asserttype)
|
|
149
|
-
|
|
150
|
-
🚦`assertion`: assert the `subject` is `undefined`.
|
|
151
|
-
|
|
152
|
-
> [`assertType.noUndefined()`](./ts/assertion/readme.md#asserttype)
|
|
153
|
-
|
|
154
|
-
🚦`assertion`: assert the `subject` is not `undefined`.
|
|
155
|
-
|
|
156
|
-
> [`assertType.isNull()`](./ts/assertion/readme.md#asserttype)
|
|
157
|
-
|
|
158
|
-
🚦`assertion`: assert the `subject` is `null`.
|
|
159
|
-
|
|
160
|
-
> [`assertType.noNull()`](./ts/assertion/readme.md#asserttype)
|
|
161
|
-
|
|
162
|
-
🚦`assertion`: assert the `subject` is not `null`.
|
|
163
|
-
|
|
164
|
-
> [`assertType.isNumber()`](./ts/assertion/readme.md#asserttype)
|
|
165
|
-
|
|
166
|
-
🚦`assertion`: assert the `subject` is `number`.
|
|
167
|
-
|
|
168
|
-
> [`assertType.noNumber()`](./ts/assertion/readme.md#asserttype)
|
|
169
|
-
|
|
170
|
-
🚦`assertion`: assert the `subject` is not `number`.
|
|
171
|
-
|
|
172
|
-
> [`assertType.isBoolean()`](./ts/assertion/readme.md#asserttype)
|
|
173
|
-
|
|
174
|
-
🚦`assertion`: assert the `subject` is `boolean`.
|
|
175
|
-
|
|
176
|
-
> [`assertType.noBoolean()`](./ts/assertion/readme.md#asserttype)
|
|
177
|
-
|
|
178
|
-
🚦`assertion`: assert the `subject` is not `boolean`.
|
|
179
|
-
|
|
180
|
-
> [`assertType.isTrue()`](./ts/assertion/readme.md#asserttype)
|
|
181
|
-
|
|
182
|
-
🚦`assertion`: assert the `subject` is `true`.
|
|
183
|
-
|
|
184
|
-
> [`assertType.noTrue()`](./ts/assertion/readme.md#asserttype)
|
|
185
|
-
|
|
186
|
-
🚦`assertion`: assert the `subject` is not `true`.
|
|
187
|
-
|
|
188
|
-
> [`assertType.isFalse()`](./ts/assertion/readme.md#asserttype)
|
|
189
|
-
|
|
190
|
-
🚦`assertion`: assert the `subject` is `false`.
|
|
191
|
-
|
|
192
|
-
> [`assertType.noFalse()`](./ts/assertion/readme.md#asserttype)
|
|
193
|
-
|
|
194
|
-
🚦`assertion`: assert the `subject` is not `false`.
|
|
195
|
-
|
|
196
|
-
> [`assertType.isString()`](./ts/assertion/readme.md#asserttype)
|
|
197
|
-
|
|
198
|
-
🚦`assertion`: assert the `subject` is `string`.
|
|
199
|
-
|
|
200
|
-
> [`assertType.noString()`](./ts/assertion/readme.md#asserttype)
|
|
201
|
-
|
|
202
|
-
🚦`assertion`: assert the `subject` is not `string`.
|
|
203
|
-
|
|
204
|
-
> [`assertType.isFunction()`](./ts/assertion/readme.md#asserttype)
|
|
205
|
-
|
|
206
|
-
🚦`assertion`: assert the `subject` is `function`.
|
|
207
|
-
|
|
208
|
-
> [`assertType.noFunction()`](./ts/assertion/readme.md#asserttype)
|
|
209
|
-
|
|
210
|
-
🚦`assertion`: assert the `subject` is not `function`.
|
|
211
|
-
|
|
212
|
-
> [`assertType.isError()`](./ts/assertion/readme.md#asserttype)
|
|
213
|
-
|
|
214
|
-
🚦`assertion`: assert the `subject` is an `Error`.
|
|
215
|
-
|
|
216
|
-
> [`assertType.noError()`](./ts/assertion/readme.md#asserttype)
|
|
217
|
-
|
|
218
|
-
🚦`assertion`: assert the `subject` is not an `Error`.
|
|
219
|
-
|
|
220
|
-
> [`assertType.isConstructor()`](./ts/assertion/readme.md#asserttype)
|
|
221
|
-
|
|
222
|
-
💀 deprecated. It does not work in all cases.
|
|
223
|
-
|
|
224
|
-
It passes for function that can be called with `new`.
|
|
225
|
-
If the subject is an arrow function, it can still return true after compilation.
|
|
226
|
-
|
|
227
|
-
> [`assertType.isNever()`](./ts/assertion/readme.md#asserttype)
|
|
228
|
-
|
|
229
|
-
🚦`assertion`: assert the `subject` is `never`.
|
|
230
|
-
|
|
231
|
-
> [`assertType.custom()`](./ts/assertion/readme.md#asserttype)
|
|
232
|
-
|
|
233
|
-
🚦`assertion`: creates a custom assertion function.
|
|
234
|
-
|
|
235
|
-
Using it to create a custom assertion function that provides better error messages.
|
|
236
|
-
|
|
237
|
-
The message beautification is provided by [`tersify`](https://github.com/unional/tersify).
|
|
238
|
-
|
|
239
|
-
> [`assertType.as<T>()`](./ts/assertion/readme.md#asserttype)
|
|
240
|
-
|
|
241
|
-
🚦`assertion`: assert the `subject` as `T` without validator.
|
|
242
|
-
|
|
243
|
-
This works similar to manual assertion `;(subject as T)`
|
|
244
|
-
|
|
245
|
-
## Type Guard
|
|
246
|
-
|
|
247
|
-
[User-defined type guard functions][type_guard] is a function which its return type is specified as `x is T`.
|
|
248
|
-
|
|
249
|
-
> [`isType()`](./ts/type-guard/readme.md#istype)
|
|
250
|
-
|
|
251
|
-
🛡️ `guard`: a generic type guard function
|
|
252
|
-
|
|
253
|
-
> [`isType.t()`](./ts/type-guard/readme.md#istype)
|
|
254
|
-
|
|
255
|
-
💀 `deprecated`: use `testType.true()` instead.
|
|
256
|
-
|
|
257
|
-
> [`isType.f()`](./ts/type-guard/readme.md#istype)
|
|
258
|
-
|
|
259
|
-
💀 `deprecated`: use `testType.false()` instead.
|
|
260
|
-
|
|
261
|
-
> [`isType.never()`](./ts/type-guard/readme.md#istype)
|
|
262
|
-
|
|
263
|
-
💀 `deprecated`: use `testType.never()` instead.
|
|
264
|
-
|
|
265
|
-
> [`isType.equal()`](./ts/type-guard/readme.md#istype)
|
|
266
|
-
|
|
267
|
-
💀 `deprecated`: use `testType.equal()` instead.
|
|
268
|
-
|
|
269
|
-
## Type Utilities
|
|
270
|
-
|
|
271
|
-
> `Equal<A, B, Then = true, Else = false>`
|
|
272
|
-
|
|
273
|
-
💀 deprecated. use `IsEqual` instead. This will be converted to a ↪️ `parse`.
|
|
274
|
-
|
|
275
|
-
> `IsEqual<A, B, Then = true, Else = false>`
|
|
276
|
-
|
|
277
|
-
⭕ `predicate`: if `A` and `B` are the same.
|
|
278
|
-
|
|
279
|
-
> `NotEqual<A, B, Then = true, Else = false>`
|
|
280
|
-
|
|
281
|
-
💀 deprecated. use `IsNotEqual` instead. This will be converted to a ↪️ `parse`.
|
|
282
|
-
|
|
283
|
-
> `IsNotEqual<A, B, Then = true, Else = false>`:
|
|
284
|
-
|
|
285
|
-
⭕ `predicate`: check if `A` and `B` are not the same.
|
|
286
|
-
|
|
287
|
-
> `Extendable<A, B, Then = A, Else = never>`
|
|
288
|
-
|
|
289
|
-
↪️ `parse`: check if `A` extends `B`.
|
|
290
|
-
|
|
291
|
-
> `IsExtend<A, B, Then = true, Else = false>`
|
|
292
|
-
|
|
293
|
-
⭕ `predicate`: check if `A` extends `B`.
|
|
294
|
-
|
|
295
|
-
> `NotExtendable<A, B, Then = A, Else = never>`:
|
|
296
|
-
|
|
297
|
-
↪️ `parse`: check if `A` not extends `B`.
|
|
298
|
-
|
|
299
|
-
> `IsNotExtend<A, B, Then = true, Else = false>`:
|
|
300
|
-
|
|
301
|
-
⭕ `predicate`: check if `A` not extends `B`.
|
|
302
|
-
|
|
303
|
-
> `IsAssign<A, B, Then = true, Else = false>`
|
|
304
|
-
|
|
305
|
-
💀 `deprecated`: use `CanAssign` instead.
|
|
306
|
-
|
|
307
|
-
> `CanAssign<A, B, Then = true, Else = false>`:
|
|
308
|
-
|
|
309
|
-
⭕ `predicate`: check can `A` assign to `B`.
|
|
310
|
-
|
|
311
|
-
A typical usage is using it with `assertType`:
|
|
312
|
-
|
|
313
|
-
```ts
|
|
314
|
-
assertType.isFalse(false as CanAssign<boolean, { a: string }>)
|
|
315
|
-
assertType.isTrue(true as CanAssign<{ a:string, b:number }, { a: string }>)
|
|
316
|
-
```
|
|
317
|
-
|
|
318
|
-
> `StrictCanAssign<A, B, Then = true, Else = false>`
|
|
319
|
-
|
|
320
|
-
⭕ `predicate`: can `A` strictly assign to `B`
|
|
321
|
-
|
|
322
|
-
When `A` is a union, all branches must be assignable to `B`.
|
|
323
|
-
|
|
324
|
-
```ts
|
|
325
|
-
StrictCanAssign<number | string, number> // false
|
|
326
|
-
StrictCanAssign<number | string, number | string> // true
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
> `canAssign<T>(): (subject) => true`
|
|
330
|
-
|
|
331
|
-
⭕💻 `predicate`, `compile-time`
|
|
332
|
-
|
|
333
|
-
Returns a compile-time validating function to ensure `subject` is assignable to `T`.
|
|
334
|
-
|
|
335
|
-
```ts
|
|
336
|
-
const isConfig = canAssign<{ a: string }>()
|
|
337
|
-
assertType.isTrue(isConfig({ a: 'a' }))
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
> `canAssign<T>(false): (subject) => false`:
|
|
341
|
-
|
|
342
|
-
⭕💻 `predicate`, `compile-time`
|
|
343
|
-
|
|
344
|
-
Returns a compile-time validating function to ensure `subject` is not assignable to `T`.
|
|
345
|
-
|
|
346
|
-
```ts
|
|
347
|
-
const notA = canAssign<{ a: string }>(false)
|
|
348
|
-
assertType.isTrue(notA({ a: 1 }))
|
|
349
|
-
|
|
350
|
-
notA({ a: '' }) // TypeScript complains
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
## Type Specific Utilities
|
|
354
|
-
|
|
355
|
-
[type-plus](./README.md) privides type checking utilities for every type.
|
|
356
|
-
|
|
357
|
-
Each type has at least 4 type checks.
|
|
358
|
-
Using `string` as an example, there are `StringType<T>`, `IsString<T>`, `NotStringType<T>`, and `IsNotString<T>`.
|
|
359
|
-
|
|
360
|
-
Some types will have more checks, such as `boolean` has `StrictBooleanType<T>`, `TrueType<T>`, `FalseType<T>`.
|
|
361
|
-
|
|
362
|
-
You can learn more in their respective sections:
|
|
363
|
-
|
|
364
|
-
- [any](./ts/any/readme.md)
|
|
365
|
-
- [array](./ts/array/readme.md)
|
|
366
|
-
- [bigint](./ts/bigint/readme.md)
|
|
367
|
-
- [boolean](./ts/boolean/readme.md)
|
|
368
|
-
- [function](./ts/function/readme.md)
|
|
369
|
-
- [never](./ts/never/readme.md)
|
|
370
|
-
- [null](./ts/null/readme.md)
|
|
371
|
-
- [number](./ts/number/readme.md)
|
|
372
|
-
- [object](./ts/object/readme.md)
|
|
373
|
-
- [string](./ts/string/readme.md)
|
|
374
|
-
- [symbol](./ts/symbol/readme.md)
|
|
375
|
-
- [tuple](./ts/tuple/readme.md)
|
|
376
|
-
- [undefined](./ts/undefined/readme.md)
|
|
377
|
-
- [unknown](./ts/unknown/readme.md)
|
|
378
|
-
- [void](./ts/void/readme.md)
|
|
379
|
-
- [mix types](./ts/mix-types/readme.md)
|
|
380
|
-
|
|
381
|
-
### [any](./ts/any/readme.md)
|
|
382
|
-
|
|
383
|
-
- [`AnyType`](./ts/any/readme.md#anytype)
|
|
384
|
-
- [`IsAny`](./ts/any/readme.md#isany)
|
|
385
|
-
- [`NotAnyType`](./ts/any/readme.md#notanytype)
|
|
386
|
-
- [`IsNotAny`](./ts/any/readme.md#isnotany)
|
|
387
|
-
- [`AnyOrNeverType`](./ts/mix_types/readme.md#anyornevertype)
|
|
388
|
-
- [`IsAnyOrNever`](./ts/mix_types/readme.md#isanyornever)
|
|
389
|
-
|
|
390
|
-
### [Array](./ts/array/readme.md)
|
|
391
|
-
|
|
392
|
-
- 🌪️[`ArrayType`](./ts/array/readme.md#arraytype): Filter `T` to ensure it is an array, excluding tuple.
|
|
393
|
-
- 🎭[`IsArray`](./ts/array/readme.md#isarray): Validate that `T` is an array, excluding tuple.
|
|
394
|
-
- 🌪️[`NotArrayType`](./ts/array/readme.md#notarraytype): Filter `T` to ensure it is not an array, excluding tuple.
|
|
395
|
-
- 🎭[`IsNotArrayType`](./ts/array/readme.md#isnotarraytype): Validate that `T` is not an array, excluding tuple.
|
|
396
|
-
- 🦴[`At`](./ts/array/readme.md#at): Gets the type of the array or tuple at positive or negative index `N`.
|
|
397
|
-
- 🦴💀[`Concat`](./ts/array/readme.md#concat): Concats two arrays or tuples.
|
|
398
|
-
- 🦴🔢[`FindFirst`](./ts/array/readme.md#findfirst): Find the first type in the array or tuple `A` that matches `Criteria`.
|
|
399
|
-
- [`FindLast`](./ts/array/readme.md#findlast)
|
|
400
|
-
- [`Some`](./ts/array/readme.md#some)
|
|
401
|
-
- ⚗️[`Filter`](./ts/array/readme.md#filter): Filter the array or tuple `A`, keeping entries satisfying `Criteria`.
|
|
402
|
-
- ⚗️👽[`KeepMatch`](./ts/array/readme.md#keepmatch): Keeps entries satisfying `Criteria` in array or tuple `A`.
|
|
403
|
-
- 🦴🔢[`Head`](./ts/array/readme.md#head): Gets the first entry in the tuple or the type of array `T`.
|
|
404
|
-
- [`IntersectOfProps`](./ts/array/readme.md#intersectofprops)
|
|
405
|
-
- [`MapToProp`](./ts/array/readme.md#maptoprop)
|
|
406
|
-
- 🦴🔢[`Last`](./ts/array/readme.md#last): Gets the last entry in the tuple or the type of array `T`.
|
|
407
|
-
- [`literalArray`](./ts/array/readme.md#literalarray)
|
|
408
|
-
- [`PadStart`](./ts/array/readme.md#padstart)
|
|
409
|
-
- [`reduceWhile`](./ts/array/readme.md#reducewhile)
|
|
410
|
-
- [`Reverse`](./ts/array/readme.md#reverse)
|
|
411
|
-
- [`PropUnion`](./ts/array/readme.md#propunion)
|
|
412
|
-
- [`UnionOfProps`](./ts/array/readme.md#unionofprops)
|
|
413
|
-
- [`UnionOfValues`](./ts/array/readme.md#unionofvalues)
|
|
414
|
-
- [`ArrayPlus.At`](./ts/array/readme.md#arrayplusat)
|
|
415
|
-
- [`ArrayPlus.Concat`](./ts/array/readme.md#arrayplusconcat)
|
|
416
|
-
- [`ArrayPlus.Entries`](./ts/array/readme.md#arrayplusentries)
|
|
417
|
-
- 🦴🔢[`ArrayPlus.Find`](./ts/array/readme.md#arrayplusfind): Finds the type in array `A` that matches `Criteria`.
|
|
418
|
-
- [`ArrayPlus.FindLast`](./ts/array/readme.md#arrayplusfindlast)
|
|
419
|
-
- [`ArrayPlus.Reverse`](./ts/array/readme.md#arrayplusreverse)
|
|
420
|
-
- [`ArrayPlus.SplitAt`](./ts/array/readme.md#arrayplussplitat)
|
|
421
|
-
- [`ArrayPlus.Some`](./ts/array/readme.md#arrayplussome)
|
|
422
|
-
|
|
423
|
-
### [union](./ts/union/readme.md)
|
|
424
|
-
|
|
425
|
-
- [`IsUnion`](./ts/union//readme.md#isunion)
|
|
426
|
-
- [`UnionType`](./ts/union/readme.md#uniontype)
|
|
427
|
-
|
|
428
|
-
### bigint
|
|
429
|
-
|
|
430
|
-
> [`BigintType<T, Then = T, Else = never>`](./ts/bigint/bigint_type.ts#L15)
|
|
431
|
-
|
|
432
|
-
↪️ `parse`: if `T` is `bigint` or bigint literal.
|
|
433
|
-
|
|
434
|
-
> [`IsBigint<T, Then = true, Else = false>`](./ts/bigint/bigint_type.ts#L33)
|
|
435
|
-
|
|
436
|
-
⭕ `predicate`: if `T` is `bigint` or bigint literal.
|
|
437
|
-
|
|
438
|
-
> [`NotBigintType<T, Then = T, Else = never>`](./ts/bigint/bigint_type.ts#L47)
|
|
439
|
-
|
|
440
|
-
↪️ `parse`: if `T` is not `bigint` or bigint literal.
|
|
441
|
-
|
|
442
|
-
> [`IsNotBigInt<T, Then = true, Else = false>`](./ts/bigint/bigint_type.ts#L61)
|
|
443
|
-
|
|
444
|
-
⭕ `predicate`: if `T` is not `bigint` or bigint literal.
|
|
445
|
-
|
|
446
|
-
> [`StrictBigintType<T, Then = T, Else = never>`](./ts/bigint/strict_bigint_type.ts#L15)
|
|
447
|
-
|
|
448
|
-
↪️ `parse`: if `T` is exactly `bigint`.
|
|
449
|
-
|
|
450
|
-
> [`IsStrictBigint<T, Then = true, Else = false>`](./ts/bigint/strict_bigint_type.ts#L33)
|
|
451
|
-
|
|
452
|
-
⭕ `predicate`: if `T` is exactly `bigint`.
|
|
453
|
-
|
|
454
|
-
> [`NotStrictBigintType<T, Then = T, Else = never>`](./ts/bigint/strict_bigint_type.ts#L47)
|
|
455
|
-
|
|
456
|
-
↪️ `parse`: if `T` is not exactly `bigint`.
|
|
457
|
-
|
|
458
|
-
> [`IsNotStrictBigint<T, Then = true, Else = false>`](./ts/bigint/strict_bigint_type.ts#L61)
|
|
459
|
-
|
|
460
|
-
⭕ `predicate`: if `T` is not exactly `bigint`.
|
|
461
|
-
|
|
462
|
-
### boolean
|
|
463
|
-
|
|
464
|
-
> [`BooleanType<T>`](./ts/boolean/readme.md#type-checking)
|
|
465
|
-
|
|
466
|
-
↪️ `parse`: `T === boolean`.
|
|
467
|
-
|
|
468
|
-
> [`IsBoolean<T>`](./ts/boolean/readme.md#type-checking)
|
|
469
|
-
|
|
470
|
-
⭕ `predicate`: `T === boolean`
|
|
471
|
-
|
|
472
|
-
> [`NotBooleanType<T>`](./ts/boolean/readme.md#type-checking)
|
|
473
|
-
|
|
474
|
-
↪️ `parse`: `T !== boolean`.
|
|
475
|
-
|
|
476
|
-
> [`IsNotBoolean<T>`](./ts/boolean/readme.md#type-checking)
|
|
477
|
-
|
|
478
|
-
⭕ `predicate`: `T !== boolean`
|
|
479
|
-
|
|
480
|
-
### function
|
|
481
|
-
|
|
482
|
-
> [`FunctionType<T>`](./ts/function/readme.md#type-checking)
|
|
483
|
-
|
|
484
|
-
↪️ `parse`: `T === function`.
|
|
485
|
-
|
|
486
|
-
> [`IsFunction<T>`](./ts/function/readme.md#type-checking)
|
|
487
|
-
|
|
488
|
-
⭕ `predicate`: `T === function`
|
|
489
|
-
|
|
490
|
-
> [`NotFunctionType<T>`](./ts/function/readme.md#type-checking)
|
|
491
|
-
|
|
492
|
-
↪️ `parse`: `T !== function`.
|
|
493
|
-
|
|
494
|
-
> [`IsNotFunction<T>`](./ts/function/readme.md#type-checking)
|
|
495
|
-
|
|
496
|
-
⭕ `predicate`: `T !== function`
|
|
497
|
-
|
|
498
|
-
> `AnyFunction<P, R>`
|
|
499
|
-
|
|
500
|
-
🔨 `utilities`: a generic type for any function
|
|
501
|
-
|
|
502
|
-
> `ExtractFunction<F>`
|
|
503
|
-
|
|
504
|
-
🔨 `utilities`: extract the function signature from a type `F`.
|
|
505
|
-
|
|
506
|
-
> `extractFunction(fn: F)`
|
|
507
|
-
|
|
508
|
-
🔨 `utilities`: adjust type of `fn` to its function signature only.
|
|
509
|
-
|
|
510
|
-
> `inspect<T>(value: T, inspector?: (v: T) => void)`
|
|
511
|
-
|
|
512
|
-
🔨 `utilities`: inspect a value and return it. Inspector defaults to `console.dir()`
|
|
513
|
-
|
|
514
|
-
### never
|
|
515
|
-
|
|
516
|
-
> [`NeverType<T>`](./ts/never/readme.md#type-checking)
|
|
517
|
-
|
|
518
|
-
↪️ `parse`: `T === never`.
|
|
519
|
-
|
|
520
|
-
> [`IsNever<T>`](./ts/never/readme.md#type-checking)
|
|
521
|
-
|
|
522
|
-
⭕ `predicate`: `T === never`
|
|
523
|
-
|
|
524
|
-
> [`NotNeverType<T>`](./ts/never/readme.md#type-checking)
|
|
525
|
-
|
|
526
|
-
↪️ `parse`: `T !== never`.
|
|
527
|
-
|
|
528
|
-
> [`IsNotNever<T>`](./ts/never/readme.md#type-checking)
|
|
529
|
-
|
|
530
|
-
⭕ `predicate`: `T !== never`
|
|
531
|
-
|
|
532
|
-
### null
|
|
533
|
-
|
|
534
|
-
> [`NullType<T>`](./ts/null/readme.md#type-checking)
|
|
535
|
-
|
|
536
|
-
↪️ `parse`: `T === null`.
|
|
537
|
-
|
|
538
|
-
> [`IsNull<T>`](./ts/null/readme.md#type-checking)
|
|
539
|
-
|
|
540
|
-
⭕ `predicate`: `T === null`
|
|
541
|
-
|
|
542
|
-
> [`NotNullType<T>`](./ts/null/readme.md#type-checking)
|
|
543
|
-
|
|
544
|
-
↪️ `parse`: `T !== null`.
|
|
545
|
-
|
|
546
|
-
> [`IsNotNull<T>`](./ts/null/readme.md#type-checking)
|
|
547
|
-
|
|
548
|
-
⭕ `predicate`: `T !== null`
|
|
549
|
-
|
|
550
|
-
### number
|
|
551
|
-
|
|
552
|
-
> [`NumberType<T, Then = N, Else = never>`](./ts/number/number_type.ts#L14)
|
|
553
|
-
|
|
554
|
-
↪️ `parse`: is the type `T` `number`.
|
|
555
|
-
|
|
556
|
-
> [`IsNumber<T, Then = true, Else = false>`](./ts/number/number_type.ts#L27)
|
|
557
|
-
|
|
558
|
-
⭕ `predicate`: is the type `T` `number`.
|
|
559
|
-
|
|
560
|
-
> [`NotNumberType<T, Then = T, Else = never>`](./ts/number/number_type.ts#L40)
|
|
561
|
-
|
|
562
|
-
↪️ `parse`: is the type `T` not `number`.
|
|
563
|
-
|
|
564
|
-
> [`IsNotNumber<T, Then = true, Else = false>`](./ts/number/number_type.ts#L53)
|
|
565
|
-
|
|
566
|
-
⭕ `predicate`: is the type `T` not `number`.
|
|
567
|
-
|
|
568
|
-
> [`StrictNumberType<T, Then = N, Else = never>`](./ts/number/strict_number_type.ts#L19)
|
|
569
|
-
|
|
570
|
-
↪️ `parse`: is the type `T` exactly `number`.
|
|
571
|
-
|
|
572
|
-
> [`IsStrictNumber<T, Then = true, Else = false>`](./ts/number/strict_number_type.ts#L41)
|
|
573
|
-
|
|
574
|
-
⭕ `predicate`: is the type `T` exactly `number`.
|
|
575
|
-
|
|
576
|
-
> [`NotStrictNumberType<T, Then = T, Else = never>`](./ts/number/strict_number_type.ts#L55)
|
|
577
|
-
|
|
578
|
-
↪️ `parse`: is the type `T` not exactly `number`.
|
|
579
|
-
|
|
580
|
-
> [`IsNotStrictNumber<T, Then = true, Else = false>`](./ts/number/strict_number_type.ts#L69)
|
|
581
|
-
|
|
582
|
-
⭕ `predicate`: is the type `T` not exactly `number`.
|
|
583
|
-
|
|
584
|
-
### numeric
|
|
585
|
-
|
|
586
|
-
> [`Numeric`](./ts/numeric/numeric_type.ts#L4)
|
|
587
|
-
|
|
588
|
-
📘 `definition`: `number | bigint`.
|
|
589
|
-
|
|
590
|
-
> [`Zero`](ts/numeric_plus/numeric_type.ts#L9)
|
|
591
|
-
|
|
592
|
-
📘 `definition`: `0 | 0n`
|
|
593
|
-
|
|
594
|
-
> [`Integer<N, Then = N, Else = never>`](./ts/numeric/integer.ts#L15)
|
|
595
|
-
|
|
596
|
-
↪️ `parse`: is integer.
|
|
597
|
-
|
|
598
|
-
> [`IsInteger<N, Then = true, Else = false>`](./ts/numeric/integer.ts#L32)
|
|
599
|
-
|
|
600
|
-
⭕ `predicate`: is integer.
|
|
601
|
-
|
|
602
|
-
> [`NotInteger<N, Then = N, Else = never>`](./ts/numeric/integer.ts#L45)
|
|
603
|
-
|
|
604
|
-
↪️ `parse`: is not integer.
|
|
605
|
-
|
|
606
|
-
> [`IsNotInteger<N, Then = true, Else = false>`](./ts/numeric/integer.ts#L60)
|
|
607
|
-
|
|
608
|
-
⭕ `predicate`: is not integer.
|
|
609
|
-
|
|
610
|
-
> [`IsWhole<N, Then = true, Else = false>`](./ts/numeric/integer.ts#L75)
|
|
611
|
-
|
|
612
|
-
💀⭕ `deprecated`, `predicate`: is integer. Use `IsInteger` instead.
|
|
613
|
-
|
|
614
|
-
> [`Negative<N, Then = N, Else = never>`](./ts/numeric/negative.ts#L19)
|
|
615
|
-
|
|
616
|
-
↪️ `parse`: is negative.
|
|
617
|
-
|
|
618
|
-
> [`IsNegative<N, Then = true, Else = false>`](./ts/numeric/negative.ts#L53)
|
|
619
|
-
|
|
620
|
-
⭕ `predicate`: is negative.
|
|
621
|
-
|
|
622
|
-
> [`NonNegative<N, Then = N, Else = never>`](./ts/numeric/negative.ts#L69)
|
|
623
|
-
|
|
624
|
-
↪️ `parse`: is not negative.
|
|
625
|
-
|
|
626
|
-
> [`IsNonNegative<N, Then = N, Else = never>`](./ts/numeric/negative.ts#L101)
|
|
627
|
-
|
|
628
|
-
⭕ `predicate`: is not negative.
|
|
629
|
-
|
|
630
|
-
> [`Positive<N, Then = N, Else = never>`](./ts/numeric/positive.ts#15)
|
|
631
|
-
|
|
632
|
-
↪️ `parse`: is positive.
|
|
633
|
-
|
|
634
|
-
> [`IsPositive<N, Then = true, Else = false>`](./ts/numeric/positive.ts#L36)
|
|
635
|
-
|
|
636
|
-
⭕ `predicate`: is positive.
|
|
637
|
-
|
|
638
|
-
> [`NotPositive<N, Then = N, Else = never>`](./ts/numeric/positive.ts#48)
|
|
639
|
-
|
|
640
|
-
↪️ `parse`: is not positive.
|
|
641
|
-
|
|
642
|
-
> [`IsNotPositive<N, Then = true, Else = false>`](./ts/numeric/positive.ts#L60)
|
|
643
|
-
|
|
644
|
-
⭕ `predicate`: is not positive.
|
|
645
|
-
|
|
646
|
-
### object
|
|
647
|
-
|
|
648
|
-
> `filterKey()`
|
|
649
|
-
|
|
650
|
-
🔨 `utilities`: type adjusted filter by key.
|
|
651
|
-
|
|
652
|
-
> `findKey()`
|
|
653
|
-
|
|
654
|
-
🔨 `utilities`: type adjusted find by key.
|
|
655
|
-
|
|
656
|
-
> `forEachKey()`
|
|
657
|
-
|
|
658
|
-
🔨 `utilities`: type adjusted for each by key.
|
|
659
|
-
|
|
660
|
-
> `HasKey<T, K>`
|
|
661
|
-
|
|
662
|
-
🔨 `utilities`: predicate type checking `T` has key `K`.
|
|
663
|
-
|
|
664
|
-
> `hasKey()`
|
|
665
|
-
|
|
666
|
-
🔨 `utilities`: function of `HasKey`.
|
|
667
|
-
|
|
668
|
-
> `IsRecord<T>`
|
|
669
|
-
|
|
670
|
-
🔨 `utilities`: `logical` predicate for `Record`.
|
|
671
|
-
|
|
672
|
-
> `KeysWithDiffTypes<A, B>`
|
|
673
|
-
|
|
674
|
-
🔨 `utilities`: gets the keys common in `A` and `B` but with different value type.
|
|
675
|
-
|
|
676
|
-
> `mapKey()`
|
|
677
|
-
|
|
678
|
-
🔨 `utilities`: type adjusted map by key.
|
|
679
|
-
|
|
680
|
-
> `RecordValue<R>`
|
|
681
|
-
|
|
682
|
-
🔨 `utilities`: gets the value type `T`from `Record<any, T>`
|
|
683
|
-
|
|
684
|
-
[video](https://www.youtube.com/watch?v=1J7xK6FUqPw).
|
|
685
|
-
|
|
686
|
-
> `reduceByKey()`
|
|
687
|
-
|
|
688
|
-
🔨 `utilities`: type adjusted reduce by key.
|
|
689
|
-
|
|
690
|
-
> `someKey()`
|
|
691
|
-
|
|
692
|
-
🔨 `utilities`: type adjusted some by key.
|
|
693
|
-
|
|
694
|
-
> `SpreadRecord<A, B>`
|
|
695
|
-
|
|
696
|
-
🔨 `utilities`: type for `{...a, ...b}` when both `a` and `b` are `Record`\
|
|
697
|
-
for array, just do `[...A, ...B]`.
|
|
698
|
-
|
|
699
|
-
### Promise
|
|
700
|
-
|
|
701
|
-
> `AwaitedProp<T, V>`
|
|
702
|
-
|
|
703
|
-
🔨 `utilities`: `Awaited` on specified props `P` in `T`.
|
|
704
|
-
|
|
705
|
-
> `isPromise<R>(subject: any)`
|
|
706
|
-
|
|
707
|
-
🔨 `utilities`: `isPromise()` type guard.
|
|
708
|
-
|
|
709
|
-
> `MaybePromise<T>`
|
|
710
|
-
|
|
711
|
-
🔨 `utilities`: Alias of `T | Promise<T>`.
|
|
712
|
-
|
|
713
|
-
> `PromiseValue<P>`
|
|
714
|
-
|
|
715
|
-
🔨 `utilities`: Gets the type within the Promise.
|
|
716
|
-
|
|
717
|
-
> `PromiseValueMerge<P1, P2, ...P9>`
|
|
718
|
-
|
|
719
|
-
🔨 `utilities`: Merge the values of multiple promises.
|
|
720
|
-
|
|
721
|
-
> `mapSeries()`
|
|
722
|
-
|
|
723
|
-
🔨 `utilities`: Similar to `bluebird.mapSeries()` but works with `async`/`await`.
|
|
724
|
-
|
|
725
|
-
> `transformMaybePromise(value, transformer)`
|
|
726
|
-
|
|
727
|
-
🔨 `utilities`: Apply the `transformer` to the `value`.\
|
|
728
|
-
It is also exported under `MaybePromise.transform()`.
|
|
729
|
-
|
|
730
|
-
### string
|
|
731
|
-
|
|
732
|
-
> [`StringType<T>`](ts/string/readme.md#type-checking)
|
|
733
|
-
|
|
734
|
-
↪️ `parse`: is `string`.
|
|
735
|
-
|
|
736
|
-
> [`IsString<T>`](ts/string/readme.md#type-checking)
|
|
737
|
-
|
|
738
|
-
⭕ `predicate`: is `string`.
|
|
739
|
-
|
|
740
|
-
> [`NotStringType<T>`](ts/string/readme.md#type-checking)
|
|
741
|
-
|
|
742
|
-
↪️ `parse`: is not `string`.
|
|
743
|
-
|
|
744
|
-
> [`IsNotString<T>`](ts/string/readme.md#type-checking)
|
|
745
|
-
|
|
746
|
-
⭕ `predicate`: is not `string`.
|
|
747
|
-
|
|
748
|
-
### symbol
|
|
749
|
-
|
|
750
|
-
> [`SymbolType<T>`](ts/symbol/readme.md#type-checking)
|
|
751
|
-
|
|
752
|
-
↪️ `parse`: is `symbol`.
|
|
753
|
-
|
|
754
|
-
> [`IsSymbol<T>`](ts/symbol/readme.md#type-checking)
|
|
755
|
-
|
|
756
|
-
⭕ `predicate`: is `symbol`.
|
|
757
|
-
|
|
758
|
-
> [`NotSymbolType<T>`](ts/symbol/readme.md#type-checking)
|
|
759
|
-
|
|
760
|
-
↪️ `parse`: is not `symbol`.
|
|
761
|
-
|
|
762
|
-
> [`IsNotSymbol<T>`](ts/symbol/readme.md#type-checking)
|
|
763
|
-
|
|
764
|
-
⭕ `predicate`: is not `symbol`.
|
|
765
|
-
|
|
766
|
-
### tuple
|
|
767
|
-
|
|
768
|
-
- 🌪️ [`TupleType`](./ts/tuple/readme.md#tupletype): Filter `T` to ensure it is a tuple, excluding array.
|
|
769
|
-
- 🎭 [`IsTuple`](./ts/tuple/readme.md#istuple): Validate that `T` is a tuple, excluding array.
|
|
770
|
-
- 🌪️ [`NotTupleType`](./ts/tuple/readme.md#nottupletype): Filter `T` to ensure it is not an tuple, excluding array.
|
|
771
|
-
- 🎭 [`IsNotTuple`](./ts/tuple/readme.md#isnottupletype): Validate that `T` is not an tuple, excluding array.
|
|
772
|
-
- ⚗️🔢[`CommonPropKeys`](./ts/tuple/readme.md#commonpropkeys): Gets the common property keys of the elements in tuple `T`.
|
|
773
|
-
- ⚗️💀`CommonKeys`: Deprecated. Please use `CommonPropKeys` instead.
|
|
774
|
-
- ⚗️🔢[`DropFirst`](./ts/tuple/readme.md#dropfirst): Drops the first entry in the tuple`T`.
|
|
775
|
-
- ⚗️🔢[`DropLast`](./ts/tuple/readme.md#droplast): Drops the last entry in the tuple`T`.
|
|
776
|
-
|
|
777
|
-
> `CreateTuple<L, T>`
|
|
778
|
-
|
|
779
|
-
🔨 `utilities`: creates `tuple<T>` with `L` number of elements.
|
|
780
|
-
|
|
781
|
-
> `drop(array, value)`
|
|
782
|
-
|
|
783
|
-
🔨 `utilities`: drop a particular value from an array.
|
|
784
|
-
|
|
785
|
-
> `DropMatch<A, Criteria>`
|
|
786
|
-
|
|
787
|
-
🔨 `utilities`: drops entries matching `Criteria` in array or tuple `A`.
|
|
788
|
-
|
|
789
|
-
> `DropUndefined<A>`
|
|
790
|
-
|
|
791
|
-
🔨 `utilities`: drop undefined entries from array of tuple `A`.
|
|
792
|
-
|
|
793
|
-
### undefined
|
|
794
|
-
|
|
795
|
-
> [`UndefinedType<T>`](./ts/undefined/readme.md#type-checking)
|
|
796
|
-
|
|
797
|
-
↪️ `parse`: `T === undefined`.
|
|
798
|
-
|
|
799
|
-
> [`IsUndefined<T>`](./ts/undefined/readme.md#type-checking)
|
|
800
|
-
|
|
801
|
-
⭕ `predicate`: `T === undefined`
|
|
802
|
-
|
|
803
|
-
> [`NotUndefinedType<T>`](./ts/undefined/readme.md#type-checking)
|
|
804
|
-
|
|
805
|
-
↪️ `parse`: `T !== undefined`.
|
|
806
|
-
|
|
807
|
-
> [`IsNotUndefined<T>`](./ts/undefined/readme.md#type-checking)
|
|
808
|
-
|
|
809
|
-
⭕ `predicate`: `T !== undefined`
|
|
810
|
-
|
|
811
|
-
### unknown
|
|
812
|
-
|
|
813
|
-
> [`UnknownType<T>`](./ts/unknown/readme.md#type-checking)
|
|
814
|
-
|
|
815
|
-
↪️ `parse`: `T === unknown`.
|
|
816
|
-
|
|
817
|
-
> [`IsUnknown<T>`](./ts/unknown/readme.md#type-checking)
|
|
818
|
-
|
|
819
|
-
⭕ `predicate`: `T === unknown`
|
|
820
|
-
|
|
821
|
-
> [`NotUnknownType<T>`](./ts/unknown/readme.md#type-checking)
|
|
822
|
-
|
|
823
|
-
↪️ `parse`: `T !== unknown`.
|
|
824
|
-
|
|
825
|
-
> [`IsNotUnknown<T>`](./ts/unknown/readme.md#type-checking)
|
|
826
|
-
|
|
827
|
-
⭕ `predicate`: `T !== unknown`
|
|
828
|
-
|
|
829
|
-
### void
|
|
830
|
-
|
|
831
|
-
> [`VoidType<T>`](./ts/void/readme.md#type-checking)
|
|
832
|
-
|
|
833
|
-
↪️ `parse`: `T === void`.
|
|
834
|
-
|
|
835
|
-
> [`IsVoid<T>`](./ts/void/readme.md#type-checking)
|
|
836
|
-
|
|
837
|
-
⭕ `predicate`: `T === void`
|
|
838
|
-
|
|
839
|
-
> [`NotVoidType<T>`](./ts/void/readme.md#type-checking)
|
|
840
|
-
|
|
841
|
-
↪️ `parse`: `T !== void`.
|
|
842
|
-
|
|
843
|
-
> [`IsNotVoid<T>`](./ts/void/readme.md#type-checking)
|
|
844
|
-
|
|
845
|
-
⭕ `predicate`: `T !== void`
|
|
846
|
-
|
|
847
|
-
## Constant Types
|
|
848
|
-
|
|
849
|
-
> `KeyTypes`
|
|
850
|
-
|
|
851
|
-
📘 `definition`: type of all keys.
|
|
852
|
-
|
|
853
|
-
> `PrimitiveTypes`
|
|
854
|
-
|
|
855
|
-
📘 `definition`: all primitive types, including `Function`, `symbol`, and `bigint`.
|
|
856
|
-
|
|
857
|
-
> `ComposableTypes`
|
|
858
|
-
|
|
859
|
-
📘 `definition`: Types that can contain custom properties. i.e. `object`, `array`, `function`.
|
|
860
|
-
|
|
861
|
-
> `NonComposableTypes`
|
|
862
|
-
|
|
863
|
-
📘 `definition`: Types that cannot contain custom properties. i.e. not composable.
|
|
864
|
-
|
|
865
|
-
## JSON Support
|
|
866
|
-
|
|
867
|
-
> `JSONPrimitive`
|
|
868
|
-
|
|
869
|
-
📘 `definition`: primitive types valid in JSON
|
|
870
|
-
|
|
871
|
-
> `JSONObject`
|
|
872
|
-
|
|
873
|
-
📘 `definition`: JSON object
|
|
874
|
-
|
|
875
|
-
> `JSONArray`
|
|
876
|
-
|
|
877
|
-
📘 `definition`: JSON array
|
|
878
|
-
|
|
879
|
-
> `JSONTypes`
|
|
880
|
-
|
|
881
|
-
📘 `definition`: all JSON compatible types.
|
|
882
|
-
|
|
883
|
-
> `JSONTypes.get<T>(obj, ...props)`
|
|
884
|
-
|
|
885
|
-
🔨 `utilities`: get a cast value in JSON
|
|
886
|
-
|
|
887
|
-
```ts
|
|
888
|
-
import { JSONTypes } from 'type-plus'
|
|
889
|
-
|
|
890
|
-
const someJson: JSONTypes = { a: { b: ['z', { c: 'miku' }]}}
|
|
891
|
-
|
|
892
|
-
JSONTypes.get<string>(someJson, 'a', 'b', 1, 'c') // miku
|
|
893
|
-
```
|
|
894
|
-
|
|
895
|
-
## Type manipulation
|
|
896
|
-
|
|
897
|
-
> `ANotB<A, B>`
|
|
898
|
-
|
|
899
|
-
🔨 `utilities`: get object with properties in `A` and not in `B`, including properties with a different value type.
|
|
900
|
-
|
|
901
|
-
> `BNotA<A, B>`
|
|
902
|
-
|
|
903
|
-
🔨 `utilities`: flip of `ANotB`
|
|
904
|
-
|
|
905
|
-
> `as<T>(subject)`
|
|
906
|
-
|
|
907
|
-
🔨 `utilities`: assert `subject` as `T`. Avoid ASI issues such as `;(x as T).abc`
|
|
908
|
-
|
|
909
|
-
> `asAny(subject)`
|
|
910
|
-
|
|
911
|
-
🔨 `utilities`: assert `subject` as `any`. Avoid ASI issue such as `;(x as any).abc`
|
|
912
|
-
|
|
913
|
-
> `EitherAnd<A, B, [C, D]>`
|
|
914
|
-
|
|
915
|
-
💀🔨 `deprecated`,`utilities`: Renamed to `EitherOrBoth`. combines 2 to 4 types as `A | B | (A & B)`.
|
|
916
|
-
|
|
917
|
-
This is useful for combining options.
|
|
918
|
-
|
|
919
|
-
> `EitherOrBoth<A, B, [C, D]>`
|
|
920
|
-
|
|
921
|
-
🔨 `utilities`: combines 2 to 4 types as `A | B | (A & B)`.
|
|
922
|
-
|
|
923
|
-
This is useful for combining options [video](https://youtu.be/jBxx03NT4Ik).
|
|
924
|
-
|
|
925
|
-
> `Except<T, K>`
|
|
926
|
-
|
|
927
|
-
💀🔨 `deprecated`,`utilities`: same as `Omit<T, K>`.
|
|
928
|
-
|
|
929
|
-
> `ExcludePropType<T, U>`
|
|
930
|
-
|
|
931
|
-
🔨 `utilities`: excludes type `U` from properties in `T`.
|
|
932
|
-
|
|
933
|
-
> `KeyofOptional<T>`
|
|
934
|
-
|
|
935
|
-
🔨 `utilities`: `keyof` that works with `Record<any, any> | undefined`.
|
|
936
|
-
|
|
937
|
-
> `KnownKeys<T>`
|
|
938
|
-
|
|
939
|
-
🔨 `utilities`: extract known (defined) keys from type `T`.
|
|
940
|
-
|
|
941
|
-
> `LeftJoin<A, B>`
|
|
942
|
-
|
|
943
|
-
🔨 `utilities`: left join `A` with `B`
|
|
944
|
-
|
|
945
|
-
> `NonNull<T>`
|
|
946
|
-
|
|
947
|
-
🔨 `utilities`: remove `null`
|
|
948
|
-
|
|
949
|
-
> `NonNullable<T>` (built-in)
|
|
950
|
-
|
|
951
|
-
🔨 `utilities`: adjust the type not to nullable
|
|
952
|
-
|
|
953
|
-
> `NonUndefined<T>`
|
|
954
|
-
|
|
955
|
-
🔨 `utilities`: remove `undefined`
|
|
956
|
-
|
|
957
|
-
> `Omit<T, K>`
|
|
958
|
-
|
|
959
|
-
🔨 `utilities`: From `T`, pick a set of properties whose keys are not in the union `K`. This is the opposite of `Pick<T, K>`.
|
|
960
|
-
|
|
961
|
-
> `OptionalKeys<T>`
|
|
962
|
-
|
|
963
|
-
🔨 `utilities`: gets keys of optional properties in `T`.
|
|
964
|
-
|
|
965
|
-
> `PartialExcept<T, U>`
|
|
966
|
-
|
|
967
|
-
💀🔨 `deprecated`,`utilities`: same as `PartialOmit<T, U>`.
|
|
968
|
-
|
|
969
|
-
> `PartialOmit<T, U>`
|
|
970
|
-
|
|
971
|
-
🔨 `utilities`: makes the properties not specified in `U` becomes optional.
|
|
972
|
-
|
|
973
|
-
> `PartialPick<T, U>`
|
|
974
|
-
|
|
975
|
-
🔨 `utilities`: makes the properties specified in `U` becomes optional.
|
|
976
|
-
|
|
977
|
-
> `Pick<T, K>`
|
|
978
|
-
|
|
979
|
-
🔨 `utilities`: pick properties `K` from `T`. Works with unions.
|
|
980
|
-
|
|
981
|
-
> `RecursivePartial<T>`
|
|
982
|
-
|
|
983
|
-
🔨 `utilities`: make type `T` optional recursively.
|
|
984
|
-
|
|
985
|
-
> `RecursiveRequired<T>`
|
|
986
|
-
|
|
987
|
-
🔨 `utilities`: make type `T` required recursively.
|
|
988
|
-
|
|
989
|
-
> `ReplaceProperty<T, K, V>`
|
|
990
|
-
|
|
991
|
-
🔨 `utilities`: replace property `K` in `T` with `V`.
|
|
992
|
-
|
|
993
|
-
> `RequiredKeys<T>`
|
|
994
|
-
|
|
995
|
-
🔨 `utilities`: gets keys of required properties in `T`.
|
|
996
|
-
|
|
997
|
-
> `RequiredPick<T, U>`
|
|
998
|
-
|
|
999
|
-
🔨 `utilities`: makes the properties specified in `U` become required.
|
|
1000
|
-
|
|
1001
|
-
> `RequiredExcept<T, U>`
|
|
1002
|
-
|
|
1003
|
-
🔨 `utilities`: makes the properties not specified in `U` become required.
|
|
1004
|
-
|
|
1005
|
-
> `RecursiveIntersect<T, U>`
|
|
1006
|
-
|
|
1007
|
-
🔨 `utilities`: intersect type `U` onto `T` recursively.
|
|
1008
|
-
|
|
1009
|
-
> `ValueOf<T>`
|
|
1010
|
-
|
|
1011
|
-
🔨 `utilities`: type of the value of the properties of `T`.
|
|
1012
|
-
|
|
1013
|
-
> `Widen<T>`
|
|
1014
|
-
|
|
1015
|
-
🔨 `utilities`: widen literal types.
|
|
1016
|
-
|
|
1017
|
-
PropType
|
|
1018
|
-
|
|
1019
|
-
💀 ...no helper type for this. Just do `YourType['propName']`.
|
|
1020
|
-
|
|
1021
|
-
## Type Predicates
|
|
1022
|
-
|
|
1023
|
-
Type predicates are type alias that returns `true` or `false`.
|
|
1024
|
-
They can be used to compose complex types.
|
|
1025
|
-
|
|
1026
|
-
> `HasKey<T, K>`
|
|
1027
|
-
|
|
1028
|
-
🔨 `utilities`: predicate type checking `T` has key `K`.
|
|
1029
|
-
|
|
1030
|
-
> `IsAny<T>`
|
|
1031
|
-
|
|
1032
|
-
🔨 `utilities`: `T === any` (updated to impl: [expect-type]).
|
|
1033
|
-
|
|
1034
|
-
> `IsBoolean<T>`
|
|
1035
|
-
|
|
1036
|
-
🔨 `utilities`: check for `boolean`, but not for `true` nor `false`.
|
|
1037
|
-
|
|
1038
|
-
> `IsDisjoint<A, B>`
|
|
1039
|
-
|
|
1040
|
-
🔨 `utilities`: is `A` and `B` is a disjoint set.
|
|
1041
|
-
|
|
1042
|
-
> `IsEmptyObject<T>`
|
|
1043
|
-
|
|
1044
|
-
🔨 `utilities`: is `T === {}`.
|
|
1045
|
-
|
|
1046
|
-
> `IsLiteral<T>`
|
|
1047
|
-
|
|
1048
|
-
🔨 `utilities`: is `T` a literal type (literal string or number).
|
|
1049
|
-
|
|
1050
|
-
### Logical
|
|
1051
|
-
|
|
1052
|
-
> `If<Condition, Then = true, Else = false>`
|
|
1053
|
-
|
|
1054
|
-
🔨 `utilities`: if statement
|
|
1055
|
-
|
|
1056
|
-
> `And<A, B, Then = true, Else = false>`
|
|
1057
|
-
|
|
1058
|
-
🔨 `utilities`: logical `AND`
|
|
1059
|
-
|
|
1060
|
-
> `Or<A, B, Then = true, Else = false>`
|
|
1061
|
-
|
|
1062
|
-
🔨 `utilities`: logical `OR`
|
|
1063
|
-
|
|
1064
|
-
> `Xor<A, B, Then = true, Else = false>`
|
|
1065
|
-
|
|
1066
|
-
🔨 `utilities`: logical `XOR`
|
|
1067
|
-
|
|
1068
|
-
> `Not<X, Then = true, Else = false>`
|
|
1069
|
-
|
|
1070
|
-
🔨 `utilities`: logical `NOT`
|
|
1071
|
-
|
|
1072
|
-
Note that these types work correctly with the `boolean` type.
|
|
1073
|
-
e.g.:
|
|
1074
|
-
|
|
1075
|
-
```ts
|
|
1076
|
-
type R = And<boolean, true> // boolean
|
|
1077
|
-
type R = Not<boolean> // boolean`
|
|
1078
|
-
```
|
|
1079
|
-
|
|
1080
|
-
There is a problem with generic distribution: <https://github.com/microsoft/TypeScript/issues/41053>
|
|
1081
|
-
So you may encounter some weird behavior if your logic is complex.
|
|
1082
|
-
|
|
1083
|
-
## Math
|
|
1084
|
-
|
|
1085
|
-
The math types in `type-plus` works with most numeric types.
|
|
1086
|
-
|
|
1087
|
-
It works with `number` and `bigint`, positive and negative number, including floating point numbers.
|
|
1088
|
-
|
|
1089
|
-
It will cast the type between `number` and `bigint` if needed.
|
|
1090
|
-
|
|
1091
|
-
> `Abs<N, Fail = never>`
|
|
1092
|
-
|
|
1093
|
-
🔨 `utilities`: `Abs(N)`.
|
|
1094
|
-
|
|
1095
|
-
> `Max<A, B, Fail = never>`
|
|
1096
|
-
|
|
1097
|
-
🔨 `utilities`: `max(A, B)`
|
|
1098
|
-
|
|
1099
|
-
> `GreaterThan<A, B>`
|
|
1100
|
-
|
|
1101
|
-
🔨 `utilities`: `A > B`.
|
|
1102
|
-
|
|
1103
|
-
> `Add<A, B>`
|
|
1104
|
-
|
|
1105
|
-
🔨 `utilities`: `A + B`.
|
|
1106
|
-
|
|
1107
|
-
> `Subtract<A, B>`
|
|
1108
|
-
|
|
1109
|
-
🔨 `utilities`: `A > B`.
|
|
1110
|
-
|
|
1111
|
-
> `Increment<A>`
|
|
1112
|
-
|
|
1113
|
-
🔨 `utilities`: alias of `Add<A, 1>`.
|
|
1114
|
-
|
|
1115
|
-
> `Decrement<A>`
|
|
1116
|
-
|
|
1117
|
-
🔨 `utilities`: alias of `Subtract<A, 1>`.
|
|
1118
|
-
|
|
1119
|
-
> `Multiply<A, B`
|
|
1120
|
-
|
|
1121
|
-
🔨 `utilities`: `A * B`.
|
|
1122
|
-
|
|
1123
|
-
## Utility Functions
|
|
1124
|
-
|
|
1125
|
-
> `amend(subject)...`
|
|
1126
|
-
|
|
1127
|
-
🔨 `utilities`: amend subject as union or intersect of `T`.
|
|
1128
|
-
|
|
1129
|
-
> `facade(subject, ...props)`
|
|
1130
|
-
|
|
1131
|
-
🔨 `utilities`: create a facade of `subject`.
|
|
1132
|
-
|
|
1133
|
-
> `getField(subject, key, defaultValue)`
|
|
1134
|
-
|
|
1135
|
-
🔨 `utilities`: get a field from a subject. Works against nullable and optional subject.
|
|
1136
|
-
|
|
1137
|
-
> `hasKey()`
|
|
1138
|
-
|
|
1139
|
-
🔨 `utilities`: function of `HasKey`.
|
|
1140
|
-
|
|
1141
|
-
> `hasProperty(value, prop)`
|
|
1142
|
-
|
|
1143
|
-
🔨 `utilities`: assert `value` has property `prop`. This will pick the correct union type.
|
|
1144
|
-
|
|
1145
|
-
> `isConstructor(subject)`
|
|
1146
|
-
|
|
1147
|
-
🔨 `utilities`: type guard `subject` is a constructor.
|
|
1148
|
-
|
|
1149
|
-
> `isSystemError(code, err)`
|
|
1150
|
-
|
|
1151
|
-
🔨 `utilities`: type guard `err` with NodeJS error code.
|
|
1152
|
-
|
|
1153
|
-
> `omit(obj, ...props)`
|
|
1154
|
-
|
|
1155
|
-
🔨 `utilities`: omit properties from `obj`.
|
|
1156
|
-
|
|
1157
|
-
> `pick(obj, ...props)`
|
|
1158
|
-
|
|
1159
|
-
🔨 `utilities`: pick properties from `obj`.
|
|
1160
|
-
|
|
1161
|
-
> `record<K, V>(value?)`
|
|
1162
|
-
|
|
1163
|
-
🔨 `utilities`: create a `Record<K, V>` without extra object prototype.
|
|
1164
|
-
|
|
1165
|
-
> `record<R>(value?)`
|
|
1166
|
-
|
|
1167
|
-
🔨 `utilities`: create a record `R` (e.g. `{ a: number }`) without extra object prototype.
|
|
1168
|
-
|
|
1169
|
-
> `required(...)`
|
|
1170
|
-
|
|
1171
|
-
🔨 `utilities`: merge options and remove `Partial<T>`. From [`unpartial`](https://github.com/unional/unpartial)
|
|
1172
|
-
|
|
1173
|
-
> `requiredDeep(...)`
|
|
1174
|
-
|
|
1175
|
-
🔨 `utilities`: merge options deeply and remove `Partial<T>`. From [`unpartial`](https://github.com/unional/unpartial)
|
|
1176
|
-
|
|
1177
|
-
> `split(target, ...splitters)`
|
|
1178
|
-
|
|
1179
|
-
🔨 `utilities`: split one object into multiple objects.
|
|
1180
|
-
|
|
1181
|
-
> `stub<T>(value)`
|
|
1182
|
-
|
|
1183
|
-
🔨 `utilities`: stub a particular type `T`.
|
|
1184
|
-
|
|
1185
|
-
> `stub.build<T>(init?)`
|
|
1186
|
-
|
|
1187
|
-
🔨 `utilities`: build a stub for particular type `T`.
|
|
1188
|
-
|
|
1189
|
-
> `typeOverrideIncompatible<T>()`
|
|
1190
|
-
|
|
1191
|
-
🔨 `utilities`: override only the incompatible portion between two types.
|
|
1192
|
-
|
|
1193
|
-
```ts
|
|
1194
|
-
type A = {
|
|
1195
|
-
foo: boolean,
|
|
1196
|
-
bar: string,
|
|
1197
|
-
baz: string
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
const overrider = typeOverrideIncompatible<A>()
|
|
1201
|
-
const source = {
|
|
1202
|
-
foo: 1,
|
|
1203
|
-
bar: 'bar',
|
|
1204
|
-
baz: 'baz'
|
|
1205
|
-
}
|
|
1206
|
-
|
|
1207
|
-
// only the `foo` property is available to override.
|
|
1208
|
-
overrider(source, { foo: !!source.foo })
|
|
1209
|
-
```
|
|
1210
|
-
|
|
1211
|
-
> `unpartial()`
|
|
1212
|
-
|
|
1213
|
-
🔨 `utilities`: merge options and remove `Partial<T>` values. From [`unpartial`](https://github.com/unional/unpartial)
|
|
1214
|
-
|
|
1215
|
-
> `context()`
|
|
1216
|
-
|
|
1217
|
-
🔨 `utilities`: a context builder.
|
|
1218
|
-
|
|
1219
|
-
This is useful to build context for functional programming.
|
|
1220
|
-
It is a sync version of the `AsyncContext` from [async-fp](https://unional/async-fp).
|
|
1221
|
-
|
|
1222
|
-
```ts
|
|
1223
|
-
import { context } from 'type-plus'
|
|
1224
|
-
|
|
1225
|
-
// { a: 1, b: 2 }
|
|
1226
|
-
const ctx = context({ a: 1 })
|
|
1227
|
-
.extend(c => ({ b: c.a + 1 }))
|
|
1228
|
-
.build()
|
|
1229
|
-
```
|
|
1230
|
-
|
|
1231
|
-
## Nominal Types
|
|
1232
|
-
|
|
1233
|
-
The TypeScript type system is structural.
|
|
1234
|
-
|
|
1235
|
-
In some cases, we want to express a type with nominal behavior.
|
|
1236
|
-
`type-plus` provides two kinds of nominal types: `Brand` and `Flavor`.
|
|
1237
|
-
|
|
1238
|
-
`Brand<B, T>`:
|
|
1239
|
-
|
|
1240
|
-
`brand(type, subject?)`:
|
|
1241
|
-
|
|
1242
|
-
Branded nominal type is the stronger nominal type of the two.
|
|
1243
|
-
It disallows unbranded type assigned to it:
|
|
1244
|
-
|
|
1245
|
-
```ts
|
|
1246
|
-
const a = brand('a', { a: 1 })
|
|
1247
|
-
const b = { a: 1 }
|
|
1248
|
-
a = b // error
|
|
1249
|
-
```
|
|
1250
|
-
|
|
1251
|
-
`subject` can be any type, from primitive to strings to objects.
|
|
1252
|
-
|
|
1253
|
-
`brand(type)`:
|
|
1254
|
-
|
|
1255
|
-
If you do not provide `subject`, `brand(type)` will return a brand creator,
|
|
1256
|
-
so that you can use it to create multiple branded values:
|
|
1257
|
-
|
|
1258
|
-
```ts
|
|
1259
|
-
const nike = brand('nike')
|
|
1260
|
-
const shirt = nike('shirt')
|
|
1261
|
-
const socks = nike('socks')
|
|
1262
|
-
```
|
|
1263
|
-
|
|
1264
|
-
`Flavor<F, T>`:
|
|
1265
|
-
|
|
1266
|
-
`flavor(type, subject?)`:
|
|
1267
|
-
|
|
1268
|
-
The key difference between `Flavor` and `Brand` is that
|
|
1269
|
-
unflavored type can be assigned to `Flavor`:
|
|
1270
|
-
|
|
1271
|
-
```ts
|
|
1272
|
-
let f = flavor('orange', 'soda')
|
|
1273
|
-
f = 'mist' // ok
|
|
1274
|
-
```
|
|
1275
|
-
|
|
1276
|
-
Also, `Brand` of the same name can be assigned to `Flavor`,
|
|
1277
|
-
but `Flavor` of the same name cannot be assigned to `Brand`.
|
|
1278
|
-
|
|
1279
|
-
`nominalMatch(a, b)`:
|
|
1280
|
-
|
|
1281
|
-
🔨 `utilities`: compare if the two values are nominally equal.
|
|
1282
|
-
|
|
1283
|
-
Works with both `Brand` and `Flavor`.
|
|
1284
|
-
|
|
1285
|
-
```ts
|
|
1286
|
-
const b1 = brand('x', 1)
|
|
1287
|
-
const b2 = brand('y', 1)
|
|
1288
|
-
|
|
1289
|
-
nominalMatch(b1, b2) // false
|
|
1290
|
-
```
|
|
1291
|
-
|
|
1292
|
-
## Functional Types
|
|
1293
|
-
|
|
1294
|
-
> `ChainFn<T>: T`
|
|
1295
|
-
|
|
1296
|
-
🔨 `utilities`: chain function that returns the input type.
|
|
1297
|
-
|
|
1298
|
-
> `compose(...fns): F`
|
|
1299
|
-
|
|
1300
|
-
🔨 `utilities`: compose functions
|
|
1301
|
-
|
|
1302
|
-
## Attribution
|
|
1303
|
-
|
|
1304
|
-
Some code in this library is created by other people in the TypeScript community.
|
|
1305
|
-
I'm merely adding them in and maybe making some adjustments.
|
|
1306
|
-
Whenever possible, I add attribution to the person who created those **codes** in the file.
|
|
1307
|
-
|
|
1308
|
-
## Useful Tips
|
|
1309
|
-
|
|
1310
|
-
> <https://github.com/microsoft/TypeScript/wiki/Performance>
|
|
1311
|
-
|
|
1312
|
-
## Similar projects
|
|
1313
|
-
|
|
1314
|
-
- [expect-type]: Compile-time tests for types
|
|
1315
|
-
- [hotscript]: Higher-order TypeScript
|
|
1316
|
-
- [spec.ts]: write tests for your types!
|
|
1317
|
-
- [ts-calc]: compute with typescript type system, part of [hotscript]
|
|
1318
|
-
- [ts-essentials]: all essential TypeScript types in one place.
|
|
1319
|
-
- [ts-expect]: Checks values in TypeScript match expectations.
|
|
1320
|
-
- [ts-toolbelt]: TypeScript's largest utility library.
|
|
1321
|
-
- [type-fest]: a collection of essential TypeScript types.
|
|
1322
|
-
- [type-zoo]: a modest type lib usable today.
|
|
1323
|
-
- [typepark]: a new type collection offering tuple manipulation and `Pipe`.
|
|
1324
|
-
- [typelevel-ts]: a type lib by [@gcanti], author of several FP libraries in TS.
|
|
1325
|
-
- [typical]: a playground of type-level operations for TypeScript.
|
|
1326
|
-
- [utility-types]: collection of utility types, complementing TypeScript build-in mapped types ans aliases.
|
|
1327
|
-
- [earl]: Ergonomic, modern and type-safe assertion library for TypeScript
|
|
1328
|
-
|
|
1329
|
-
[@gcanti]: https://github.com/gcanti
|
|
1330
|
-
[codecov_image]: https://codecov.io/gh/unional/type-plus/branch/master/graph/badge.svg
|
|
1331
|
-
[codecov_url]: https://codecov.io/gh/unional/type-plus
|
|
1332
|
-
[downloads_image]: https://img.shields.io/npm/dm/type-plus.svg?style=flat
|
|
1333
|
-
[earl]: https://github.com/l2beat/earl
|
|
1334
|
-
[expect-type]: https://github.com/mmkal/expect-type
|
|
1335
|
-
[github_action_url]: https://github.com/unional/type-plus/actions
|
|
1336
|
-
[github_release]: https://github.com/unional/type-plus/workflows/release/badge.svg
|
|
1337
|
-
[hotscript]: https://github.com/gvergnaud/hotscript
|
|
1338
|
-
[npm_image]: https://img.shields.io/npm/v/type-plus.svg?style=flat
|
|
1339
|
-
[npm_url]: https://npmjs.org/package/type-plus
|
|
1340
|
-
[spec.ts]: https://github.com/aleclarson/spec.ts
|
|
1341
|
-
[ts-calc]: https://github.com/ecyrbe/ts-calc
|
|
1342
|
-
[ts-essentials]: https://github.com/ts-essentials/ts-essentials
|
|
1343
|
-
[ts-expect]: https://github.com/TypeStrong/ts-expect
|
|
1344
|
-
[ts-toolbelt]: https://github.com/millsp/ts-toolbelt
|
|
1345
|
-
[type-fest]: https://github.com/sindresorhus/type-fest
|
|
1346
|
-
[type-plus]: https://github.com/unional/type-plus
|
|
1347
|
-
[type-zoo]: https://github.com/pelotom/type-zoo
|
|
1348
|
-
[typelevel-ts]: https://github.com/gcanti/typelevel-ts
|
|
1349
|
-
[typepark]: https://github.com/kgtkr/typepark
|
|
1350
|
-
[TypeScript]: https://www.typescriptlang.org
|
|
1351
|
-
[typical]: https://github.com/KiaraGrouwstra/typical
|
|
1352
|
-
[utility-types]: https://github.com/piotrwitek/utility-types
|
|
1353
|
-
[vscode_image]: https://img.shields.io/badge/vscode-ready-green.svg
|
|
1354
|
-
[vscode_url]: https://code.visualstudio.com/
|
|
1355
|
-
[assertion_functions]: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#assertion-functions
|
|
1356
|
-
[type_guard]: https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates
|