type-plus 7.5.0 → 8.0.0-beta.0
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/array/array.at.d.ts +2 -2
- package/esm/array/array.at.d.ts.map +1 -1
- package/esm/array/array.entries.d.ts +2 -2
- package/esm/array/array.entries.d.ts.map +1 -1
- package/esm/array/array.find_last.d.ts +1 -1
- package/esm/array/array.find_last.d.ts.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.some.d.ts +7 -7
- package/esm/array/array.some.d.ts.map +1 -1
- package/esm/array/array_plus.common_prop_keys.d.ts +2 -2
- package/esm/array/array_plus.common_prop_keys.d.ts.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.d.ts +3 -1
- package/esm/array/array_plus.d.ts.map +1 -1
- package/esm/array/array_plus.drop_match.d.ts +3 -0
- package/esm/array/array_plus.drop_match.d.ts.map +1 -1
- package/esm/array/array_plus.element_match.d.ts +11 -11
- package/esm/array/array_plus.element_match.d.ts.map +1 -1
- package/esm/array/array_plus.filter.d.ts +24 -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 +10 -10
- package/esm/array/array_plus.find.d.ts.map +1 -1
- package/esm/array/array_plus.index_at.d.ts +28 -0
- package/esm/array/array_plus.index_at.d.ts.map +1 -0
- package/esm/array/array_plus.index_at.js +2 -0
- package/esm/array/array_plus.index_at.js.map +1 -0
- package/esm/array/array_plus.is_index_out_of_bound.d.ts +18 -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 +30 -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.pad_start.d.ts +1 -1
- package/esm/array/array_plus.pad_start.d.ts.map +1 -1
- package/esm/array/array_plus.split_at.d.ts +21 -16
- package/esm/array/array_plus.split_at.d.ts.map +1 -1
- package/esm/array/array_type.d.ts +2 -2
- package/esm/array/array_type.d.ts.map +1 -1
- package/esm/array/filter.d.ts +2 -2
- package/esm/array/filter.d.ts.map +1 -1
- package/esm/array/find_first.d.ts +6 -6
- package/esm/array/find_first.d.ts.map +1 -1
- package/esm/array/head.d.ts +2 -2
- package/esm/array/head.d.ts.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/last.d.ts +2 -2
- package/esm/array/last.d.ts.map +1 -1
- package/esm/array/loose_array_type.d.ts +62 -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/strict_array_type.d.ts +66 -0
- package/esm/array/strict_array_type.d.ts.map +1 -0
- package/esm/array/strict_array_type.js +2 -0
- package/esm/array/strict_array_type.js.map +1 -0
- 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_values.d.ts +2 -2
- package/esm/array/union_of_values.d.ts.map +1 -1
- package/esm/equal/equal.d.ts +1 -1
- package/esm/equal/equal.d.ts.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/index.d.ts +7 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -0
- package/esm/index.js.map +1 -1
- package/esm/math/numeric_struct.d.ts.map +1 -1
- package/esm/mix_types/box.d.ts +35 -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/merge.d.ts +38 -0
- package/esm/mix_types/merge.d.ts.map +1 -0
- package/esm/{merge.js → mix_types/merge.js} +1 -1
- package/esm/mix_types/merge.js.map +1 -0
- package/esm/never/never_type.d.ts +2 -2
- package/esm/never/never_type.d.ts.map +1 -1
- package/esm/object/ANotB.d.ts +1 -1
- package/esm/object/ANotB.d.ts.map +1 -1
- package/esm/object/IsDisjoint.d.ts +1 -1
- package/esm/object/IsDisjoint.d.ts.map +1 -1
- package/esm/object/KeysWithDiffType.d.ts +1 -1
- package/esm/object/KeysWithDiffType.d.ts.map +1 -1
- package/esm/object/KnownKeys.d.ts.map +1 -1
- package/esm/object/RecursiveIntersect.d.ts +2 -2
- package/esm/object/RecursiveIntersect.d.ts.map +1 -1
- package/esm/object/RecursiveRequired.d.ts +1 -1
- package/esm/object/RecursiveRequired.d.ts.map +1 -1
- package/{cjs/object/AnyRecord.d.ts → esm/object/any_record.d.ts} +1 -1
- 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/facade.d.ts +1 -1
- package/esm/object/facade.d.ts.map +1 -1
- package/esm/object/hasKey.d.ts +1 -1
- package/esm/object/hasKey.d.ts.map +1 -1
- package/esm/object/index.d.ts +1 -1
- package/esm/object/index.d.ts.map +1 -1
- package/esm/object/is_strict_object.d.ts +10 -0
- package/esm/object/is_strict_object.d.ts.map +1 -0
- package/esm/object/is_strict_object.js +2 -0
- package/esm/object/is_strict_object.js.map +1 -0
- package/esm/object/left_join.d.ts +1 -1
- package/esm/object/left_join.d.ts.map +1 -1
- package/esm/object/mapProperties.d.ts +1 -1
- package/esm/object/mapProperties.d.ts.map +1 -1
- package/esm/object/merge.d.ts +59 -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 +2 -2
- package/esm/object/omit.d.ts.map +1 -1
- package/esm/object/omit.js.map +1 -1
- package/esm/object/optional_key.d.ts +1 -1
- package/esm/object/optional_key.d.ts.map +1 -1
- package/esm/object/pick.d.ts +1 -1
- package/esm/object/pick.d.ts.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/replaceProperty.d.ts +1 -1
- package/esm/object/replaceProperty.d.ts.map +1 -1
- package/esm/object/split.d.ts +1 -1
- package/esm/object/split.d.ts.map +1 -1
- package/esm/tuple/common_prop_keys.d.ts +1 -1
- package/esm/tuple/drop.d.ts +8 -8
- package/esm/tuple/drop.d.ts.map +1 -1
- package/esm/tuple/tail.d.ts +1 -1
- package/esm/tuple/tail.d.ts.map +1 -1
- package/esm/tuple/tuple_plus.common_prop_keys.d.ts +2 -2
- package/esm/tuple/tuple_plus.common_prop_keys.d.ts.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.find.d.ts +14 -14
- package/esm/tuple/tuple_plus.find.d.ts.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_type.d.ts +4 -4
- package/esm/tuple/tuple_type.d.ts.map +1 -1
- package/esm/type_plus/cases.d.ts +13 -0
- package/esm/type_plus/cases.d.ts.map +1 -0
- package/esm/type_plus/cases.js +6 -0
- package/esm/type_plus/cases.js.map +1 -0
- package/esm/utils/options.d.ts +27 -9
- package/esm/utils/options.d.ts.map +1 -1
- package/package.json +16 -15
- package/{README.md → readme.md} +36 -17
- package/ts/array/array.at.ts +2 -2
- package/ts/array/array.entries.ts +6 -6
- package/ts/array/array.find_last.ts +7 -7
- package/ts/array/array.reverse.ts +12 -3
- package/ts/array/array.some.ts +13 -13
- package/ts/array/array_plus.common_prop_keys.ts +4 -4
- package/ts/array/array_plus.concat.ts +1 -1
- package/ts/array/array_plus.drop_match.ts +3 -0
- package/ts/array/array_plus.element_match.ts +16 -16
- package/ts/array/array_plus.filter.ts +49 -5
- package/ts/array/array_plus.find.ts +13 -13
- package/ts/array/{array_index.ts → array_plus.index_at.ts} +37 -41
- package/ts/array/array_plus.is_index_out_of_bound.ts +22 -0
- package/ts/array/array_plus.is_readonly.ts +46 -0
- package/ts/array/array_plus.pad_start.ts +1 -1
- package/ts/array/array_plus.split_at.ts +53 -24
- package/ts/array/array_plus.ts +3 -1
- package/ts/array/array_type.ts +5 -1
- package/ts/array/filter.ts +2 -2
- package/ts/array/find_first.ts +6 -6
- package/ts/array/head.ts +3 -3
- package/ts/array/intersect_of_props.ts +1 -1
- package/ts/array/last.ts +6 -4
- package/ts/array/loose_array_type.ts +69 -0
- package/ts/array/pad_start.ts +1 -1
- package/ts/array/readme.md +125 -35
- package/ts/array/strict_array_type.ts +75 -0
- package/ts/array/union_of_props.ts +2 -2
- package/ts/array/union_of_values.ts +2 -2
- package/ts/equal/equal.ts +23 -30
- package/ts/equal/identity_equal.ts +9 -0
- package/ts/index.ts +7 -1
- package/ts/math/numeric_struct.ts +109 -109
- package/ts/mix_types/box.ts +62 -0
- package/ts/mix_types/merge.ts +61 -0
- package/ts/mix_types/readme.md +34 -0
- package/ts/never/never_type.ts +2 -2
- package/ts/object/ANotB.ts +1 -1
- package/ts/object/IsDisjoint.ts +1 -1
- package/ts/object/KeysWithDiffType.ts +3 -3
- package/ts/object/KnownKeys.ts +5 -5
- package/ts/object/RecursiveIntersect.ts +7 -7
- package/ts/object/RecursiveRequired.ts +1 -1
- package/ts/object/facade.ts +1 -1
- package/ts/object/hasKey.ts +1 -1
- package/ts/object/index.ts +1 -1
- package/ts/object/is_strict_object.ts +14 -0
- package/ts/object/left_join.ts +1 -1
- package/ts/object/mapProperties.ts +1 -1
- package/ts/object/merge.ts +122 -0
- package/ts/object/object_plus.ts +1 -0
- package/ts/object/omit.ts +4 -5
- package/ts/object/optional_key.ts +1 -1
- package/ts/object/pick.ts +1 -1
- package/ts/object/readme.md +14 -0
- package/ts/object/record.ts +1 -1
- package/ts/object/recursive_partial.ts +1 -1
- package/ts/object/replaceProperty.ts +1 -1
- package/ts/object/split.ts +1 -1
- package/ts/tuple/common_prop_keys.ts +1 -1
- package/ts/tuple/drop.ts +8 -8
- package/ts/tuple/readme.md +17 -17
- package/ts/tuple/tail.ts +4 -6
- package/ts/tuple/tuple_plus.common_prop_keys.ts +2 -2
- package/ts/tuple/tuple_plus.filter.ts +2 -2
- package/ts/tuple/tuple_plus.find.ts +19 -19
- package/ts/tuple/tuple_plus.pad_start.ts +12 -9
- package/ts/tuple/tuple_type.ts +4 -4
- package/ts/type_plus/cases.ts +14 -0
- package/ts/utils/options.ts +27 -8
- 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 -34
- 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 -35
- 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.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 -22
- 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/array/array_index.d.ts +0 -34
- 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/merge.d.ts +0 -55
- package/esm/merge.d.ts.map +0 -1
- package/esm/merge.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/ts/merge.ts +0 -72
- /package/ts/object/{AnyRecord.ts → any_record.ts} +0 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { Box } from './box.js'
|
|
2
|
+
import type { IsNever } from '../never/never_type.js'
|
|
3
|
+
import type { IsNull } from '../null/null_type.js'
|
|
4
|
+
import type { Merge as ObjectMerge } from '../object/merge.js'
|
|
5
|
+
import type { Or } from '../predicates/logical.js'
|
|
6
|
+
import type { IsUndefined } from '../undefined/undefined_type.js'
|
|
7
|
+
import type { IsUnknown } from '../unknown/unknown_type.js'
|
|
8
|
+
import type { IsVoid } from '../void/void_type.js'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* ⚗️ *transform*
|
|
12
|
+
* 🔢 *customizable*
|
|
13
|
+
*
|
|
14
|
+
* Merges type `A` and type `B`.
|
|
15
|
+
*
|
|
16
|
+
* This type performs the same operations as `{ ...a, ...b }` but at the type level.
|
|
17
|
+
*
|
|
18
|
+
* This is a more general type then `ObjectPlus.Merge<A, B>`,
|
|
19
|
+
* which constraints `A` and `B` to be `Record`.
|
|
20
|
+
*
|
|
21
|
+
* This type does not have such restrictions, and tries to handle the other types accordingly.
|
|
22
|
+
*/
|
|
23
|
+
export type Merge<A, B> =
|
|
24
|
+
Or<
|
|
25
|
+
IsNever<A>,
|
|
26
|
+
IsNever<B>,
|
|
27
|
+
never,
|
|
28
|
+
Or<
|
|
29
|
+
IsVoid<A>,
|
|
30
|
+
IsVoid<B>,
|
|
31
|
+
A & B,
|
|
32
|
+
Or<
|
|
33
|
+
IsUnknown<A>,
|
|
34
|
+
Or<IsUndefined<A>, IsNull<A>>,
|
|
35
|
+
B,
|
|
36
|
+
Or<
|
|
37
|
+
IsUnknown<B>,
|
|
38
|
+
Or<IsUndefined<B>, IsNull<B>>,
|
|
39
|
+
A,
|
|
40
|
+
ObjectMerge<
|
|
41
|
+
Box<A, { $notBoxable: {} }>,
|
|
42
|
+
Box<B, { $notBoxable: {} }>
|
|
43
|
+
>
|
|
44
|
+
>
|
|
45
|
+
>
|
|
46
|
+
>
|
|
47
|
+
>
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Left join `a` with `b`.
|
|
51
|
+
*
|
|
52
|
+
* This returns the proper type of `{ ...a, ...b }`
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* merge({ a: 1 }, {} as { a?: string | undefined }) // { a: number | string }
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export function merge<A, B>(a: A, b: B): Merge<A, B> {
|
|
60
|
+
return { ...a, ...b } as any
|
|
61
|
+
}
|
package/ts/mix_types/readme.md
CHANGED
|
@@ -38,3 +38,37 @@ type R = IsAnyOrNever<never> // true
|
|
|
38
38
|
|
|
39
39
|
type R = IsAnyOrNever<unknown> // false
|
|
40
40
|
```
|
|
41
|
+
|
|
42
|
+
## [Box](./box.ts)
|
|
43
|
+
|
|
44
|
+
`Box<T, Options = { $notBoxable }>`
|
|
45
|
+
|
|
46
|
+
⚗️ *transform*
|
|
47
|
+
🔢 *customizable*
|
|
48
|
+
|
|
49
|
+
Converts primitive types to their boxed types.
|
|
50
|
+
|
|
51
|
+
`$notBoxable`: return type when `T` is not boxable. Defaults to `never`.
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
Box<number> // Number
|
|
55
|
+
Box<object> // Object
|
|
56
|
+
Box<string> // String
|
|
57
|
+
Box<'abc'> // String
|
|
58
|
+
|
|
59
|
+
Box<undefined> // never
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## [Merge](./merge.ts)
|
|
63
|
+
|
|
64
|
+
⚗️ *transform*
|
|
65
|
+
🔢 *customizable*
|
|
66
|
+
|
|
67
|
+
Merges type `A` and type `B`.
|
|
68
|
+
|
|
69
|
+
This type performs the same operations as `{ ...a, ...b }` but at the type level.
|
|
70
|
+
|
|
71
|
+
This is a more general type then `ObjectPlus.Merge<A, B>`,
|
|
72
|
+
which constraints `A` and `B` to be `Record`.
|
|
73
|
+
|
|
74
|
+
This type does not have such restrictions, and tries to handle the other types accordingly.
|
package/ts/never/never_type.ts
CHANGED
package/ts/object/ANotB.ts
CHANGED
package/ts/object/IsDisjoint.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ValueOf } from './ValueOf.js'
|
|
2
2
|
import type { IsDisjoint } from './IsDisjoint.js'
|
|
3
|
-
import type { AnyRecord } from './
|
|
3
|
+
import type { AnyRecord } from './any_record.js'
|
|
4
4
|
|
|
5
5
|
export type KeysWithDiffType<A extends AnyRecord, B extends AnyRecord> = IsDisjoint<A, B> extends true
|
|
6
6
|
? never
|
|
7
7
|
: ValueOf<{
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
[k in keyof A & keyof B]: A[k] extends B[k] ? never : k
|
|
9
|
+
}>
|
package/ts/object/KnownKeys.ts
CHANGED
|
@@ -8,10 +8,10 @@ import type { PrimitiveTypes } from '../primitive.js'
|
|
|
8
8
|
export type KnownKeys<T> = T extends PrimitiveTypes
|
|
9
9
|
? never
|
|
10
10
|
: {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
[K in keyof T]: string extends K ? never : number extends K ? never : K
|
|
12
|
+
} extends { [_ in keyof T]: infer U }
|
|
13
13
|
? // eslint-disable-next-line @typescript-eslint/ban-types
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
{} extends U
|
|
15
|
+
? never
|
|
16
|
+
: U
|
|
17
17
|
: never
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AnyRecord } from './
|
|
1
|
+
import type { AnyRecord } from './any_record.js'
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Intersect type recursively.
|
|
@@ -16,10 +16,10 @@ export type RecursiveIntersect<T, U> = T &
|
|
|
16
16
|
? Array<Y & U> & U
|
|
17
17
|
: T extends AnyRecord
|
|
18
18
|
? {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
[P in keyof T]: T[P] extends Array<infer R>
|
|
20
|
+
? Array<RecursiveIntersect<R, U>> & U
|
|
21
|
+
: (T[P] extends AnyRecord
|
|
22
|
+
? RecursiveIntersect<T[P], U>
|
|
23
|
+
: T[P] & U)
|
|
24
|
+
} & U
|
|
25
25
|
: U)
|
package/ts/object/facade.ts
CHANGED
package/ts/object/hasKey.ts
CHANGED
package/ts/object/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { ANotB, BNotA } from './ANotB.js'
|
|
2
|
-
export type { AnyRecord } from './
|
|
2
|
+
export type { AnyRecord } from './any_record.js'
|
|
3
3
|
export type { ExcludePropType } from './ExcludePropType.js'
|
|
4
4
|
export type { IsDisjoint } from './IsDisjoint.js'
|
|
5
5
|
export type { IsRecord } from './IsRecord.js'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IdentityEqual } from '../equal/identity_equal.js'
|
|
2
|
+
import type { IsNever } from '../never/never_type.js'
|
|
3
|
+
import type { IsObject } from './object_type.js'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 🎭 *validate*
|
|
7
|
+
*
|
|
8
|
+
* Validate that `T` is strictly the `object` type.
|
|
9
|
+
*/
|
|
10
|
+
export type IsStrictObject<T, Then = true, Else = false> = IsObject<
|
|
11
|
+
T,
|
|
12
|
+
IdentityEqual<T, {}, Else, IsNever<keyof T, Then, Else>>,
|
|
13
|
+
Else
|
|
14
|
+
>
|
package/ts/object/left_join.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IsEqual } from '../equal/equal.js'
|
|
2
|
-
import type { AnyRecord } from './
|
|
2
|
+
import type { AnyRecord } from './any_record.js'
|
|
3
3
|
import type { IsDisjoint } from './IsDisjoint.js'
|
|
4
4
|
import type { KeysWithDiffType } from './KeysWithDiffType.js'
|
|
5
5
|
import type { Properties } from './properties.js'
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { IsAny } from '../any/any_type.js'
|
|
2
|
+
import type { NonComposableTypes } from '../composable_types.js'
|
|
3
|
+
import type { IsNever, NotNeverType } from '../never/never_type.js'
|
|
4
|
+
import type { IsLiteral } from '../predicates/literal.js'
|
|
5
|
+
import type { Or } from '../predicates/logical.js'
|
|
6
|
+
import type { $Never } from '../type_plus/cases.js'
|
|
7
|
+
import type { AnyRecord } from './any_record.js'
|
|
8
|
+
import type { IsDisjoint } from './IsDisjoint.js'
|
|
9
|
+
import type { KeyTypes } from './KeyTypes.js'
|
|
10
|
+
import type { OptionalKeys } from './OptionalKeys.js'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* ⚗️ *transform*
|
|
14
|
+
* 🔢 *customizable*
|
|
15
|
+
*
|
|
16
|
+
* Merges type `A` and type `B`.
|
|
17
|
+
*
|
|
18
|
+
* This type performs the same operations as `{ ...a, ...b }` but at the type level.
|
|
19
|
+
*
|
|
20
|
+
* It handles cases like A or B are `Record`,
|
|
21
|
+
* joining between required and optional props, etc.
|
|
22
|
+
*/
|
|
23
|
+
export type Merge<A extends AnyRecord, B extends AnyRecord, Options = Merge.DefaultOptions> = Or<
|
|
24
|
+
IsAny<A>,
|
|
25
|
+
IsAny<B>,
|
|
26
|
+
any,
|
|
27
|
+
Or<
|
|
28
|
+
IsNever<A>,
|
|
29
|
+
IsNever<B>,
|
|
30
|
+
never,
|
|
31
|
+
IsDisjoint<A, B> extends true
|
|
32
|
+
? A & B
|
|
33
|
+
: ([keyof A, keyof B] extends [infer KA extends KeyTypes, infer KB extends KeyTypes]
|
|
34
|
+
? (IsLiteral<KA> extends true
|
|
35
|
+
? (IsLiteral<KB> extends true
|
|
36
|
+
? ([OptionalKeys<A>, OptionalKeys<B>] extends [infer PKA extends KeyTypes, infer PKB extends KeyTypes]
|
|
37
|
+
?
|
|
38
|
+
// property is optional when both A[k] and B[k] are optional
|
|
39
|
+
NotNeverType<
|
|
40
|
+
PKA & PKB,
|
|
41
|
+
{ [k in PKA & PKB]?: A[k] | B[k] },
|
|
42
|
+
unknown
|
|
43
|
+
> &
|
|
44
|
+
// properties only in A excluding partials is A[k]
|
|
45
|
+
NotNeverType<
|
|
46
|
+
Exclude<KA, PKA | KB>,
|
|
47
|
+
{ [k in Exclude<KA, PKA | KB>]: A[k] },
|
|
48
|
+
unknown
|
|
49
|
+
> &
|
|
50
|
+
// properties only in B excluding partials is B[k]
|
|
51
|
+
NotNeverType<
|
|
52
|
+
Exclude<KB, PKB>,
|
|
53
|
+
{ [k in Exclude<KB, PKB>]: B[k] },
|
|
54
|
+
unknown
|
|
55
|
+
> &
|
|
56
|
+
// properties is required in A but optional in B is unionized without undefined
|
|
57
|
+
NotNeverType<
|
|
58
|
+
Exclude<KA & PKB, PKA>,
|
|
59
|
+
{ [k in Exclude<KA & PKB, PKA>]: A[k] | Exclude<B[k], undefined> },
|
|
60
|
+
unknown
|
|
61
|
+
>
|
|
62
|
+
: never)
|
|
63
|
+
:
|
|
64
|
+
NotNeverType<
|
|
65
|
+
Exclude<KA, KA & KB>,
|
|
66
|
+
{ [k in Exclude<KA, KA & KB>]: A[k] },
|
|
67
|
+
unknown
|
|
68
|
+
> &
|
|
69
|
+
NotNeverType<
|
|
70
|
+
Exclude<KB, KA & KB>,
|
|
71
|
+
{ [k in Exclude<KB, KA & KB>]: B[k] },
|
|
72
|
+
unknown
|
|
73
|
+
> &
|
|
74
|
+
NotNeverType<
|
|
75
|
+
KA & KB,
|
|
76
|
+
{ [k in KA & KB]: A[k] | B[k] },
|
|
77
|
+
unknown
|
|
78
|
+
>
|
|
79
|
+
)
|
|
80
|
+
: (
|
|
81
|
+
IsLiteral<KB> extends true
|
|
82
|
+
? { [k in Exclude<KA, KB>]: A[k] } & { [k in keyof B]: B[k] }
|
|
83
|
+
:
|
|
84
|
+
NotNeverType<
|
|
85
|
+
Exclude<KA, KA & KB>,
|
|
86
|
+
{ [k in Exclude<KA, KA & KB>]: A[k] },
|
|
87
|
+
unknown
|
|
88
|
+
> &
|
|
89
|
+
NotNeverType<
|
|
90
|
+
Exclude<KB, KA & KB>,
|
|
91
|
+
{ [k in Exclude<KB, KA & KB>]: B[k] },
|
|
92
|
+
unknown
|
|
93
|
+
> &
|
|
94
|
+
NotNeverType<
|
|
95
|
+
KA & KB,
|
|
96
|
+
{ [k in KA & KB]: A[k] | B[k] },
|
|
97
|
+
unknown
|
|
98
|
+
>
|
|
99
|
+
))
|
|
100
|
+
: never)
|
|
101
|
+
>
|
|
102
|
+
>
|
|
103
|
+
|
|
104
|
+
export namespace Merge {
|
|
105
|
+
export type JoinProps<A, B> = A extends NonComposableTypes
|
|
106
|
+
? B
|
|
107
|
+
: (B extends NonComposableTypes
|
|
108
|
+
? A
|
|
109
|
+
: A & B)
|
|
110
|
+
|
|
111
|
+
export type Options = {
|
|
112
|
+
$never?: undefined
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface DefaultOptions {
|
|
116
|
+
$never: never
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type Cases = {
|
|
120
|
+
$never: $Never
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './merge.js'
|
package/ts/object/omit.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UnionKeys } from '../union_keys.js'
|
|
2
|
-
import type { AnyRecord } from './
|
|
2
|
+
import type { AnyRecord } from './any_record.js'
|
|
3
3
|
import type { Pick } from './pick.js'
|
|
4
4
|
import { record } from './record.js'
|
|
5
5
|
import { reduceByKey } from './reduceKey.js'
|
|
@@ -8,10 +8,9 @@ import { reduceByKey } from './reduceKey.js'
|
|
|
8
8
|
// https://github.com/microsoft/TypeScript/issues/28339#issuecomment-463577347
|
|
9
9
|
// type-zoo
|
|
10
10
|
export type Omit<T, K extends UnionKeys<T>> = T extends T
|
|
11
|
-
? keyof T extends K
|
|
12
|
-
?
|
|
13
|
-
|
|
14
|
-
: Pick<T, Exclude<keyof T, K>>
|
|
11
|
+
? (keyof T extends K
|
|
12
|
+
? {}
|
|
13
|
+
: Pick<T, Exclude<keyof T, K>>)
|
|
15
14
|
: never
|
|
16
15
|
|
|
17
16
|
/**
|
package/ts/object/pick.ts
CHANGED
package/ts/object/readme.md
CHANGED
|
@@ -58,6 +58,20 @@ import type { OptionalProps } from 'type-plus'
|
|
|
58
58
|
type R = OptionalProps<{ a?: number; b: string }> // { a?: number }
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
+
## [ObjectPlus.Merge](./merge.ts)
|
|
62
|
+
|
|
63
|
+
`Merge<A, B, Options = { }>`
|
|
64
|
+
|
|
65
|
+
⚗️ *transform*
|
|
66
|
+
🔢 *customizable*
|
|
67
|
+
|
|
68
|
+
Merges type `A` and type `B`.
|
|
69
|
+
|
|
70
|
+
This type performs the same operations as `{ ...a, ...b }` but at the type level.
|
|
71
|
+
|
|
72
|
+
It handles cases like A or B are `Record`,
|
|
73
|
+
joining between required and optional props, etc.
|
|
74
|
+
|
|
61
75
|
## References
|
|
62
76
|
|
|
63
77
|
- [Handbook]
|
package/ts/object/record.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import type { AnyFunction } from '../function/any_function.js'
|
|
4
4
|
import type { ExtractFunction } from '../index.js'
|
|
5
|
-
import type { AnyRecord } from './
|
|
5
|
+
import type { AnyRecord } from './any_record.js'
|
|
6
6
|
import type { Properties } from './properties.js'
|
|
7
7
|
|
|
8
8
|
/**
|
package/ts/object/split.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
2
|
-
import type { AnyRecord } from './
|
|
2
|
+
import type { AnyRecord } from './any_record.js'
|
|
3
3
|
import type { Omit } from './omit.js'
|
|
4
4
|
import { reduceByKey } from './reduceKey.js'
|
|
5
5
|
import type { Partial } from './Partial.js'
|
|
@@ -16,7 +16,7 @@ import type { CommonPropKeys as TupleCommonPropKeys } from './tuple_plus.common_
|
|
|
16
16
|
* type R = CommonPropKeys<[{ a: number, c: 1 }, { b: number, c: 2 }]> // 'c'
|
|
17
17
|
* ```
|
|
18
18
|
*
|
|
19
|
-
* @typeParam Options['
|
|
19
|
+
* @typeParam Options['$never'] Return type when `T` is `never`.
|
|
20
20
|
* Default to `never`.
|
|
21
21
|
*/
|
|
22
22
|
export type CommonPropKeys<
|
package/ts/tuple/drop.ts
CHANGED
|
@@ -17,7 +17,7 @@ import type { DropMatch as TupleDropMatch } from './tuple_plus.drop_match.js'
|
|
|
17
17
|
* type R = DropFirst<string[]> // string[]
|
|
18
18
|
* ```
|
|
19
19
|
*
|
|
20
|
-
* @typeParam Options['
|
|
20
|
+
* @typeParam Options['$array'] Return type when `T` is `Array`.
|
|
21
21
|
* Default to `T`.
|
|
22
22
|
*
|
|
23
23
|
* @typeParam Options['caseEmptyTuple'] Return type when `T` is an empty tuple.
|
|
@@ -27,7 +27,7 @@ export type DropFirst<
|
|
|
27
27
|
T extends unknown[],
|
|
28
28
|
Options extends DropFirst.Options = DropFirst.DefaultOptions<T>
|
|
29
29
|
> = number extends T['length']
|
|
30
|
-
? Options['
|
|
30
|
+
? Options['$array']
|
|
31
31
|
: T['length'] extends 0
|
|
32
32
|
? Options['caseEmptyTuple']
|
|
33
33
|
: T['length'] extends 1
|
|
@@ -38,11 +38,11 @@ export type DropFirst<
|
|
|
38
38
|
|
|
39
39
|
export namespace DropFirst {
|
|
40
40
|
export interface Options {
|
|
41
|
-
|
|
41
|
+
$array?: unknown,
|
|
42
42
|
caseEmptyTuple?: unknown,
|
|
43
43
|
}
|
|
44
44
|
export interface DefaultOptions<T> {
|
|
45
|
-
|
|
45
|
+
$array: T,
|
|
46
46
|
caseEmptyTuple: []
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -63,7 +63,7 @@ export namespace DropFirst {
|
|
|
63
63
|
* type R = DropLast<string[]> // string[]
|
|
64
64
|
* ```
|
|
65
65
|
*
|
|
66
|
-
* @typeParam Options['
|
|
66
|
+
* @typeParam Options['$array'] Return type when `T` is `Array`.
|
|
67
67
|
* Default to `T`.
|
|
68
68
|
*
|
|
69
69
|
* @typeParam Options['caseEmptyTuple'] Return type when `T` is an empty tuple.
|
|
@@ -73,7 +73,7 @@ export type DropLast<
|
|
|
73
73
|
T extends unknown[],
|
|
74
74
|
Cases extends DropLast.Options = DropLast.DefaultOptions<T>
|
|
75
75
|
> = number extends T['length']
|
|
76
|
-
? Cases['
|
|
76
|
+
? Cases['$array']
|
|
77
77
|
: T['length'] extends 0
|
|
78
78
|
? Cases['caseEmptyTuple']
|
|
79
79
|
: T['length'] extends 1
|
|
@@ -85,11 +85,11 @@ export type DropLast<
|
|
|
85
85
|
|
|
86
86
|
export namespace DropLast {
|
|
87
87
|
export interface Options {
|
|
88
|
-
|
|
88
|
+
$array?: unknown,
|
|
89
89
|
caseEmptyTuple?: unknown,
|
|
90
90
|
}
|
|
91
91
|
export interface DefaultOptions<T> {
|
|
92
|
-
|
|
92
|
+
$array: T,
|
|
93
93
|
caseEmptyTuple: []
|
|
94
94
|
}
|
|
95
95
|
}
|
package/ts/tuple/readme.md
CHANGED
|
@@ -106,7 +106,7 @@ Overridable cases:
|
|
|
106
106
|
|
|
107
107
|
## [CommonPropKeys](./common_prop_keys.ts#l22)
|
|
108
108
|
|
|
109
|
-
`CommonPropKeys<T extends Record[], Options = {
|
|
109
|
+
`CommonPropKeys<T extends Record[], Options = { $never }>`
|
|
110
110
|
|
|
111
111
|
⚗️ *transform*
|
|
112
112
|
🔢 *customizable*
|
|
@@ -120,15 +120,15 @@ type R = CommonPropKeys<[{ a: 1, c: 1 }, { b: 1, c: 2 }]> // 'c'
|
|
|
120
120
|
type R = CommonPropKeys<[{ a: 1 }, { b: 1 }]> // never
|
|
121
121
|
type R = CommonPropKeys<Array<{ a: 1, b: 1 } | { a: 1, c: 1 }>> // 'a'
|
|
122
122
|
type R = CommonPropKeys<[{ a: 1 }, { b: 1 }]> // never
|
|
123
|
-
type R = CommonPropKeys<never> //
|
|
123
|
+
type R = CommonPropKeys<never> // $never: never
|
|
124
124
|
|
|
125
125
|
// customization
|
|
126
|
-
type R = CommonPropKeys<never, {
|
|
126
|
+
type R = CommonPropKeys<never, { $never: 1 }> // 1
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
## [DropFirst](./drop.ts#l26)
|
|
130
130
|
|
|
131
|
-
`DropFirst<T extends unknown[], Options = {
|
|
131
|
+
`DropFirst<T extends unknown[], Options = { $array, caseEmptyTuple }>`
|
|
132
132
|
|
|
133
133
|
⚗️ *transform*
|
|
134
134
|
🔢 *customizable*
|
|
@@ -140,11 +140,11 @@ import { DropFirst } from 'type-plus'
|
|
|
140
140
|
|
|
141
141
|
type R = DropFirst<[1, 2, 3]> // [2, 3]
|
|
142
142
|
type R = DropFirst<[string]> // []
|
|
143
|
-
type R = DropFirst<string[]> //
|
|
143
|
+
type R = DropFirst<string[]> // $array: string[]
|
|
144
144
|
type R = DropFirst<[]> // caseEmptyTuple: []
|
|
145
145
|
|
|
146
146
|
// customization
|
|
147
|
-
type R = DropFirst<string[], {
|
|
147
|
+
type R = DropFirst<string[], { $array: 1 }> // 1
|
|
148
148
|
type R = DropFirst<[], { caseEmptyTuple: 1 }> // 1
|
|
149
149
|
```
|
|
150
150
|
|
|
@@ -162,11 +162,11 @@ import { DropLast } from 'type-plus'
|
|
|
162
162
|
|
|
163
163
|
type R = DropLast<[1, 2, 3]> // [2, 3]
|
|
164
164
|
type R = DropLast<[string]> // []
|
|
165
|
-
type R = DropLast<string[]> //
|
|
165
|
+
type R = DropLast<string[]> // $array: string[]
|
|
166
166
|
type R = DropLast<[]> // caseEmptyTuple: []
|
|
167
167
|
|
|
168
168
|
// customization
|
|
169
|
-
type R = DropLast<string[], {
|
|
169
|
+
type R = DropLast<string[], { $array: 1 }> // 1
|
|
170
170
|
type R = DropLast<[], { caseEmptyTuple: 1 }> // 1
|
|
171
171
|
```
|
|
172
172
|
|
|
@@ -191,7 +191,7 @@ The input type are not checked and assumed to be *tuple*.
|
|
|
191
191
|
|
|
192
192
|
## [TuplePlus.CommonPropKeys](./tuple_plus.common_prop_keys.ts#l22)
|
|
193
193
|
|
|
194
|
-
`TuplePlus.CommonPropKeys<T extends Record[], Options = {
|
|
194
|
+
`TuplePlus.CommonPropKeys<T extends Record[], Options = { $never }>`
|
|
195
195
|
|
|
196
196
|
⚗️ *transform*
|
|
197
197
|
🔢 *customizable*
|
|
@@ -205,10 +205,10 @@ type R = TuplePlus.CommonPropKeys<[{ a: 1, c: 1 }, { b: 1, c: 2 }]> // 'c'
|
|
|
205
205
|
type R = TuplePlus.CommonPropKeys<[{ a: 1 }, { b: 1 }]> // never
|
|
206
206
|
type R = TuplePlus.CommonPropKeys<Array<{ a: 1, b: 1 } | { a: 1, c: 1 }>> // 'a'
|
|
207
207
|
type R = TuplePlus.CommonPropKeys<[{ a: 1 }, { b: 1 }]> // never
|
|
208
|
-
type R = TuplePlus.CommonPropKeys<never> //
|
|
208
|
+
type R = TuplePlus.CommonPropKeys<never> // $never: never
|
|
209
209
|
|
|
210
210
|
// customization
|
|
211
|
-
type R = TuplePlus.CommonPropKeys<never, {
|
|
211
|
+
type R = TuplePlus.CommonPropKeys<never, { $never: 1 }> // 1
|
|
212
212
|
```
|
|
213
213
|
|
|
214
214
|
### [TuplePlus.Filter](./tuple_plus.filter.ts)
|
|
@@ -227,7 +227,7 @@ type R = TuplePlus.Filter<[1, 2, '3'], number> // [1, 2]
|
|
|
227
227
|
|
|
228
228
|
### [`TuplePlus.Find`](./tuple_plus.find.ts#l51)
|
|
229
229
|
|
|
230
|
-
`TuplePlus.Find<A, Criteria, Options { widen,
|
|
230
|
+
`TuplePlus.Find<A, Criteria, Options { widen, $array, caseEmptyTuple, $never, $notMatch, $widen, $unionNotMatch }>`
|
|
231
231
|
|
|
232
232
|
🦴 *utilities*
|
|
233
233
|
🔢 *customizable*
|
|
@@ -246,12 +246,12 @@ type R = TuplePlus.Find<[true, 1, 'x'], 2> // never
|
|
|
246
246
|
|
|
247
247
|
// customization
|
|
248
248
|
type R = TuplePlus.Find<[number], 1, { widen: false }> // never
|
|
249
|
-
type R = TuplePlus.Find<[number], 1, {
|
|
250
|
-
type R = TuplePlus.Find<string[], 1, {
|
|
249
|
+
type R = TuplePlus.Find<[number], 1, { $widen: never }> // never
|
|
250
|
+
type R = TuplePlus.Find<string[], 1, { $array: 2 }> // 2
|
|
251
251
|
type R = TuplePlus.Find<[], 1, { caseEmptyTuple: 2 }> // 2
|
|
252
|
-
type R = TuplePlus.Find<never, 1, {
|
|
253
|
-
type R = TuplePlus.Find<[string], number, {
|
|
254
|
-
type R = TuplePlus.Find<[string | number], number, {
|
|
252
|
+
type R = TuplePlus.Find<never, 1, { $never: 2 }> // 2
|
|
253
|
+
type R = TuplePlus.Find<[string], number, { $notMatch: 2 }> // 2
|
|
254
|
+
type R = TuplePlus.Find<[string | number], number, { $unionNotMatch: undefined }> // number | undefined
|
|
255
255
|
```
|
|
256
256
|
|
|
257
257
|
### [TuplePlus.PadStart](./tuple_plus.pad_start.ts)
|
package/ts/tuple/tail.ts
CHANGED
|
@@ -3,10 +3,8 @@ import type { UnionOfValues } from '../array/union_of_values.js'
|
|
|
3
3
|
/**
|
|
4
4
|
* Gets the types of a tuple except the first entry.
|
|
5
5
|
*/
|
|
6
|
-
export type Tail<T extends
|
|
6
|
+
export type Tail<T extends readonly unknown[]> = T['length'] extends 0
|
|
7
7
|
? never
|
|
8
|
-
: T extends [any, ...infer Tail]
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
: never
|
|
12
|
-
: T
|
|
8
|
+
: (T extends readonly [any, ...infer Tail]
|
|
9
|
+
? Tail extends UnionOfValues<T>[] ? Tail : never
|
|
10
|
+
: T)
|