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
|
@@ -1,45 +1,74 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NeverType } from '../never/never_type.js'
|
|
2
|
+
import type { IsTuple } from '../tuple/tuple_type.js'
|
|
3
|
+
import type { IndexAt } from './array_plus.index_at.js'
|
|
2
4
|
import type { ArrayType } from './array_type.js'
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
|
-
*
|
|
7
|
+
* ⚗️ *transform*
|
|
8
|
+
*
|
|
9
|
+
* Splits array or tuple `A` into two at the specified `Index`.
|
|
6
10
|
*
|
|
7
11
|
* If the `Index` is out of bounds,
|
|
8
|
-
* it will set to the boundary value
|
|
12
|
+
* it will set to the boundary value.
|
|
13
|
+
*
|
|
14
|
+
* It is the type level `splice()`.
|
|
9
15
|
*
|
|
10
16
|
* @example
|
|
11
17
|
* ```ts
|
|
12
|
-
* SplitAt<[1, 2, 3, 4, 5], 0> // [[], [1, 2, 3, 4, 5]]
|
|
13
|
-
* SplitAt<[1, 2, 3, 4, 5], -5> // [[], [1, 2, 3, 4, 5]]
|
|
14
|
-
*
|
|
15
18
|
* SplitAt<[1, 2, 3, 4, 5], 2> // [[1, 2], [3, 4, 5]]
|
|
19
|
+
* SplitAt<[1, 2, 3, 4, 5], -3> // [[1, 2], [3, 4, 5]]
|
|
16
20
|
*
|
|
17
|
-
* SplitAt<[1, 2, 3, 4, 5],
|
|
18
|
-
* SplitAt<[1, 2, 3, 4, 5], -1> // [[1, 2, 3, 4], [5]]
|
|
21
|
+
* SplitAt<[1, 2, 3, 4, 5], 2, 2> // [[1, 2, 5], [3, 4]]
|
|
19
22
|
*
|
|
20
|
-
* SplitAt<[1, 2, 3, 4, 5],
|
|
23
|
+
* SplitAt<[1, 2, 3, 4, 5], 2, 2, ['a', 'b']> // [[1, 2, 'a', 'b', 5], [3, 4]]
|
|
21
24
|
*
|
|
22
25
|
* // out of bound resets to boundary
|
|
23
26
|
* SplitAt<[1, 2, 3, 4, 5], 6> // [[1, 2, 3, 4, 5], []]
|
|
24
27
|
* SplitAt<[1, 2, 3, 4, 5], -6> // [[], [1, 2, 3, 4, 5]]
|
|
25
28
|
* ```
|
|
26
29
|
*/
|
|
27
|
-
export type SplitAt<
|
|
30
|
+
export type SplitAt<
|
|
31
|
+
A extends readonly unknown[],
|
|
32
|
+
Index extends number,
|
|
33
|
+
DeleteCount extends number | never = never,
|
|
34
|
+
Insert extends readonly unknown[] | never = never
|
|
35
|
+
> = ArrayType<
|
|
28
36
|
A,
|
|
29
37
|
[A, A],
|
|
30
|
-
|
|
38
|
+
SplitAt._<A, [], [], IndexAt._<A, Index>, DeleteCount, Insert>
|
|
31
39
|
>
|
|
32
40
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
> =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
export namespace SplitAt {
|
|
42
|
+
export type _<
|
|
43
|
+
A extends readonly unknown[],
|
|
44
|
+
B extends readonly unknown[],
|
|
45
|
+
C extends readonly unknown[],
|
|
46
|
+
Index extends number,
|
|
47
|
+
DeleteCount,
|
|
48
|
+
Insert extends readonly unknown[],
|
|
49
|
+
> = 0 extends A['length']
|
|
50
|
+
? IsTuple<Insert, [[...Insert, ...B], C], [B, C]>
|
|
51
|
+
: (Index extends B['length']
|
|
52
|
+
? NeverType<
|
|
53
|
+
DeleteCount,
|
|
54
|
+
[B, A],
|
|
55
|
+
_D<A, B, C, DeleteCount, Insert>>
|
|
56
|
+
: (A extends readonly [infer Head, ...infer Tail]
|
|
57
|
+
? _<Tail, [...B, Head], [], Index, DeleteCount, Insert>
|
|
58
|
+
: 'unexpected: A does not extends [Head, ...Tail]'))
|
|
59
|
+
|
|
60
|
+
export type _D<
|
|
61
|
+
A extends readonly unknown[],
|
|
62
|
+
B extends readonly unknown[],
|
|
63
|
+
C extends readonly unknown[],
|
|
64
|
+
DeleteCount,
|
|
65
|
+
Insert extends readonly unknown[],
|
|
66
|
+
> = DeleteCount extends C['length']
|
|
67
|
+
? IsTuple<Insert, [[...B, ...Insert, ...A], C], [[...B, ...A], C]>
|
|
68
|
+
: (A extends readonly [infer Head, ...infer Tail]
|
|
69
|
+
? _D<Tail, B, [...C, Head], DeleteCount, Insert>
|
|
70
|
+
: IsTuple<Insert, [[...Insert, ...B], C], [B, C]>
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
}
|
|
74
|
+
|
package/ts/array/array_plus.ts
CHANGED
|
@@ -3,12 +3,14 @@ export type { Entries } from './array.entries.js'
|
|
|
3
3
|
export type { FindLast } from './array.find_last.js'
|
|
4
4
|
export type { Reverse } from './array.reverse.js'
|
|
5
5
|
export type { Some } from './array.some.js'
|
|
6
|
-
export type { IndexAt, IsIndexOutOfBound } from './array_index.js'
|
|
7
6
|
export type { CommonPropKeys } from './array_plus.common_prop_keys.js'
|
|
8
7
|
export type { Concat } from './array_plus.concat.js'
|
|
9
8
|
export type { DropMatch } from './array_plus.drop_match.js'
|
|
10
9
|
export type { ElementMatch } from './array_plus.element_match.js'
|
|
11
10
|
export type { Filter } from './array_plus.filter.js'
|
|
12
11
|
export type { Find } from './array_plus.find.js'
|
|
12
|
+
export type { IndexAt } from './array_plus.index_at.js'
|
|
13
|
+
export type { IsIndexOutOfBound } from './array_plus.is_index_out_of_bound.js'
|
|
14
|
+
export type { IsReadonly } from './array_plus.is_readonly.js'
|
|
13
15
|
export type { PadStart } from './array_plus.pad_start.js'
|
|
14
16
|
export type { SplitAt } from './array_plus.split_at.js'
|
package/ts/array/array_type.ts
CHANGED
|
@@ -18,7 +18,11 @@ import type { StrictNumberType } from '../number/strict_number_type.js'
|
|
|
18
18
|
export type ArrayType<T, Then = T, Else = never> = IsNever<
|
|
19
19
|
T,
|
|
20
20
|
Else,
|
|
21
|
-
[
|
|
21
|
+
[never[]] extends [T]
|
|
22
|
+
? ([T] extends [readonly any[]]
|
|
23
|
+
? StrictNumberType<T['length'], Then, Else>
|
|
24
|
+
: Else)
|
|
25
|
+
: Else
|
|
22
26
|
>
|
|
23
27
|
|
|
24
28
|
/**
|
package/ts/array/filter.ts
CHANGED
|
@@ -12,7 +12,7 @@ import type { Filter as FilterArray } from './array_plus.filter.js'
|
|
|
12
12
|
* type R = Filter<Array<string | undefined>, string> // string[]
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
export type Filter<A extends unknown[], Criteria> = number extends A['length']
|
|
15
|
+
export type Filter<A extends readonly unknown[], Criteria> = number extends A['length']
|
|
16
16
|
? FilterArray<A, Criteria>
|
|
17
17
|
: FilterTuple<A, Criteria>
|
|
18
18
|
|
|
@@ -29,4 +29,4 @@ export type Filter<A extends unknown[], Criteria> = number extends A['length']
|
|
|
29
29
|
* type R = KeepMatch<Array<string|undefined>, string> // string[]
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
export type KeepMatch<A extends unknown[], Criteria> = Filter<A, Criteria>
|
|
32
|
+
export type KeepMatch<A extends readonly unknown[], Criteria> = Filter<A, Criteria>
|
package/ts/array/find_first.ts
CHANGED
|
@@ -31,26 +31,26 @@ import type { Find as ArrayFind } from './array_plus.find.js'
|
|
|
31
31
|
* With widen match, a narrowed type will match its widen type.
|
|
32
32
|
* e.g. matching `1` against `number` yields `1 | undefined`
|
|
33
33
|
*
|
|
34
|
-
* The widen behavior can be customized by `Options['
|
|
34
|
+
* The widen behavior can be customized by `Options['$widen']`
|
|
35
35
|
*
|
|
36
36
|
* @typeParam Options['caseEmptyTuple'] return type when `A` is an empty tuple.
|
|
37
37
|
* Default to `never`.
|
|
38
38
|
*
|
|
39
|
-
* @typeParam Options['
|
|
39
|
+
* @typeParam Options['$never'] return type when `A` is `never`. Default to `never`.
|
|
40
40
|
*
|
|
41
|
-
* @typeParam Options['
|
|
41
|
+
* @typeParam Options['$noMatch'] Return value when `T` does not match `Criteria`.
|
|
42
42
|
* Default to `never`.
|
|
43
43
|
*
|
|
44
|
-
* @typeParam Options['
|
|
44
|
+
* @typeParam Options['$widen'] return type when `T` in `A` is a widen type of `Criteria`.
|
|
45
45
|
* Default to `Criteria | undefined`.
|
|
46
46
|
* Set it to `never` for a more type-centric behavior
|
|
47
47
|
*
|
|
48
|
-
* @typeParam Options['
|
|
48
|
+
* @typeParam Options['$unionMiss'] Return value when a branch of the union `T` does not match `Criteria`.
|
|
49
49
|
* Default to `undefined`.
|
|
50
50
|
* Since it is a union, the result will be join to the matched branch as union.
|
|
51
51
|
*/
|
|
52
52
|
export type FindFirst<
|
|
53
|
-
A extends unknown[],
|
|
53
|
+
A extends readonly unknown[],
|
|
54
54
|
Criteria, Options extends FindFirst.Options = FindFirst.DefaultOptions<Criteria>
|
|
55
55
|
> = TupleType<
|
|
56
56
|
A,
|
package/ts/array/head.ts
CHANGED
|
@@ -14,18 +14,18 @@ import type { NeverType } from '../never/never_type.js'
|
|
|
14
14
|
* type R = Head<[]> // never
|
|
15
15
|
* ```
|
|
16
16
|
*
|
|
17
|
-
* @typeParam Options['
|
|
17
|
+
* @typeParam Options['$never'] Return type when `T` is `never`.
|
|
18
18
|
* Default to `never`.
|
|
19
19
|
*
|
|
20
20
|
* @typeParam Options['caseEmptyTuple'] Return type when `T` is `[]`.
|
|
21
21
|
* Default to `never`.
|
|
22
22
|
*/
|
|
23
23
|
export type Head<
|
|
24
|
-
T extends unknown[],
|
|
24
|
+
T extends readonly unknown[],
|
|
25
25
|
Options extends Head.Options = Head.DefaultOptions
|
|
26
26
|
> = NeverType<
|
|
27
27
|
T,
|
|
28
|
-
Options['
|
|
28
|
+
Options['$never'],
|
|
29
29
|
T['length'] extends 0 ? Options['caseEmptyTuple'] : T[0]
|
|
30
30
|
>
|
|
31
31
|
|
|
@@ -6,7 +6,7 @@ import type { Tail } from '../tuple/tail.js'
|
|
|
6
6
|
*
|
|
7
7
|
* Gets the intersect of properties of the elements in `A`.
|
|
8
8
|
*/
|
|
9
|
-
export type IntersectOfProps<A extends Record<any, unknown>[], P extends KeyTypes> = number extends A['length']
|
|
9
|
+
export type IntersectOfProps<A extends readonly Record<any, unknown>[], P extends KeyTypes> = number extends A['length']
|
|
10
10
|
? A[0][P]
|
|
11
11
|
: A['length'] extends 0
|
|
12
12
|
? never
|
package/ts/array/last.ts
CHANGED
|
@@ -13,18 +13,20 @@ import type { NeverType } from '../never/never_type.js'
|
|
|
13
13
|
* type R = Last<[]> // never
|
|
14
14
|
* ```
|
|
15
15
|
*
|
|
16
|
-
* @typeParam Options['
|
|
16
|
+
* @typeParam Options['$never'] Return type when `T` is `never`.
|
|
17
17
|
* Default to `never`.
|
|
18
18
|
*
|
|
19
19
|
* @typeParam Options['caseEmptyTuple'] Return type when `T` is `[]`.
|
|
20
20
|
* Default to `never`.
|
|
21
21
|
*/
|
|
22
22
|
export type Last<
|
|
23
|
-
T extends unknown[],
|
|
23
|
+
T extends readonly unknown[],
|
|
24
24
|
Options extends Last.Options = Last.DefaultOptions
|
|
25
25
|
> = NeverType<T,
|
|
26
|
-
Options['
|
|
27
|
-
T['length'] extends 0
|
|
26
|
+
Options['$never'],
|
|
27
|
+
T['length'] extends 0
|
|
28
|
+
? Options['caseEmptyTuple']
|
|
29
|
+
: T extends readonly [...unknown[], infer R] ? R : T[0]
|
|
28
30
|
>
|
|
29
31
|
|
|
30
32
|
export namespace Last {
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { IsAnyOrNever } from '../mix_types/any_or_never_type.js'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 🌪️ *filter*
|
|
5
|
+
* 🚧 *temporary*
|
|
6
|
+
*
|
|
7
|
+
* Filter `T` to ensure it is an array or tuple.
|
|
8
|
+
*
|
|
9
|
+
* This is a temporary type before `ArrayType` is adjusted to loose check in the next version.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* type R = LooseArrayType<number[]> // number[]
|
|
14
|
+
* type R = LooseArrayType<[1]> // [1]
|
|
15
|
+
* type R = LooseArrayType<number[] | 1> // number[]
|
|
16
|
+
* type R = LooseArrayType<number[] & 1> // number[]s
|
|
17
|
+
*
|
|
18
|
+
* type R = LooseArrayType<string> // never
|
|
19
|
+
* ```
|
|
20
|
+
*/export type LooseArrayType<T, Then = T, Else = never> = IsAnyOrNever<
|
|
21
|
+
T,
|
|
22
|
+
Else,
|
|
23
|
+
T extends readonly any[] ? Then : Else
|
|
24
|
+
>
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 🎭 *validate*
|
|
28
|
+
*
|
|
29
|
+
* Validate that `T` is an array or tuple.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* type R = IsLooseArray<number[]> // true
|
|
34
|
+
* type R = IsLooseArray<[1]> // true
|
|
35
|
+
*
|
|
36
|
+
* type R = IsLooseArray<number> // false
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export type IsLooseArray<T, Then = true, Else = false> = LooseArrayType<T, Then, Else>
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 🌪️ *filter*
|
|
43
|
+
*
|
|
44
|
+
* Filter `T` to ensure it is not an array nor tuple.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* type R = NotLooseArrayType<number[]> // never
|
|
49
|
+
* type R = NotLooseArrayType<[1]> // never
|
|
50
|
+
*
|
|
51
|
+
* type R = NotLooseArrayType<number> // number
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export type NotLooseArrayType<T, Then = T, Else = never> = LooseArrayType<T, Else, Then>
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 🎭 *validate*
|
|
58
|
+
*
|
|
59
|
+
* Validate that `T` is not an array nor tuple.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* type R = IsNotLooseArray<number[]> // false
|
|
64
|
+
* type R = IsNotLooseArray<[1]> // false
|
|
65
|
+
*
|
|
66
|
+
* type R = IsNotLooseArray<number> // true
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export type IsNotLooseArray<T, Then = true, Else = false> = LooseArrayType<T, Else, Then>
|
package/ts/array/pad_start.ts
CHANGED
package/ts/array/readme.md
CHANGED
|
@@ -14,7 +14,7 @@ The `ArrayType<T>` and friends are used to check if a type is exactly `Array<T>`
|
|
|
14
14
|
They are strict type checks, meaning they match only the type `Array<T>`,
|
|
15
15
|
and not [tuple], [union], or intersection types.
|
|
16
16
|
|
|
17
|
-
### [ArrayType](./array_type.ts#
|
|
17
|
+
### [ArrayType](./array_type.ts#l18)
|
|
18
18
|
|
|
19
19
|
`ArrayType<T, Then = T, Else = never>`
|
|
20
20
|
|
|
@@ -32,7 +32,7 @@ type R = ArrayType<number[] | 1> // never
|
|
|
32
32
|
type R = ArrayType<number[] & { a: 1 }> // never
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
### [IsArray](./array_type.ts#
|
|
35
|
+
### [IsArray](./array_type.ts#l41)
|
|
36
36
|
|
|
37
37
|
`IsArray<T, Then = true, Else = false>`
|
|
38
38
|
|
|
@@ -49,7 +49,7 @@ type R = IsArray<number> // false
|
|
|
49
49
|
type R = IsArray<[1]> // false
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
### [NotArrayType](./array_type.ts#
|
|
52
|
+
### [NotArrayType](./array_type.ts#l58)
|
|
53
53
|
|
|
54
54
|
`NotArrayType<T, Then = T, Else = never>`
|
|
55
55
|
|
|
@@ -66,7 +66,7 @@ type R = NotArrayType<number> // number
|
|
|
66
66
|
type R = NotArrayType<[1]> // [1]
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
### [IsNotArrayType](./array_type.ts#
|
|
69
|
+
### [IsNotArrayType](./array_type.ts#l75)
|
|
70
70
|
|
|
71
71
|
`IsNotArrayType<T, Then = true, Else = false>`
|
|
72
72
|
|
|
@@ -113,7 +113,7 @@ If the `N` is out of bound,
|
|
|
113
113
|
or `N` is not a valid index,
|
|
114
114
|
`ArrayPlus.At` will return the `Fail` case, which defaults to `never`.
|
|
115
115
|
|
|
116
|
-
## [`Concat`](./
|
|
116
|
+
## [`Concat`](./array_plus.concat.ts#l15)
|
|
117
117
|
|
|
118
118
|
`Concat<A, B>`
|
|
119
119
|
|
|
@@ -129,7 +129,7 @@ You are encouraged to use `[...A, ...B]` directly.
|
|
|
129
129
|
|
|
130
130
|
## [`FindFirst`](./find_first.ts#l52)
|
|
131
131
|
|
|
132
|
-
`FindFirst<A, Criteria, Options = { widen, caseEmptyTuple,
|
|
132
|
+
`FindFirst<A, Criteria, Options = { widen, caseEmptyTuple, $never, $noMatch, $widen, $unionMiss }>`
|
|
133
133
|
|
|
134
134
|
🦴 *utilities*
|
|
135
135
|
🔢 *customizable*
|
|
@@ -154,14 +154,14 @@ type R = FindFirst<string[], number> // never
|
|
|
154
154
|
|
|
155
155
|
// customization
|
|
156
156
|
type R = FindFirst<[number], 1, { widen: false }> // never
|
|
157
|
-
type R = FindFirst<[number], 1, {
|
|
157
|
+
type R = FindFirst<[number], 1, { $widen: never }> // never
|
|
158
158
|
type R = FindFirst<[], 1, { caseEmptyTuple: 2 }> // 2
|
|
159
|
-
type R = FindFirst<never, 1, {
|
|
160
|
-
type R = FindFirst<[string], number, {
|
|
161
|
-
type R = FindFirst<[string | number], number, {
|
|
159
|
+
type R = FindFirst<never, 1, { $never: 2 }> // 2
|
|
160
|
+
type R = FindFirst<[string], number, { $notMatch: 2 }> // 2
|
|
161
|
+
type R = FindFirst<[string | number], number, { $unionNotMatch: undefined }> // number | undefined
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
## [`FindLast`](./array.find_last.
|
|
164
|
+
## [`FindLast`](./array.find_last.tsl19)
|
|
165
165
|
|
|
166
166
|
## [`Some`](./array.some.ts)
|
|
167
167
|
|
|
@@ -198,7 +198,7 @@ type R = KeepMatch<Array<string | undefined>, string> // string[]
|
|
|
198
198
|
|
|
199
199
|
## [`Head`](./head.ts#l23)
|
|
200
200
|
|
|
201
|
-
`Head<T, Options = {
|
|
201
|
+
`Head<T, Options = { $never, caseEmptyTuple }>`
|
|
202
202
|
|
|
203
203
|
🦴 *utilities*
|
|
204
204
|
🔢 *customizable*
|
|
@@ -210,11 +210,11 @@ import type { Head } from 'type-plus'
|
|
|
210
210
|
|
|
211
211
|
type R = Head<[1, 2, 3]> // 1
|
|
212
212
|
type R = Head<string[]> // string
|
|
213
|
-
type R = Head<never> //
|
|
213
|
+
type R = Head<never> // $never: never
|
|
214
214
|
type R = Head<[]> // caseEmptyTuple: never
|
|
215
215
|
|
|
216
216
|
// customization
|
|
217
|
-
type R = Head<never, {
|
|
217
|
+
type R = Head<never, { $never: 1 }> // 1
|
|
218
218
|
type R = Head<[], { caseEmptyTuple: undefined }> // undefined
|
|
219
219
|
```
|
|
220
220
|
|
|
@@ -224,7 +224,7 @@ type R = Head<[], { caseEmptyTuple: undefined }> // undefined
|
|
|
224
224
|
|
|
225
225
|
## [`Last`](./last.ts#l23)
|
|
226
226
|
|
|
227
|
-
`Last<T, Options = {
|
|
227
|
+
`Last<T, Options = { $never, caseEmptyTuple }>`
|
|
228
228
|
|
|
229
229
|
🦴 *utilities*
|
|
230
230
|
🔢 *customizable*
|
|
@@ -236,11 +236,11 @@ import type { Last } from 'type-plus'
|
|
|
236
236
|
|
|
237
237
|
type R = Last<[1, 2, 3]> // 3
|
|
238
238
|
type R = Last<string[]> // string
|
|
239
|
-
type R = Last<never> //
|
|
239
|
+
type R = Last<never> // $never: never
|
|
240
240
|
type R = Last<[]> // caseEmptyTuple: never
|
|
241
241
|
|
|
242
242
|
// customization
|
|
243
|
-
type R = Last<never, {
|
|
243
|
+
type R = Last<never, { $never: 1 }> // 1
|
|
244
244
|
type R = Last<[], { caseEmptyTuple: undefined }> // undefined
|
|
245
245
|
```
|
|
246
246
|
|
|
@@ -273,9 +273,9 @@ please check [`TuplePlus`](../tuple/readme.md#TuplePlus).
|
|
|
273
273
|
|
|
274
274
|
Alias of [At](#at).
|
|
275
275
|
|
|
276
|
-
|
|
276
|
+
### [ArrayPlus.CommonPropKeys](./array_plus.common_prop_keys.ts#l21)
|
|
277
277
|
|
|
278
|
-
`ArrayPlus.CommonPropKeys<T extends Record[], Options = {
|
|
278
|
+
`ArrayPlus.CommonPropKeys<T extends Record[], Options = { $never }>`
|
|
279
279
|
|
|
280
280
|
⚗️ *transform*
|
|
281
281
|
🔢 *customizable*
|
|
@@ -289,7 +289,7 @@ type R = ArrayPlus.CommonPropKeys<Array<{ a: 1 }>> // 'a'
|
|
|
289
289
|
type R = ArrayPlus.CommonPropKeys<Array<{ a: 1, b: 1 } | { a: 1, c: 1 }>> // 'a'
|
|
290
290
|
|
|
291
291
|
// customization
|
|
292
|
-
type R = ArrayPlus.CommonPropKeys<never, {
|
|
292
|
+
type R = ArrayPlus.CommonPropKeys<never, { $never: 1 }> // 1
|
|
293
293
|
```
|
|
294
294
|
|
|
295
295
|
### [`ArrayPlus.Concat`](./array.concat.ts#l12)
|
|
@@ -300,7 +300,7 @@ Alias of [Concat](#concat).
|
|
|
300
300
|
|
|
301
301
|
### [`ArrayPlus.ElementMatch`](./array_plus.element_match.ts#l30)
|
|
302
302
|
|
|
303
|
-
`ArrayPlus.ElementMatch<T, Criteria, Options = { widen,
|
|
303
|
+
`ArrayPlus.ElementMatch<T, Criteria, Options = { widen, $notMatch, $widen, $unionNotMatch }>`
|
|
304
304
|
|
|
305
305
|
🌪️ *filter*
|
|
306
306
|
🔢 *customizable*
|
|
@@ -317,10 +317,10 @@ type R = ArrayPlus.ElementMatch<number, 1> // widen: 1
|
|
|
317
317
|
type R = ArrayPlus.ElementMatch<number | string, number> // unionNotMatch: number
|
|
318
318
|
|
|
319
319
|
// customization
|
|
320
|
-
type R = ArrayPlus.ElementMatch<number, string, {
|
|
320
|
+
type R = ArrayPlus.ElementMatch<number, string, { $notMatch: 1 }> // 1
|
|
321
321
|
type R = ArrayPlus.ElementMatch<number, 1, { widen: false }> // never
|
|
322
|
-
type R = ArrayPlus.ElementMatch<number, 1, {
|
|
323
|
-
type R = ArrayPlus.ElementMatch<number | string, number, {
|
|
322
|
+
type R = ArrayPlus.ElementMatch<number, 1, { $widen: never }> // never
|
|
323
|
+
type R = ArrayPlus.ElementMatch<number | string, number, { $unionNotMatch: undefined }> // number | undefined
|
|
324
324
|
```
|
|
325
325
|
|
|
326
326
|
### [`ArrayPlus.Entries`](./array.entries.ts#L14)
|
|
@@ -337,9 +337,26 @@ type R = ArrayPlus.Entries<Array<string | number>> // Array<[number, string | nu
|
|
|
337
337
|
type R = ArrayPlus.Entries<[1, 2, 3]> // [[0, 1], [1, 2], [2, 3]]
|
|
338
338
|
```
|
|
339
339
|
|
|
340
|
+
### [`ArrayPlus.Filter`](./array_plus.filter.ts#l11)
|
|
341
|
+
|
|
342
|
+
`ArrayPlus.Filter<A, Criteria, Options = { $notArray }>`
|
|
343
|
+
|
|
344
|
+
⚗️ *transform*
|
|
345
|
+
🔢 *customizable*
|
|
346
|
+
|
|
347
|
+
Filter the array `A`, keeping entries satisfying `Criteria`.
|
|
348
|
+
|
|
349
|
+
```ts
|
|
350
|
+
type R = Filter<Array<string | undefined>, string> // string[]
|
|
351
|
+
|
|
352
|
+
// customization
|
|
353
|
+
type R = Filter<never, string, { caseNever: 1 }> // 1
|
|
354
|
+
type R = Filter<['x'], string, { $notArray: 1 }> // 1
|
|
355
|
+
```
|
|
356
|
+
|
|
340
357
|
### [`ArrayPlus.Find`](./array_plus.find.ts#l49)
|
|
341
358
|
|
|
342
|
-
`ArrayPlus.Find<A, Criteria, Options { widen,
|
|
359
|
+
`ArrayPlus.Find<A, Criteria, Options { widen, $never, $notMatch, $tuple, $widen, $unionNotMatch }>`
|
|
343
360
|
|
|
344
361
|
🦴 *utilities*
|
|
345
362
|
🔢 *customizable*
|
|
@@ -359,11 +376,11 @@ type R = ArrayPlus.Find<string[], number> // never
|
|
|
359
376
|
|
|
360
377
|
// customization
|
|
361
378
|
type R = ArrayPlus.Find<number[], 1, { widen: false }> // never
|
|
362
|
-
type R = ArrayPlus.Find<number[], 1, {
|
|
363
|
-
type R = ArrayPlus.Find<never, 1, {
|
|
364
|
-
type R = ArrayPlus.Find<string[], number, {
|
|
365
|
-
type R = ArrayPlus.Find<[], 1, {
|
|
366
|
-
type R = ArrayPlus.Find<Array<string | number>, number, {
|
|
379
|
+
type R = ArrayPlus.Find<number[], 1, { $widen: never }> // never
|
|
380
|
+
type R = ArrayPlus.Find<never, 1, { $never: 2 }> // 2
|
|
381
|
+
type R = ArrayPlus.Find<string[], number, { $notMatch: 2 }> // 2
|
|
382
|
+
type R = ArrayPlus.Find<[], 1, { $tuple: 2 }> // 2
|
|
383
|
+
type R = ArrayPlus.Find<Array<string | number>, number, { $unionNotMatch: undefined }> // number | undefined
|
|
367
384
|
```
|
|
368
385
|
|
|
369
386
|
### [`ArrayPlus.FindLast`](./array.find_last.ts#L17)
|
|
@@ -382,7 +399,60 @@ ArrayPlus.FindLast<Array<1 | 2 | 'x'>, number> // 1 | 2 | undefined
|
|
|
382
399
|
ArrayPlus.FindLast<[true, 123, 'x', 321], number> // 321
|
|
383
400
|
```
|
|
384
401
|
|
|
385
|
-
### [`ArrayPlus.
|
|
402
|
+
### [`ArrayPlus.IndexAt](./array_plus.index_at.ts#l25)
|
|
403
|
+
|
|
404
|
+
`ArrayPlus.IndexAt<A, Index>`
|
|
405
|
+
|
|
406
|
+
🦴 *utilities*
|
|
407
|
+
|
|
408
|
+
Gets the normalized index to access the element of an array or tuple.
|
|
409
|
+
|
|
410
|
+
```ts
|
|
411
|
+
type R = IndexAt<['a', 'b', 'c'], 2> // 2
|
|
412
|
+
type R = IndexAt<['a', 'b', 'c'], -2> // 1
|
|
413
|
+
|
|
414
|
+
type R = IndexAt<['a', 'b', 'c'], 3> // never
|
|
415
|
+
type R = IndexAt<['a', 'b', 'c'], -4> // never
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
### [`ArrayPlus.IsIndexOutOfBound](./array_plus.is_index_out_of_bound.ts#l18)
|
|
419
|
+
|
|
420
|
+
🎭 *validate*
|
|
421
|
+
|
|
422
|
+
Is `N` an out of bound index of `A`.
|
|
423
|
+
|
|
424
|
+
```ts
|
|
425
|
+
type R = IsIndexOutOfBound<[1], 0> // false
|
|
426
|
+
type R = IsIndexOutOfBound<[1], -1> // false
|
|
427
|
+
|
|
428
|
+
type R = IsIndexOutOfBound<[1], 1> // true
|
|
429
|
+
type R = IsIndexOutOfBound<[1], -2> // true
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
### [`ArrayPlus.IsReadonly](./array_plus.is_readonly.ts#l19)
|
|
433
|
+
|
|
434
|
+
`ArrayPlus.IsReadonly<A, Options = { $then, $else, $never, $notArray }>`
|
|
435
|
+
|
|
436
|
+
🎭 *validate*
|
|
437
|
+
🔢 *customizable*
|
|
438
|
+
|
|
439
|
+
Checks if `A` is a readonly array or tuple.
|
|
440
|
+
|
|
441
|
+
```ts
|
|
442
|
+
type R = IsReadonly<readonly string[]> // true
|
|
443
|
+
type R = IsReadonly<readonly [1, 2, 3, 4, 5]> // true
|
|
444
|
+
|
|
445
|
+
type R = IsReadonly<[1, 2, 3, 4, 5]> // false
|
|
446
|
+
type R = IsReadonly<readonly string[] | number> // boolean
|
|
447
|
+
|
|
448
|
+
// customization
|
|
449
|
+
type R = IsReadonly<readonly string[], { $then: 1 }> // 1
|
|
450
|
+
type R = IsReadonly<string[], { $else: 1 }> // 1
|
|
451
|
+
type R = IsReadonly<number, { $notArray: 1 }> // 1
|
|
452
|
+
type R = IsReadonly<never, { $never: 1 }> // 1
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
### [`ArrayPlus.Reverse`](./array.reverse.ts#l14)
|
|
386
456
|
|
|
387
457
|
> `ArrayPlus.Reverse<A>`
|
|
388
458
|
|
|
@@ -394,12 +464,28 @@ ArrayPlus.Reverse<[1, 2, 3]> // [3, 2, 1]
|
|
|
394
464
|
|
|
395
465
|
### [`ArrayPlus.SplitAt`](./array_plus.split_at.ts#L22)
|
|
396
466
|
|
|
397
|
-
|
|
467
|
+
`ArrayPlus.SplitAt<A, Index>`
|
|
468
|
+
|
|
469
|
+
⚗️ *transform*
|
|
470
|
+
|
|
471
|
+
Splits array or tuple `A` into two at the specified `Index`.
|
|
472
|
+
|
|
473
|
+
If the `Index` is out of bounds,
|
|
474
|
+
it will set to the boundary value.
|
|
398
475
|
|
|
399
|
-
|
|
476
|
+
It is the type level `splice()`.
|
|
400
477
|
|
|
401
478
|
```ts
|
|
402
|
-
|
|
479
|
+
SplitAt<[1, 2, 3, 4, 5], 2> // [[1, 2], [3, 4, 5]]
|
|
480
|
+
SplitAt<[1, 2, 3, 4, 5], -3> // [[1, 2], [3, 4, 5]]
|
|
481
|
+
|
|
482
|
+
SplitAt<[1, 2, 3, 4, 5], 2, 2> // [[1, 2, 5], [3, 4]]
|
|
483
|
+
|
|
484
|
+
SplitAt<[1, 2, 3, 4, 5], 2, 2, ['a', 'b']> // [[1, 2, 'a', 'b', 5], [3, 4]]
|
|
485
|
+
|
|
486
|
+
// out of bound resets to boundary
|
|
487
|
+
SplitAt<[1, 2, 3, 4, 5], 6> // [[1, 2, 3, 4, 5], []]
|
|
488
|
+
SplitAt<[1, 2, 3, 4, 5], -6> // [[], [1, 2, 3, 4, 5]]
|
|
403
489
|
```
|
|
404
490
|
|
|
405
491
|
### [`ArrayPlus.Some`](./array.some.ts#L23)
|
|
@@ -440,6 +526,10 @@ while some common ones are exposed at top-level.
|
|
|
440
526
|
|
|
441
527
|
Here are the list of array methods and their corresponding type-level functions, if available.
|
|
442
528
|
|
|
529
|
+
✅ means it is implemented.
|
|
530
|
+
✴️ means it is implemented with reduced functionality
|
|
531
|
+
🧬 means there is a built-in mechanism or type for it.
|
|
532
|
+
|
|
443
533
|
- ✅ `at`: [`ArrayPlus.At`](#arrayplusat)
|
|
444
534
|
- ✅ `concat`: [`Concat` | `ArrayPlus.Concat`](#arrayplusconcat) (`[...A, ...B]`)
|
|
445
535
|
- 🚧 `copyWithin`: `CopyWithin<A, Target, Start, End>`
|
|
@@ -464,7 +554,7 @@ Here are the list of array methods and their corresponding type-level functions,
|
|
|
464
554
|
- 🚧 `slice`:
|
|
465
555
|
- ✴️ `some`: [`Some` | `ArrayPlus.Some`](#arrayplussome)
|
|
466
556
|
- 🚧 `sort`:
|
|
467
|
-
-
|
|
557
|
+
- ✴️ `splice`: [`ArrayPlus.SplitAt`](#arrayplussplitat)
|
|
468
558
|
- 🧬 `unshift`: `[T, ...A]`
|
|
469
559
|
- 🧬 `values`: `keyof A`
|
|
470
560
|
|