type-plus 6.2.0 → 6.4.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/README.md +40 -9
- package/cjs/any/any_or_never.d.ts +17 -0
- package/cjs/any/any_or_never.d.ts.map +1 -0
- package/cjs/any/any_or_never.js +3 -0
- package/cjs/any/any_or_never.js.map +1 -0
- package/cjs/any/any_type.d.ts +57 -0
- package/cjs/any/any_type.d.ts.map +1 -0
- package/cjs/any/any_type.js +3 -0
- package/cjs/any/any_type.js.map +1 -0
- package/cjs/array/array.d.ts +32 -0
- package/cjs/array/array.d.ts.map +1 -0
- package/cjs/array/array.js.map +1 -0
- package/cjs/array/array_index.d.ts +37 -0
- package/cjs/array/array_index.d.ts.map +1 -0
- package/cjs/array/array_index.js +3 -0
- package/cjs/array/array_index.js.map +1 -0
- package/cjs/array/array_plus.d.ts +3 -0
- package/cjs/array/array_plus.d.ts.map +1 -0
- package/cjs/array/array_plus.js.map +1 -0
- package/cjs/array/array_type.d.ts +56 -0
- package/cjs/array/array_type.d.ts.map +1 -0
- package/cjs/array/array_type.js +3 -0
- package/cjs/array/array_type.js.map +1 -0
- package/cjs/array/common_prop_keys.d.ts.map +1 -0
- package/cjs/array/common_prop_keys.js.map +1 -0
- package/cjs/array/create_tuple.d.ts +11 -0
- package/cjs/array/create_tuple.d.ts.map +1 -0
- package/cjs/array/create_tuple.js.map +1 -0
- package/cjs/array/drop.d.ts +19 -0
- package/cjs/array/drop.d.ts.map +1 -0
- package/cjs/array/drop.js.map +1 -0
- package/cjs/array/filter.d.ts +9 -0
- package/cjs/array/filter.d.ts.map +1 -0
- package/cjs/array/filter.js.map +1 -0
- package/cjs/array/find_first.d.ts.map +1 -0
- package/cjs/array/find_first.js.map +1 -0
- package/cjs/array/find_last.d.ts.map +1 -0
- package/cjs/array/find_last.js.map +1 -0
- package/cjs/array/head.d.ts.map +1 -0
- package/cjs/array/head.js.map +1 -0
- package/cjs/array/index.d.ts +18 -0
- package/cjs/array/index.d.ts.map +1 -0
- package/cjs/array/index.js +34 -0
- package/cjs/array/index.js.map +1 -0
- package/cjs/array/intersect_of_props.d.ts.map +1 -0
- package/cjs/array/intersect_of_props.js.map +1 -0
- package/cjs/array/last.d.ts.map +1 -0
- package/cjs/array/last.js.map +1 -0
- package/cjs/array/literal_array.d.ts.map +1 -0
- package/cjs/array/literal_array.js.map +1 -0
- package/cjs/array/pad_left.d.ts +6 -0
- package/cjs/array/pad_left.d.ts.map +1 -0
- package/cjs/array/pad_left.js.map +1 -0
- package/cjs/array/reduce_while.d.ts.map +1 -0
- package/cjs/array/reduce_while.js.map +1 -0
- package/cjs/array/reverse.d.ts.map +1 -0
- package/cjs/array/reverse.js.map +1 -0
- package/cjs/array/some.d.ts +8 -0
- package/cjs/array/some.d.ts.map +1 -0
- package/cjs/array/some.js.map +1 -0
- package/cjs/array/tail.d.ts.map +1 -0
- package/cjs/array/tail.js.map +1 -0
- package/cjs/array/union_of_props.d.ts.map +1 -0
- package/cjs/array/union_of_props.js.map +1 -0
- package/cjs/array/union_of_values.d.ts.map +1 -0
- package/cjs/array/union_of_values.js.map +1 -0
- package/cjs/assertion/assert_type.d.ts +34 -0
- package/cjs/assertion/assert_type.d.ts.map +1 -0
- package/cjs/assertion/assert_type.js +107 -0
- package/cjs/assertion/assert_type.js.map +1 -0
- package/cjs/bigint/bigint_type.d.ts +62 -0
- package/cjs/bigint/bigint_type.d.ts.map +1 -0
- package/cjs/bigint/bigint_type.js +3 -0
- package/cjs/bigint/bigint_type.js.map +1 -0
- package/cjs/bigint/strict_bigint_type.d.ts +64 -0
- package/cjs/bigint/strict_bigint_type.d.ts.map +1 -0
- package/cjs/bigint/strict_bigint_type.js +3 -0
- package/cjs/bigint/strict_bigint_type.js.map +1 -0
- package/cjs/boolean/boolean_type.d.ts +64 -0
- package/cjs/boolean/boolean_type.d.ts.map +1 -0
- package/cjs/boolean/boolean_type.js +3 -0
- package/cjs/boolean/boolean_type.js.map +1 -0
- package/cjs/boolean/false_type.d.ts +57 -0
- package/cjs/boolean/false_type.d.ts.map +1 -0
- package/cjs/boolean/false_type.js +3 -0
- package/cjs/boolean/false_type.js.map +1 -0
- package/cjs/boolean/strict_boolean_type.d.ts +61 -0
- package/cjs/boolean/strict_boolean_type.d.ts.map +1 -0
- package/cjs/boolean/strict_boolean_type.js +3 -0
- package/cjs/boolean/strict_boolean_type.js.map +1 -0
- package/cjs/boolean/true_type.d.ts +57 -0
- package/cjs/boolean/true_type.d.ts.map +1 -0
- package/cjs/boolean/true_type.js +3 -0
- package/cjs/boolean/true_type.js.map +1 -0
- package/cjs/composable_types.d.ts +9 -0
- package/cjs/composable_types.d.ts.map +1 -0
- package/cjs/composable_types.js +3 -0
- package/cjs/composable_types.js.map +1 -0
- package/cjs/equal/equal.d.ts +52 -0
- package/cjs/equal/equal.d.ts.map +1 -0
- package/cjs/equal/equal.js +3 -0
- package/cjs/equal/equal.js.map +1 -0
- package/cjs/function/any_function.d.ts +2 -0
- package/cjs/function/any_function.d.ts.map +1 -0
- package/cjs/function/any_function.js +3 -0
- package/cjs/function/any_function.js.map +1 -0
- package/cjs/function/extract_function.d.ts +24 -0
- package/cjs/function/extract_function.d.ts.map +1 -0
- package/cjs/function/extract_function.js +13 -0
- package/cjs/function/extract_function.js.map +1 -0
- package/cjs/function/function_type.d.ts +67 -0
- package/cjs/function/function_type.d.ts.map +1 -0
- package/cjs/function/function_type.js +3 -0
- package/cjs/function/function_type.js.map +1 -0
- package/cjs/function/strict_function_type.d.ts +57 -0
- package/cjs/function/strict_function_type.d.ts.map +1 -0
- package/cjs/function/strict_function_type.js +3 -0
- package/cjs/function/strict_function_type.js.map +1 -0
- package/cjs/functional/Maybe.d.ts +2 -2
- package/cjs/functional/Maybe.d.ts.map +1 -1
- package/cjs/functional/compose.d.ts +2 -2
- package/cjs/functional/compose.d.ts.map +1 -1
- package/cjs/index.d.ts +43 -14
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js +11 -14
- package/cjs/index.js.map +1 -1
- package/cjs/json.d.ts +12 -0
- package/cjs/json.d.ts.map +1 -0
- package/cjs/json.js +14 -0
- package/cjs/json.js.map +1 -0
- package/cjs/math/Add.d.ts +4 -3
- package/cjs/math/Add.d.ts.map +1 -1
- package/cjs/math/Digit.d.ts +4 -3
- package/cjs/math/Digit.d.ts.map +1 -1
- package/cjs/math/GreaterThan.d.ts +6 -4
- package/cjs/math/GreaterThan.d.ts.map +1 -1
- package/cjs/math/Max.d.ts +1 -1
- package/cjs/math/Max.d.ts.map +1 -1
- package/cjs/math/Subtract.d.ts +4 -3
- package/cjs/math/Subtract.d.ts.map +1 -1
- package/cjs/never/never_type.d.ts +59 -0
- package/cjs/never/never_type.d.ts.map +1 -0
- package/cjs/never/never_type.js +3 -0
- package/cjs/never/never_type.js.map +1 -0
- package/cjs/nominal/brand.d.ts +21 -0
- package/cjs/nominal/brand.d.ts.map +1 -0
- package/cjs/nominal/brand.js +20 -0
- package/cjs/nominal/brand.js.map +1 -0
- package/cjs/nominal/flavor.d.ts +20 -0
- package/cjs/nominal/flavor.d.ts.map +1 -0
- package/cjs/nominal/flavor.js +20 -0
- package/cjs/nominal/flavor.js.map +1 -0
- package/cjs/nominal/index.d.ts +4 -0
- package/cjs/nominal/index.d.ts.map +1 -0
- package/cjs/nominal/index.js +20 -0
- package/cjs/nominal/index.js.map +1 -0
- package/cjs/nominal/nominal_match.d.ts +5 -0
- package/cjs/nominal/nominal_match.d.ts.map +1 -0
- package/cjs/nominal/nominal_match.js +13 -0
- package/cjs/nominal/nominal_match.js.map +1 -0
- package/cjs/nominal/types.d.ts.map +1 -0
- package/cjs/nominal/types.js.map +1 -0
- package/cjs/null/null_type.d.ts +58 -0
- package/cjs/null/null_type.d.ts.map +1 -0
- package/cjs/null/null_type.js +3 -0
- package/cjs/null/null_type.js.map +1 -0
- package/cjs/number/integer.d.ts +75 -0
- package/cjs/number/integer.d.ts.map +1 -0
- package/cjs/number/integer.js +3 -0
- package/cjs/number/integer.js.map +1 -0
- package/cjs/number/negative.d.ts +78 -0
- package/cjs/number/negative.d.ts.map +1 -0
- package/cjs/number/negative.js +3 -0
- package/cjs/number/negative.js.map +1 -0
- package/cjs/number/number_array.d.ts +3 -0
- package/cjs/number/number_array.d.ts.map +1 -0
- package/cjs/number/number_array.js +3 -0
- package/cjs/number/number_array.js.map +1 -0
- package/cjs/number/number_plus.d.ts +8 -0
- package/cjs/number/number_plus.d.ts.map +1 -0
- package/cjs/number/number_plus.js.map +1 -0
- package/cjs/number/number_type.d.ts +58 -0
- package/cjs/number/number_type.d.ts.map +1 -0
- package/cjs/number/number_type.js +3 -0
- package/cjs/number/number_type.js.map +1 -0
- package/cjs/number/numeric_type.d.ts +67 -0
- package/cjs/number/numeric_type.d.ts.map +1 -0
- package/cjs/number/numeric_type.js +3 -0
- package/cjs/number/numeric_type.js.map +1 -0
- package/cjs/number/positive.d.ts +61 -0
- package/cjs/number/positive.d.ts.map +1 -0
- package/cjs/number/positive.js +3 -0
- package/cjs/number/positive.js.map +1 -0
- package/cjs/number/strict_number_type.d.ts +61 -0
- package/cjs/number/strict_number_type.d.ts.map +1 -0
- package/cjs/number/strict_number_type.js +3 -0
- package/cjs/number/strict_number_type.js.map +1 -0
- package/cjs/object/ANotB.d.ts +1 -1
- package/cjs/object/ANotB.d.ts.map +1 -1
- package/cjs/object/KnownKeys.d.ts +1 -1
- package/cjs/object/KnownKeys.d.ts.map +1 -1
- package/cjs/object/Partial.d.ts +1 -1
- package/cjs/object/Partial.d.ts.map +1 -1
- package/cjs/object/getField.d.ts +1 -1
- package/cjs/object/getField.d.ts.map +1 -1
- package/cjs/object/hasProperty.d.ts +1 -1
- package/cjs/object/hasProperty.d.ts.map +1 -1
- package/cjs/object/index.d.ts +17 -16
- package/cjs/object/index.d.ts.map +1 -1
- package/cjs/object/index.js.map +1 -1
- package/cjs/object/object_type.d.ts +62 -0
- package/cjs/object/object_type.d.ts.map +1 -0
- package/cjs/object/object_type.js +3 -0
- package/cjs/object/object_type.js.map +1 -0
- package/cjs/object/omit.d.ts +1 -1
- package/cjs/object/omit.d.ts.map +1 -1
- package/cjs/object/pick.d.ts +1 -1
- package/cjs/object/pick.d.ts.map +1 -1
- package/cjs/object/properties.d.ts +7 -0
- package/cjs/object/properties.d.ts.map +1 -0
- package/cjs/object/properties.js +3 -0
- package/cjs/object/properties.js.map +1 -0
- package/cjs/predicates/index.d.ts +0 -2
- package/cjs/predicates/index.d.ts.map +1 -1
- package/cjs/predicates/index.js.map +1 -1
- package/cjs/predicates/isType.d.ts +1 -1
- package/cjs/predicates/isType.d.ts.map +1 -1
- package/cjs/predicates/isType.js +2 -1
- package/cjs/predicates/isType.js.map +1 -1
- package/cjs/primitive.d.ts +2 -0
- package/cjs/primitive.d.ts.map +1 -0
- package/cjs/primitive.js +3 -0
- package/cjs/primitive.js.map +1 -0
- package/cjs/string/strict_string_type.d.ts +66 -0
- package/cjs/string/strict_string_type.d.ts.map +1 -0
- package/cjs/string/strict_string_type.js +3 -0
- package/cjs/string/strict_string_type.js.map +1 -0
- package/cjs/string/string_type.d.ts +66 -0
- package/cjs/string/string_type.d.ts.map +1 -0
- package/cjs/string/string_type.js +3 -0
- package/cjs/string/string_type.js.map +1 -0
- package/cjs/symbol/symbol_type.d.ts +60 -0
- package/cjs/symbol/symbol_type.d.ts.map +1 -0
- package/cjs/symbol/symbol_type.js +3 -0
- package/cjs/symbol/symbol_type.js.map +1 -0
- package/cjs/testing/stub.d.ts +2 -2
- package/cjs/testing/stub.d.ts.map +1 -1
- package/cjs/testing/test_type.d.ts +102 -0
- package/cjs/testing/test_type.d.ts.map +1 -0
- package/cjs/testing/test_type.js +105 -0
- package/cjs/testing/test_type.js.map +1 -0
- package/cjs/tuple/tuple_type.d.ts +67 -0
- package/cjs/tuple/tuple_type.d.ts.map +1 -0
- package/cjs/tuple/tuple_type.js +3 -0
- package/cjs/tuple/tuple_type.js.map +1 -0
- package/cjs/undefined/undefined_type.d.ts +61 -0
- package/cjs/undefined/undefined_type.d.ts.map +1 -0
- package/cjs/undefined/undefined_type.js +3 -0
- package/cjs/undefined/undefined_type.js.map +1 -0
- package/cjs/union_keys.d.ts +6 -0
- package/cjs/union_keys.d.ts.map +1 -0
- package/cjs/union_keys.js +3 -0
- package/cjs/union_keys.js.map +1 -0
- package/cjs/union_to_intersection.d.ts +3 -0
- package/cjs/union_to_intersection.d.ts.map +1 -0
- package/cjs/union_to_intersection.js +8 -0
- package/cjs/union_to_intersection.js.map +1 -0
- package/cjs/unknown/unknown_type.d.ts +59 -0
- package/cjs/unknown/unknown_type.d.ts.map +1 -0
- package/cjs/unknown/unknown_type.js +3 -0
- package/cjs/unknown/unknown_type.js.map +1 -0
- package/cjs/void/void_type.d.ts +51 -0
- package/cjs/void/void_type.d.ts.map +1 -0
- package/cjs/void/void_type.js +3 -0
- package/cjs/void/void_type.js.map +1 -0
- package/esm/any/any_or_never.d.ts +17 -0
- package/esm/any/any_or_never.d.ts.map +1 -0
- package/esm/any/any_or_never.js +2 -0
- package/esm/any/any_or_never.js.map +1 -0
- package/esm/any/any_type.d.ts +57 -0
- package/esm/any/any_type.d.ts.map +1 -0
- package/esm/any/any_type.js +2 -0
- package/esm/any/any_type.js.map +1 -0
- package/esm/array/array.d.ts +32 -0
- package/esm/array/array.d.ts.map +1 -0
- package/esm/array/array.js.map +1 -0
- package/esm/array/array_index.d.ts +37 -0
- package/esm/array/array_index.d.ts.map +1 -0
- package/esm/array/array_index.js +2 -0
- package/esm/array/array_index.js.map +1 -0
- package/esm/array/array_plus.d.ts +3 -0
- package/esm/array/array_plus.d.ts.map +1 -0
- package/esm/array/array_plus.js.map +1 -0
- package/esm/array/array_type.d.ts +56 -0
- package/esm/array/array_type.d.ts.map +1 -0
- package/esm/array/array_type.js +2 -0
- package/esm/array/array_type.js.map +1 -0
- package/esm/array/common_prop_keys.d.ts.map +1 -0
- package/esm/array/common_prop_keys.js.map +1 -0
- package/esm/array/create_tuple.d.ts +11 -0
- package/esm/array/create_tuple.d.ts.map +1 -0
- package/esm/array/create_tuple.js.map +1 -0
- package/esm/array/drop.d.ts +19 -0
- package/esm/array/drop.d.ts.map +1 -0
- package/esm/array/drop.js.map +1 -0
- package/esm/array/filter.d.ts +9 -0
- package/esm/array/filter.d.ts.map +1 -0
- package/esm/array/filter.js.map +1 -0
- package/esm/array/find_first.d.ts.map +1 -0
- package/esm/array/find_first.js.map +1 -0
- package/esm/array/find_last.d.ts.map +1 -0
- package/esm/array/find_last.js.map +1 -0
- package/esm/array/head.d.ts.map +1 -0
- package/esm/array/head.js.map +1 -0
- package/esm/array/index.d.ts +18 -0
- package/esm/array/index.d.ts.map +1 -0
- package/esm/array/index.js +18 -0
- package/esm/array/index.js.map +1 -0
- package/esm/array/intersect_of_props.d.ts.map +1 -0
- package/esm/array/intersect_of_props.js.map +1 -0
- package/esm/array/last.d.ts.map +1 -0
- package/esm/array/last.js.map +1 -0
- package/esm/array/literal_array.d.ts.map +1 -0
- package/esm/array/literal_array.js.map +1 -0
- package/esm/array/pad_left.d.ts +6 -0
- package/esm/array/pad_left.d.ts.map +1 -0
- package/esm/array/pad_left.js.map +1 -0
- package/esm/array/reduce_while.d.ts.map +1 -0
- package/esm/array/reduce_while.js.map +1 -0
- package/esm/array/reverse.d.ts.map +1 -0
- package/esm/array/reverse.js.map +1 -0
- package/esm/array/some.d.ts +8 -0
- package/esm/array/some.d.ts.map +1 -0
- package/esm/array/some.js.map +1 -0
- package/esm/array/tail.d.ts.map +1 -0
- package/esm/array/tail.js.map +1 -0
- package/esm/array/union_of_props.d.ts.map +1 -0
- package/esm/array/union_of_props.js.map +1 -0
- package/esm/array/union_of_values.d.ts.map +1 -0
- package/esm/array/union_of_values.js.map +1 -0
- package/esm/assertion/assert_type.d.ts +34 -0
- package/esm/assertion/assert_type.d.ts.map +1 -0
- package/esm/assertion/assert_type.js +103 -0
- package/esm/assertion/assert_type.js.map +1 -0
- package/esm/bigint/bigint_type.d.ts +62 -0
- package/esm/bigint/bigint_type.d.ts.map +1 -0
- package/esm/bigint/bigint_type.js +2 -0
- package/esm/bigint/bigint_type.js.map +1 -0
- package/esm/bigint/strict_bigint_type.d.ts +64 -0
- package/esm/bigint/strict_bigint_type.d.ts.map +1 -0
- package/esm/bigint/strict_bigint_type.js +2 -0
- package/esm/bigint/strict_bigint_type.js.map +1 -0
- package/esm/boolean/boolean_type.d.ts +64 -0
- package/esm/boolean/boolean_type.d.ts.map +1 -0
- package/esm/boolean/boolean_type.js +2 -0
- package/esm/boolean/boolean_type.js.map +1 -0
- package/esm/boolean/false_type.d.ts +57 -0
- package/esm/boolean/false_type.d.ts.map +1 -0
- package/esm/boolean/false_type.js +2 -0
- package/esm/boolean/false_type.js.map +1 -0
- package/esm/boolean/strict_boolean_type.d.ts +61 -0
- package/esm/boolean/strict_boolean_type.d.ts.map +1 -0
- package/esm/boolean/strict_boolean_type.js +2 -0
- package/esm/boolean/strict_boolean_type.js.map +1 -0
- package/esm/boolean/true_type.d.ts +57 -0
- package/esm/boolean/true_type.d.ts.map +1 -0
- package/esm/boolean/true_type.js +2 -0
- package/esm/boolean/true_type.js.map +1 -0
- package/esm/composable_types.d.ts +9 -0
- package/esm/composable_types.d.ts.map +1 -0
- package/esm/composable_types.js +2 -0
- package/esm/composable_types.js.map +1 -0
- package/esm/equal/equal.d.ts +52 -0
- package/esm/equal/equal.d.ts.map +1 -0
- package/esm/equal/equal.js +2 -0
- package/esm/equal/equal.js.map +1 -0
- package/esm/function/any_function.d.ts +2 -0
- package/esm/function/any_function.d.ts.map +1 -0
- package/esm/function/any_function.js +2 -0
- package/esm/function/any_function.js.map +1 -0
- package/esm/function/extract_function.d.ts +24 -0
- package/esm/function/extract_function.d.ts.map +1 -0
- package/esm/function/extract_function.js +9 -0
- package/esm/function/extract_function.js.map +1 -0
- package/esm/function/function_type.d.ts +67 -0
- package/esm/function/function_type.d.ts.map +1 -0
- package/esm/function/function_type.js +2 -0
- package/esm/function/function_type.js.map +1 -0
- package/esm/function/strict_function_type.d.ts +57 -0
- package/esm/function/strict_function_type.d.ts.map +1 -0
- package/esm/function/strict_function_type.js +2 -0
- package/esm/function/strict_function_type.js.map +1 -0
- package/esm/functional/Maybe.d.ts +2 -2
- package/esm/functional/Maybe.d.ts.map +1 -1
- package/esm/functional/compose.d.ts +2 -2
- package/esm/functional/compose.d.ts.map +1 -1
- package/esm/index.d.ts +43 -14
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +8 -11
- package/esm/index.js.map +1 -1
- package/esm/json.d.ts +12 -0
- package/esm/json.d.ts.map +1 -0
- package/esm/json.js +11 -0
- package/esm/json.js.map +1 -0
- package/esm/math/Add.d.ts +4 -3
- package/esm/math/Add.d.ts.map +1 -1
- package/esm/math/Digit.d.ts +4 -3
- package/esm/math/Digit.d.ts.map +1 -1
- package/esm/math/GreaterThan.d.ts +6 -4
- package/esm/math/GreaterThan.d.ts.map +1 -1
- package/esm/math/Max.d.ts +1 -1
- package/esm/math/Max.d.ts.map +1 -1
- package/esm/math/Subtract.d.ts +4 -3
- package/esm/math/Subtract.d.ts.map +1 -1
- package/esm/never/never_type.d.ts +59 -0
- package/esm/never/never_type.d.ts.map +1 -0
- package/esm/never/never_type.js +2 -0
- package/esm/never/never_type.js.map +1 -0
- package/esm/nominal/brand.d.ts +21 -0
- package/esm/nominal/brand.d.ts.map +1 -0
- package/esm/nominal/brand.js +16 -0
- package/esm/nominal/brand.js.map +1 -0
- package/esm/nominal/flavor.d.ts +20 -0
- package/esm/nominal/flavor.d.ts.map +1 -0
- package/esm/nominal/flavor.js +16 -0
- package/esm/nominal/flavor.js.map +1 -0
- package/esm/nominal/index.d.ts +4 -0
- package/esm/nominal/index.d.ts.map +1 -0
- package/esm/nominal/index.js +4 -0
- package/esm/nominal/index.js.map +1 -0
- package/esm/nominal/nominal_match.d.ts +5 -0
- package/esm/nominal/nominal_match.d.ts.map +1 -0
- package/esm/nominal/nominal_match.js +9 -0
- package/esm/nominal/nominal_match.js.map +1 -0
- package/esm/nominal/types.d.ts.map +1 -0
- package/esm/nominal/types.js.map +1 -0
- package/esm/null/null_type.d.ts +58 -0
- package/esm/null/null_type.d.ts.map +1 -0
- package/esm/null/null_type.js +2 -0
- package/esm/null/null_type.js.map +1 -0
- package/esm/number/integer.d.ts +75 -0
- package/esm/number/integer.d.ts.map +1 -0
- package/esm/number/integer.js +2 -0
- package/esm/number/integer.js.map +1 -0
- package/esm/number/negative.d.ts +78 -0
- package/esm/number/negative.d.ts.map +1 -0
- package/esm/number/negative.js +2 -0
- package/esm/number/negative.js.map +1 -0
- package/esm/number/number_array.d.ts +3 -0
- package/esm/number/number_array.d.ts.map +1 -0
- package/esm/number/number_array.js +2 -0
- package/esm/number/number_array.js.map +1 -0
- package/esm/number/number_plus.d.ts +8 -0
- package/esm/number/number_plus.d.ts.map +1 -0
- package/esm/number/number_plus.js.map +1 -0
- package/esm/number/number_type.d.ts +58 -0
- package/esm/number/number_type.d.ts.map +1 -0
- package/esm/number/number_type.js +2 -0
- package/esm/number/number_type.js.map +1 -0
- package/esm/number/numeric_type.d.ts +67 -0
- package/esm/number/numeric_type.d.ts.map +1 -0
- package/esm/number/numeric_type.js +2 -0
- package/esm/number/numeric_type.js.map +1 -0
- package/esm/number/positive.d.ts +61 -0
- package/esm/number/positive.d.ts.map +1 -0
- package/esm/number/positive.js +2 -0
- package/esm/number/positive.js.map +1 -0
- package/esm/number/strict_number_type.d.ts +61 -0
- package/esm/number/strict_number_type.d.ts.map +1 -0
- package/esm/number/strict_number_type.js +2 -0
- package/esm/number/strict_number_type.js.map +1 -0
- package/esm/object/ANotB.d.ts +1 -1
- package/esm/object/ANotB.d.ts.map +1 -1
- package/esm/object/KnownKeys.d.ts +1 -1
- package/esm/object/KnownKeys.d.ts.map +1 -1
- package/esm/object/Partial.d.ts +1 -1
- package/esm/object/Partial.d.ts.map +1 -1
- package/esm/object/getField.d.ts +1 -1
- package/esm/object/getField.d.ts.map +1 -1
- package/esm/object/hasProperty.d.ts +1 -1
- package/esm/object/hasProperty.d.ts.map +1 -1
- package/esm/object/index.d.ts +17 -16
- package/esm/object/index.d.ts.map +1 -1
- package/esm/object/index.js.map +1 -1
- package/esm/object/object_type.d.ts +62 -0
- package/esm/object/object_type.d.ts.map +1 -0
- package/esm/object/object_type.js +2 -0
- package/esm/object/object_type.js.map +1 -0
- package/esm/object/omit.d.ts +1 -1
- package/esm/object/omit.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/properties.d.ts +7 -0
- package/esm/object/properties.d.ts.map +1 -0
- package/esm/object/properties.js +2 -0
- package/esm/object/properties.js.map +1 -0
- package/esm/predicates/index.d.ts +0 -2
- package/esm/predicates/index.d.ts.map +1 -1
- package/esm/predicates/index.js.map +1 -1
- package/esm/predicates/isType.d.ts +1 -1
- package/esm/predicates/isType.d.ts.map +1 -1
- package/esm/predicates/isType.js +2 -1
- package/esm/predicates/isType.js.map +1 -1
- package/esm/primitive.d.ts +2 -0
- package/esm/primitive.d.ts.map +1 -0
- package/esm/primitive.js +2 -0
- package/esm/primitive.js.map +1 -0
- package/esm/string/strict_string_type.d.ts +66 -0
- package/esm/string/strict_string_type.d.ts.map +1 -0
- package/esm/string/strict_string_type.js +2 -0
- package/esm/string/strict_string_type.js.map +1 -0
- package/esm/string/string_type.d.ts +66 -0
- package/esm/string/string_type.d.ts.map +1 -0
- package/esm/string/string_type.js +2 -0
- package/esm/string/string_type.js.map +1 -0
- package/esm/symbol/symbol_type.d.ts +60 -0
- package/esm/symbol/symbol_type.d.ts.map +1 -0
- package/esm/symbol/symbol_type.js +2 -0
- package/esm/symbol/symbol_type.js.map +1 -0
- package/esm/testing/stub.d.ts +2 -2
- package/esm/testing/stub.d.ts.map +1 -1
- package/esm/testing/test_type.d.ts +102 -0
- package/esm/testing/test_type.d.ts.map +1 -0
- package/esm/testing/test_type.js +102 -0
- package/esm/testing/test_type.js.map +1 -0
- package/esm/tuple/tuple_type.d.ts +67 -0
- package/esm/tuple/tuple_type.d.ts.map +1 -0
- package/esm/tuple/tuple_type.js +2 -0
- package/esm/tuple/tuple_type.js.map +1 -0
- package/esm/undefined/undefined_type.d.ts +61 -0
- package/esm/undefined/undefined_type.d.ts.map +1 -0
- package/esm/undefined/undefined_type.js +2 -0
- package/esm/undefined/undefined_type.js.map +1 -0
- package/esm/union_keys.d.ts +6 -0
- package/esm/union_keys.d.ts.map +1 -0
- package/esm/union_keys.js +2 -0
- package/esm/union_keys.js.map +1 -0
- package/esm/union_to_intersection.d.ts +3 -0
- package/esm/union_to_intersection.d.ts.map +1 -0
- package/esm/union_to_intersection.js +4 -0
- package/esm/union_to_intersection.js.map +1 -0
- package/esm/unknown/unknown_type.d.ts +59 -0
- package/esm/unknown/unknown_type.d.ts.map +1 -0
- package/esm/unknown/unknown_type.js +2 -0
- package/esm/unknown/unknown_type.js.map +1 -0
- package/esm/void/void_type.d.ts +51 -0
- package/esm/void/void_type.d.ts.map +1 -0
- package/esm/void/void_type.js +2 -0
- package/esm/void/void_type.js.map +1 -0
- package/package.json +7 -25
- package/ts/any/any_or_never.ts +17 -0
- package/ts/any/any_type.ts +60 -0
- package/ts/any/readme.md +26 -0
- package/ts/array/array.ts +37 -0
- package/ts/array/array_index.ts +70 -0
- package/ts/array/array_plus.ts +2 -0
- package/ts/array/array_type.ts +61 -0
- package/ts/array/create_tuple.ts +17 -0
- package/ts/array/drop.ts +71 -0
- package/ts/array/filter.ts +27 -0
- package/ts/array/index.ts +17 -0
- package/ts/array/pad_left.ts +16 -0
- package/ts/array/readme.md +32 -0
- package/ts/array/some.ts +33 -0
- package/ts/assertion/assert_type.ts +107 -0
- package/ts/assertion/readme.md +15 -0
- package/ts/bigint/bigint_type.ts +65 -0
- package/ts/bigint/readme.md +51 -0
- package/ts/bigint/strict_bigint_type.ts +69 -0
- package/ts/boolean/boolean_type.ts +69 -0
- package/ts/boolean/false_type.ts +61 -0
- package/ts/boolean/readme.md +85 -0
- package/ts/boolean/strict_boolean_type.ts +65 -0
- package/ts/boolean/true_type.ts +61 -0
- package/ts/composable_types.ts +9 -0
- package/ts/equal/equal.ts +88 -0
- package/ts/equal/readme.md +31 -0
- package/ts/function/extract_function.ts +29 -0
- package/ts/function/function_type.ts +72 -0
- package/ts/function/readme.md +84 -0
- package/ts/function/strict_function_type.ts +61 -0
- package/ts/functional/Maybe.ts +2 -2
- package/ts/functional/compose.ts +2 -2
- package/ts/index.ts +90 -18
- package/ts/math/Add.ts +5 -4
- package/ts/math/Digit.ts +4 -3
- package/ts/math/GreaterThan.ts +7 -5
- package/ts/math/Max.ts +1 -1
- package/ts/math/Subtract.ts +5 -5
- package/ts/never/never_type.ts +65 -0
- package/ts/never/readme.md +37 -0
- package/ts/nominal/brand.ts +35 -0
- package/ts/nominal/flavor.ts +38 -0
- package/ts/nominal/index.ts +3 -0
- package/ts/nominal/nominal_match.ts +22 -0
- package/ts/null/null_type.ts +61 -0
- package/ts/null/readme.md +24 -0
- package/ts/number/integer.ts +81 -0
- package/ts/number/negative.ts +109 -0
- package/ts/number/number_array.ts +15 -0
- package/ts/number/number_plus.ts +20 -0
- package/ts/number/number_type.ts +61 -0
- package/ts/number/numeric_type.ts +72 -0
- package/ts/number/positive.ts +68 -0
- package/ts/number/readme.md +155 -0
- package/ts/number/strict_number_type.ts +65 -0
- package/ts/object/ANotB.ts +1 -1
- package/ts/object/KnownKeys.ts +1 -1
- package/ts/object/Partial.ts +1 -1
- package/ts/object/getField.ts +1 -1
- package/ts/object/hasProperty.ts +1 -1
- package/ts/object/index.ts +17 -16
- package/ts/object/object_type.ts +65 -0
- package/ts/object/omit.ts +1 -1
- package/ts/object/pick.ts +1 -1
- package/ts/object/properties.ts +4 -0
- package/ts/object/readme.md +28 -0
- package/ts/predicates/index.ts +0 -3
- package/ts/predicates/isType.ts +4 -2
- package/ts/primitive.ts +10 -0
- package/ts/string/readme.md +43 -0
- package/ts/string/strict_string_type.ts +69 -0
- package/ts/string/string_type.ts +69 -0
- package/ts/symbol/readme.md +34 -0
- package/ts/symbol/symbol_type.ts +65 -0
- package/ts/testing/readme.md +19 -0
- package/ts/testing/stub.ts +2 -2
- package/ts/testing/test_type.ts +127 -0
- package/ts/tuple/readme.md +27 -0
- package/ts/tuple/tuple_type.ts +72 -0
- package/ts/undefined/readme.md +18 -0
- package/ts/undefined/undefined_type.ts +65 -0
- package/ts/unknown/readme.md +27 -0
- package/ts/unknown/unknown_type.ts +63 -0
- package/ts/void/readme.md +26 -0
- package/ts/void/void_type.ts +58 -0
- package/cjs/ComposableTypes.d.ts +0 -9
- package/cjs/ComposableTypes.d.ts.map +0 -1
- package/cjs/ComposableTypes.js +0 -3
- package/cjs/ComposableTypes.js.map +0 -1
- package/cjs/JSONTypes.d.ts +0 -12
- package/cjs/JSONTypes.d.ts.map +0 -1
- package/cjs/JSONTypes.js +0 -14
- package/cjs/JSONTypes.js.map +0 -1
- package/cjs/PrimitiveTypes.d.ts +0 -3
- package/cjs/PrimitiveTypes.d.ts.map +0 -1
- package/cjs/PrimitiveTypes.js +0 -4
- package/cjs/PrimitiveTypes.js.map +0 -1
- package/cjs/UnionKeys.d.ts +0 -6
- package/cjs/UnionKeys.d.ts.map +0 -1
- package/cjs/UnionKeys.js +0 -3
- package/cjs/UnionKeys.js.map +0 -1
- package/cjs/UnionToIntersection.d.ts +0 -3
- package/cjs/UnionToIntersection.d.ts.map +0 -1
- package/cjs/UnionToIntersection.js +0 -8
- package/cjs/UnionToIntersection.js.map +0 -1
- package/cjs/any_plus/any.d.ts +0 -29
- package/cjs/any_plus/any.d.ts.map +0 -1
- package/cjs/any_plus/any.js +0 -3
- package/cjs/any_plus/any.js.map +0 -1
- package/cjs/any_plus/index.d.ts +0 -2
- package/cjs/any_plus/index.d.ts.map +0 -1
- package/cjs/any_plus/index.js +0 -3
- package/cjs/any_plus/index.js.map +0 -1
- package/cjs/array_plus/array.d.ts +0 -42
- package/cjs/array_plus/array.d.ts.map +0 -1
- package/cjs/array_plus/array.js.map +0 -1
- package/cjs/array_plus/array_number.d.ts +0 -4
- package/cjs/array_plus/array_number.d.ts.map +0 -1
- package/cjs/array_plus/array_number.js +0 -3
- package/cjs/array_plus/array_number.js.map +0 -1
- package/cjs/array_plus/array_plus.d.ts +0 -35
- package/cjs/array_plus/array_plus.d.ts.map +0 -1
- package/cjs/array_plus/array_plus.js.map +0 -1
- package/cjs/array_plus/common_prop_keys.d.ts.map +0 -1
- package/cjs/array_plus/common_prop_keys.js.map +0 -1
- package/cjs/array_plus/create_tuple.d.ts +0 -10
- package/cjs/array_plus/create_tuple.d.ts.map +0 -1
- package/cjs/array_plus/create_tuple.js.map +0 -1
- package/cjs/array_plus/drop.d.ts +0 -19
- package/cjs/array_plus/drop.d.ts.map +0 -1
- package/cjs/array_plus/drop.js.map +0 -1
- package/cjs/array_plus/filter.d.ts +0 -10
- package/cjs/array_plus/filter.d.ts.map +0 -1
- package/cjs/array_plus/filter.js.map +0 -1
- package/cjs/array_plus/find_first.d.ts.map +0 -1
- package/cjs/array_plus/find_first.js.map +0 -1
- package/cjs/array_plus/find_last.d.ts.map +0 -1
- package/cjs/array_plus/find_last.js.map +0 -1
- package/cjs/array_plus/head.d.ts.map +0 -1
- package/cjs/array_plus/head.js.map +0 -1
- package/cjs/array_plus/index.d.ts +0 -20
- package/cjs/array_plus/index.d.ts.map +0 -1
- package/cjs/array_plus/index.js +0 -20
- package/cjs/array_plus/index.js.map +0 -1
- package/cjs/array_plus/intersect_of_props.d.ts.map +0 -1
- package/cjs/array_plus/intersect_of_props.js.map +0 -1
- package/cjs/array_plus/is_array.d.ts +0 -2
- package/cjs/array_plus/is_array.d.ts.map +0 -1
- package/cjs/array_plus/is_array.js +0 -3
- package/cjs/array_plus/is_array.js.map +0 -1
- package/cjs/array_plus/last.d.ts.map +0 -1
- package/cjs/array_plus/last.js.map +0 -1
- package/cjs/array_plus/literal_array.d.ts.map +0 -1
- package/cjs/array_plus/literal_array.js.map +0 -1
- package/cjs/array_plus/pad_left.d.ts +0 -6
- package/cjs/array_plus/pad_left.d.ts.map +0 -1
- package/cjs/array_plus/pad_left.js.map +0 -1
- package/cjs/array_plus/reduce_while.d.ts.map +0 -1
- package/cjs/array_plus/reduce_while.js.map +0 -1
- package/cjs/array_plus/reverse.d.ts.map +0 -1
- package/cjs/array_plus/reverse.js.map +0 -1
- package/cjs/array_plus/some.d.ts +0 -8
- package/cjs/array_plus/some.d.ts.map +0 -1
- package/cjs/array_plus/some.js.map +0 -1
- package/cjs/array_plus/tail.d.ts.map +0 -1
- package/cjs/array_plus/tail.js.map +0 -1
- package/cjs/array_plus/union_of_props.d.ts.map +0 -1
- package/cjs/array_plus/union_of_props.js.map +0 -1
- package/cjs/array_plus/union_of_values.d.ts.map +0 -1
- package/cjs/array_plus/union_of_values.js.map +0 -1
- package/cjs/assertion/assertType.d.ts +0 -34
- package/cjs/assertion/assertType.d.ts.map +0 -1
- package/cjs/assertion/assertType.js +0 -107
- package/cjs/assertion/assertType.js.map +0 -1
- package/cjs/assertion/index.d.ts +0 -2
- package/cjs/assertion/index.d.ts.map +0 -1
- package/cjs/assertion/index.js +0 -18
- package/cjs/assertion/index.js.map +0 -1
- package/cjs/function/AnyFunction.d.ts +0 -2
- package/cjs/function/AnyFunction.d.ts.map +0 -1
- package/cjs/function/AnyFunction.js +0 -3
- package/cjs/function/AnyFunction.js.map +0 -1
- package/cjs/function/ExtractFunction.d.ts +0 -15
- package/cjs/function/ExtractFunction.d.ts.map +0 -1
- package/cjs/function/ExtractFunction.js +0 -13
- package/cjs/function/ExtractFunction.js.map +0 -1
- package/cjs/function/index.d.ts +0 -3
- package/cjs/function/index.d.ts.map +0 -1
- package/cjs/function/index.js +0 -18
- package/cjs/function/index.js.map +0 -1
- package/cjs/nominal-types/Brand.d.ts +0 -21
- package/cjs/nominal-types/Brand.d.ts.map +0 -1
- package/cjs/nominal-types/Brand.js +0 -20
- package/cjs/nominal-types/Brand.js.map +0 -1
- package/cjs/nominal-types/Flavor.d.ts +0 -20
- package/cjs/nominal-types/Flavor.d.ts.map +0 -1
- package/cjs/nominal-types/Flavor.js +0 -20
- package/cjs/nominal-types/Flavor.js.map +0 -1
- package/cjs/nominal-types/index.d.ts +0 -4
- package/cjs/nominal-types/index.d.ts.map +0 -1
- package/cjs/nominal-types/index.js +0 -20
- package/cjs/nominal-types/index.js.map +0 -1
- package/cjs/nominal-types/nominalMatch.d.ts +0 -5
- package/cjs/nominal-types/nominalMatch.d.ts.map +0 -1
- package/cjs/nominal-types/nominalMatch.js +0 -13
- package/cjs/nominal-types/nominalMatch.js.map +0 -1
- package/cjs/nominal-types/types.d.ts.map +0 -1
- package/cjs/nominal-types/types.js.map +0 -1
- package/cjs/number_plus/index.d.ts +0 -2
- package/cjs/number_plus/index.d.ts.map +0 -1
- package/cjs/number_plus/index.js +0 -3
- package/cjs/number_plus/index.js.map +0 -1
- package/cjs/number_plus/number.d.ts +0 -128
- package/cjs/number_plus/number.d.ts.map +0 -1
- package/cjs/number_plus/number.js +0 -3
- package/cjs/number_plus/number.js.map +0 -1
- package/cjs/number_plus/number_plus.d.ts +0 -2
- package/cjs/number_plus/number_plus.d.ts.map +0 -1
- package/cjs/number_plus/number_plus.js.map +0 -1
- package/cjs/predicates/Equal.d.ts +0 -19
- package/cjs/predicates/Equal.d.ts.map +0 -1
- package/cjs/predicates/Equal.js +0 -3
- package/cjs/predicates/Equal.js.map +0 -1
- package/cjs/testing/index.d.ts +0 -2
- package/cjs/testing/index.d.ts.map +0 -1
- package/cjs/testing/index.js +0 -18
- package/cjs/testing/index.js.map +0 -1
- package/esm/ComposableTypes.d.ts +0 -9
- package/esm/ComposableTypes.d.ts.map +0 -1
- package/esm/ComposableTypes.js +0 -2
- package/esm/ComposableTypes.js.map +0 -1
- package/esm/JSONTypes.d.ts +0 -12
- package/esm/JSONTypes.d.ts.map +0 -1
- package/esm/JSONTypes.js +0 -11
- package/esm/JSONTypes.js.map +0 -1
- package/esm/PrimitiveTypes.d.ts +0 -3
- package/esm/PrimitiveTypes.d.ts.map +0 -1
- package/esm/PrimitiveTypes.js +0 -3
- package/esm/PrimitiveTypes.js.map +0 -1
- package/esm/UnionKeys.d.ts +0 -6
- package/esm/UnionKeys.d.ts.map +0 -1
- package/esm/UnionKeys.js +0 -2
- package/esm/UnionKeys.js.map +0 -1
- package/esm/UnionToIntersection.d.ts +0 -3
- package/esm/UnionToIntersection.d.ts.map +0 -1
- package/esm/UnionToIntersection.js +0 -4
- package/esm/UnionToIntersection.js.map +0 -1
- package/esm/any_plus/any.d.ts +0 -29
- package/esm/any_plus/any.d.ts.map +0 -1
- package/esm/any_plus/any.js +0 -2
- package/esm/any_plus/any.js.map +0 -1
- package/esm/any_plus/index.d.ts +0 -2
- package/esm/any_plus/index.d.ts.map +0 -1
- package/esm/any_plus/index.js +0 -2
- package/esm/any_plus/index.js.map +0 -1
- package/esm/array_plus/array.d.ts +0 -42
- package/esm/array_plus/array.d.ts.map +0 -1
- package/esm/array_plus/array.js.map +0 -1
- package/esm/array_plus/array_number.d.ts +0 -4
- package/esm/array_plus/array_number.d.ts.map +0 -1
- package/esm/array_plus/array_number.js +0 -2
- package/esm/array_plus/array_number.js.map +0 -1
- package/esm/array_plus/array_plus.d.ts +0 -35
- package/esm/array_plus/array_plus.d.ts.map +0 -1
- package/esm/array_plus/array_plus.js.map +0 -1
- package/esm/array_plus/common_prop_keys.d.ts.map +0 -1
- package/esm/array_plus/common_prop_keys.js.map +0 -1
- package/esm/array_plus/create_tuple.d.ts +0 -10
- package/esm/array_plus/create_tuple.d.ts.map +0 -1
- package/esm/array_plus/create_tuple.js.map +0 -1
- package/esm/array_plus/drop.d.ts +0 -19
- package/esm/array_plus/drop.d.ts.map +0 -1
- package/esm/array_plus/drop.js.map +0 -1
- package/esm/array_plus/filter.d.ts +0 -10
- package/esm/array_plus/filter.d.ts.map +0 -1
- package/esm/array_plus/filter.js.map +0 -1
- package/esm/array_plus/find_first.d.ts.map +0 -1
- package/esm/array_plus/find_first.js.map +0 -1
- package/esm/array_plus/find_last.d.ts.map +0 -1
- package/esm/array_plus/find_last.js.map +0 -1
- package/esm/array_plus/head.d.ts.map +0 -1
- package/esm/array_plus/head.js.map +0 -1
- package/esm/array_plus/index.d.ts +0 -20
- package/esm/array_plus/index.d.ts.map +0 -1
- package/esm/array_plus/index.js +0 -4
- package/esm/array_plus/index.js.map +0 -1
- package/esm/array_plus/intersect_of_props.d.ts.map +0 -1
- package/esm/array_plus/intersect_of_props.js.map +0 -1
- package/esm/array_plus/is_array.d.ts +0 -2
- package/esm/array_plus/is_array.d.ts.map +0 -1
- package/esm/array_plus/is_array.js +0 -2
- package/esm/array_plus/is_array.js.map +0 -1
- package/esm/array_plus/last.d.ts.map +0 -1
- package/esm/array_plus/last.js.map +0 -1
- package/esm/array_plus/literal_array.d.ts.map +0 -1
- package/esm/array_plus/literal_array.js.map +0 -1
- package/esm/array_plus/pad_left.d.ts +0 -6
- package/esm/array_plus/pad_left.d.ts.map +0 -1
- package/esm/array_plus/pad_left.js.map +0 -1
- package/esm/array_plus/reduce_while.d.ts.map +0 -1
- package/esm/array_plus/reduce_while.js.map +0 -1
- package/esm/array_plus/reverse.d.ts.map +0 -1
- package/esm/array_plus/reverse.js.map +0 -1
- package/esm/array_plus/some.d.ts +0 -8
- package/esm/array_plus/some.d.ts.map +0 -1
- package/esm/array_plus/some.js.map +0 -1
- package/esm/array_plus/tail.d.ts.map +0 -1
- package/esm/array_plus/tail.js.map +0 -1
- package/esm/array_plus/union_of_props.d.ts.map +0 -1
- package/esm/array_plus/union_of_props.js.map +0 -1
- package/esm/array_plus/union_of_values.d.ts.map +0 -1
- package/esm/array_plus/union_of_values.js.map +0 -1
- package/esm/assertion/assertType.d.ts +0 -34
- package/esm/assertion/assertType.d.ts.map +0 -1
- package/esm/assertion/assertType.js +0 -103
- package/esm/assertion/assertType.js.map +0 -1
- package/esm/assertion/index.d.ts +0 -2
- package/esm/assertion/index.d.ts.map +0 -1
- package/esm/assertion/index.js +0 -2
- package/esm/assertion/index.js.map +0 -1
- package/esm/function/AnyFunction.d.ts +0 -2
- package/esm/function/AnyFunction.d.ts.map +0 -1
- package/esm/function/AnyFunction.js +0 -2
- package/esm/function/AnyFunction.js.map +0 -1
- package/esm/function/ExtractFunction.d.ts +0 -15
- package/esm/function/ExtractFunction.d.ts.map +0 -1
- package/esm/function/ExtractFunction.js +0 -9
- package/esm/function/ExtractFunction.js.map +0 -1
- package/esm/function/index.d.ts +0 -3
- package/esm/function/index.d.ts.map +0 -1
- package/esm/function/index.js +0 -2
- package/esm/function/index.js.map +0 -1
- package/esm/nominal-types/Brand.d.ts +0 -21
- package/esm/nominal-types/Brand.d.ts.map +0 -1
- package/esm/nominal-types/Brand.js +0 -16
- package/esm/nominal-types/Brand.js.map +0 -1
- package/esm/nominal-types/Flavor.d.ts +0 -20
- package/esm/nominal-types/Flavor.d.ts.map +0 -1
- package/esm/nominal-types/Flavor.js +0 -16
- package/esm/nominal-types/Flavor.js.map +0 -1
- package/esm/nominal-types/index.d.ts +0 -4
- package/esm/nominal-types/index.d.ts.map +0 -1
- package/esm/nominal-types/index.js +0 -4
- package/esm/nominal-types/index.js.map +0 -1
- package/esm/nominal-types/nominalMatch.d.ts +0 -5
- package/esm/nominal-types/nominalMatch.d.ts.map +0 -1
- package/esm/nominal-types/nominalMatch.js +0 -9
- package/esm/nominal-types/nominalMatch.js.map +0 -1
- package/esm/nominal-types/types.d.ts.map +0 -1
- package/esm/nominal-types/types.js.map +0 -1
- package/esm/number_plus/index.d.ts +0 -2
- package/esm/number_plus/index.d.ts.map +0 -1
- package/esm/number_plus/index.js +0 -2
- package/esm/number_plus/index.js.map +0 -1
- package/esm/number_plus/number.d.ts +0 -128
- package/esm/number_plus/number.d.ts.map +0 -1
- package/esm/number_plus/number.js +0 -2
- package/esm/number_plus/number.js.map +0 -1
- package/esm/number_plus/number_plus.d.ts +0 -2
- package/esm/number_plus/number_plus.d.ts.map +0 -1
- package/esm/number_plus/number_plus.js.map +0 -1
- package/esm/predicates/Equal.d.ts +0 -19
- package/esm/predicates/Equal.d.ts.map +0 -1
- package/esm/predicates/Equal.js +0 -2
- package/esm/predicates/Equal.js.map +0 -1
- package/esm/testing/index.d.ts +0 -2
- package/esm/testing/index.d.ts.map +0 -1
- package/esm/testing/index.js +0 -2
- package/esm/testing/index.js.map +0 -1
- package/ts/ComposableTypes.ts +0 -10
- package/ts/PrimitiveTypes.ts +0 -15
- package/ts/any_plus/any.ts +0 -29
- package/ts/any_plus/index.ts +0 -1
- package/ts/array_plus/array.ts +0 -48
- package/ts/array_plus/array_number.ts +0 -12
- package/ts/array_plus/array_plus.ts +0 -66
- package/ts/array_plus/create_tuple.ts +0 -16
- package/ts/array_plus/drop.ts +0 -71
- package/ts/array_plus/filter.ts +0 -28
- package/ts/array_plus/index.ts +0 -19
- package/ts/array_plus/is_array.ts +0 -1
- package/ts/array_plus/pad_left.ts +0 -16
- package/ts/array_plus/some.ts +0 -33
- package/ts/assertion/assertType.ts +0 -107
- package/ts/assertion/index.ts +0 -1
- package/ts/function/ExtractFunction.ts +0 -20
- package/ts/function/index.ts +0 -2
- package/ts/nominal-types/Brand.ts +0 -34
- package/ts/nominal-types/Flavor.ts +0 -35
- package/ts/nominal-types/index.ts +0 -3
- package/ts/nominal-types/nominalMatch.ts +0 -22
- package/ts/number_plus/index.ts +0 -1
- package/ts/number_plus/number.ts +0 -149
- package/ts/number_plus/number_plus.ts +0 -1
- package/ts/predicates/Equal.ts +0 -24
- package/ts/testing/index.ts +0 -1
- /package/cjs/{array_plus → array}/array.js +0 -0
- /package/cjs/{array_plus → array}/array_plus.js +0 -0
- /package/cjs/{array_plus → array}/common_prop_keys.d.ts +0 -0
- /package/cjs/{array_plus → array}/common_prop_keys.js +0 -0
- /package/cjs/{array_plus → array}/create_tuple.js +0 -0
- /package/cjs/{array_plus → array}/drop.js +0 -0
- /package/cjs/{array_plus → array}/filter.js +0 -0
- /package/cjs/{array_plus → array}/find_first.d.ts +0 -0
- /package/cjs/{array_plus → array}/find_first.js +0 -0
- /package/cjs/{array_plus → array}/find_last.d.ts +0 -0
- /package/cjs/{array_plus → array}/find_last.js +0 -0
- /package/cjs/{array_plus → array}/head.d.ts +0 -0
- /package/cjs/{array_plus → array}/head.js +0 -0
- /package/cjs/{array_plus → array}/intersect_of_props.d.ts +0 -0
- /package/cjs/{array_plus → array}/intersect_of_props.js +0 -0
- /package/cjs/{array_plus → array}/last.d.ts +0 -0
- /package/cjs/{array_plus → array}/last.js +0 -0
- /package/cjs/{array_plus → array}/literal_array.d.ts +0 -0
- /package/cjs/{array_plus → array}/literal_array.js +0 -0
- /package/cjs/{array_plus → array}/pad_left.js +0 -0
- /package/cjs/{array_plus → array}/reduce_while.d.ts +0 -0
- /package/cjs/{array_plus → array}/reduce_while.js +0 -0
- /package/cjs/{array_plus → array}/reverse.d.ts +0 -0
- /package/cjs/{array_plus → array}/reverse.js +0 -0
- /package/cjs/{array_plus → array}/some.js +0 -0
- /package/cjs/{array_plus → array}/tail.d.ts +0 -0
- /package/cjs/{array_plus → array}/tail.js +0 -0
- /package/cjs/{array_plus → array}/union_of_props.d.ts +0 -0
- /package/cjs/{array_plus → array}/union_of_props.js +0 -0
- /package/cjs/{array_plus → array}/union_of_values.d.ts +0 -0
- /package/cjs/{array_plus → array}/union_of_values.js +0 -0
- /package/cjs/{nominal-types → nominal}/types.d.ts +0 -0
- /package/cjs/{nominal-types → nominal}/types.js +0 -0
- /package/cjs/{number_plus → number}/number_plus.js +0 -0
- /package/esm/{array_plus → array}/array.js +0 -0
- /package/esm/{array_plus → array}/array_plus.js +0 -0
- /package/esm/{array_plus → array}/common_prop_keys.d.ts +0 -0
- /package/esm/{array_plus → array}/common_prop_keys.js +0 -0
- /package/esm/{array_plus → array}/create_tuple.js +0 -0
- /package/esm/{array_plus → array}/drop.js +0 -0
- /package/esm/{array_plus → array}/filter.js +0 -0
- /package/esm/{array_plus → array}/find_first.d.ts +0 -0
- /package/esm/{array_plus → array}/find_first.js +0 -0
- /package/esm/{array_plus → array}/find_last.d.ts +0 -0
- /package/esm/{array_plus → array}/find_last.js +0 -0
- /package/esm/{array_plus → array}/head.d.ts +0 -0
- /package/esm/{array_plus → array}/head.js +0 -0
- /package/esm/{array_plus → array}/intersect_of_props.d.ts +0 -0
- /package/esm/{array_plus → array}/intersect_of_props.js +0 -0
- /package/esm/{array_plus → array}/last.d.ts +0 -0
- /package/esm/{array_plus → array}/last.js +0 -0
- /package/esm/{array_plus → array}/literal_array.d.ts +0 -0
- /package/esm/{array_plus → array}/literal_array.js +0 -0
- /package/esm/{array_plus → array}/pad_left.js +0 -0
- /package/esm/{array_plus → array}/reduce_while.d.ts +0 -0
- /package/esm/{array_plus → array}/reduce_while.js +0 -0
- /package/esm/{array_plus → array}/reverse.d.ts +0 -0
- /package/esm/{array_plus → array}/reverse.js +0 -0
- /package/esm/{array_plus → array}/some.js +0 -0
- /package/esm/{array_plus → array}/tail.d.ts +0 -0
- /package/esm/{array_plus → array}/tail.js +0 -0
- /package/esm/{array_plus → array}/union_of_props.d.ts +0 -0
- /package/esm/{array_plus → array}/union_of_props.js +0 -0
- /package/esm/{array_plus → array}/union_of_values.d.ts +0 -0
- /package/esm/{array_plus → array}/union_of_values.js +0 -0
- /package/esm/{nominal-types → nominal}/types.d.ts +0 -0
- /package/esm/{nominal-types → nominal}/types.js +0 -0
- /package/esm/{number_plus → number}/number_plus.js +0 -0
- /package/ts/{array_plus → array}/common_prop_keys.ts +0 -0
- /package/ts/{array_plus → array}/find_first.ts +0 -0
- /package/ts/{array_plus → array}/find_last.ts +0 -0
- /package/ts/{array_plus → array}/head.ts +0 -0
- /package/ts/{array_plus → array}/intersect_of_props.ts +0 -0
- /package/ts/{array_plus → array}/last.ts +0 -0
- /package/ts/{array_plus → array}/literal_array.ts +0 -0
- /package/ts/{array_plus → array}/reduce_while.ts +0 -0
- /package/ts/{array_plus → array}/reverse.ts +0 -0
- /package/ts/{array_plus → array}/tail.ts +0 -0
- /package/ts/{array_plus → array}/union_of_props.ts +0 -0
- /package/ts/{array_plus → array}/union_of_values.ts +0 -0
- /package/ts/function/{AnyFunction.ts → any_function.ts} +0 -0
- /package/ts/{JSONTypes.ts → json.ts} +0 -0
- /package/ts/{nominal-types → nominal}/types.ts +0 -0
- /package/ts/{UnionKeys.ts → union_keys.ts} +0 -0
- /package/ts/{UnionToIntersection.ts → union_to_intersection.ts} +0 -0
package/README.md
CHANGED
|
@@ -6,16 +6,14 @@
|
|
|
6
6
|
[![GitHub NodeJS][github-nodejs]][github-action-url]
|
|
7
7
|
[![Codecov][codecov-image]][codecov-url]
|
|
8
8
|
|
|
9
|
-
[![Semantic Release][semantic-release-image]][semantic-release-url]
|
|
10
|
-
|
|
11
9
|
[![Visual Studio Code][vscode-image]][vscode-url]
|
|
12
|
-
[![Wallaby.js][wallaby-image]][wallaby-url]
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
Advance type utilities for [TypeScript].
|
|
15
12
|
|
|
16
13
|
## Feature Highlights
|
|
17
14
|
|
|
18
15
|
- [Type assertions](#type-assertions)
|
|
16
|
+
- [Type Checking](#type-checking)
|
|
19
17
|
- [Type Utilities](#type-utilities)
|
|
20
18
|
- [Nominal Types](#nominal-types)
|
|
21
19
|
- [Functional Types](#functional-types)
|
|
@@ -24,8 +22,10 @@ Provides additional types and type adjusted utilities for [TypeScript].
|
|
|
24
22
|
|
|
25
23
|
```sh
|
|
26
24
|
npm install type-plus
|
|
27
|
-
|
|
25
|
+
|
|
28
26
|
yarn add type-plus
|
|
27
|
+
|
|
28
|
+
pnpm add type-plus
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
## Type Assertions
|
|
@@ -299,6 +299,35 @@ IsNever<never> // true
|
|
|
299
299
|
IsNever<1> // false
|
|
300
300
|
```
|
|
301
301
|
|
|
302
|
+
## Type Checking
|
|
303
|
+
|
|
304
|
+
[type-plus](./README.md) privides type checking utilities for every type.
|
|
305
|
+
|
|
306
|
+
Each type has at least 4 type checks.
|
|
307
|
+
Using `string` as an example, there are `StringType<T>`, `IsString<T>`, `NotStringType<T>`, and `IsNotString<T>`.
|
|
308
|
+
|
|
309
|
+
Some types will have more checks, such as `boolean` has `StrictBooleanType<T>`, `TrueType<T>`, `FalseType<T>`.
|
|
310
|
+
|
|
311
|
+
You can learn more in their respective sections:
|
|
312
|
+
|
|
313
|
+
- [any](./ts/any/readme.md)
|
|
314
|
+
- [array](./ts/array/readme.md)
|
|
315
|
+
- [bigint](./ts/bigint/readme.md)
|
|
316
|
+
- [boolean](./ts/boolean/readme.md)
|
|
317
|
+
- [function](./ts/function/readme.md)
|
|
318
|
+
- [never](./ts/never/readme.md)
|
|
319
|
+
- [null](./ts/null/readme.md)
|
|
320
|
+
- [number](./ts/number/readme.md)
|
|
321
|
+
- [object](./ts/object/readme.md)
|
|
322
|
+
- [string](./ts/string/readme.md)
|
|
323
|
+
- [symbol](./ts/symbol/readme.md)
|
|
324
|
+
- [tuple](./ts/tuple/readme.md)
|
|
325
|
+
- [undefined](./ts/undefined/readme.md)
|
|
326
|
+
- [unknown](./ts/unknown/readme.md)
|
|
327
|
+
- [void](./ts/void/readme.md)
|
|
328
|
+
|
|
329
|
+
These checks
|
|
330
|
+
|
|
302
331
|
## Type Utilities
|
|
303
332
|
|
|
304
333
|
`type-plus` also provides additional type utilities.
|
|
@@ -487,6 +516,10 @@ So you may encounter some weird behavior if your logic is complex.
|
|
|
487
516
|
- `Increment<A, Fail=never>`: alias of `Add<A, 1, Fail>`.
|
|
488
517
|
- `Decrement<A, Fail=never>`: alias of `Subtract<A, 1, Fail>`.
|
|
489
518
|
|
|
519
|
+
### Tuple
|
|
520
|
+
|
|
521
|
+
- [`TupleType`](ts/tuple/readme.md#tupletype)
|
|
522
|
+
|
|
490
523
|
### Utility Functions
|
|
491
524
|
|
|
492
525
|
- `amend(subject)...`: amend subject as union or intersect of `T`.
|
|
@@ -621,6 +654,7 @@ Whenever possible, I add attribution to the person who created those **codes** i
|
|
|
621
654
|
## Similar projects
|
|
622
655
|
|
|
623
656
|
- [expect-type]: Compile-time tests for types
|
|
657
|
+
- [hotscript]: Higher-order TypeScript
|
|
624
658
|
- [spec.ts]: write tests for your types!
|
|
625
659
|
- [ts-essentials]: all essential TypeScript types in one place.
|
|
626
660
|
- [ts-expect]: Checks values in TypeScript match expectations.
|
|
@@ -658,10 +692,9 @@ git push
|
|
|
658
692
|
[expect-type]: https://github.com/mmkal/expect-type
|
|
659
693
|
[github-action-url]: https://github.com/unional/type-plus/actions
|
|
660
694
|
[github-nodejs]: https://github.com/unional/type-plus/workflows/nodejs/badge.svg
|
|
695
|
+
[hotscript]: https://github.com/gvergnaud/hotscript
|
|
661
696
|
[npm-image]: https://img.shields.io/npm/v/type-plus.svg?style=flat
|
|
662
697
|
[npm-url]: https://npmjs.org/package/type-plus
|
|
663
|
-
[semantic-release-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
|
|
664
|
-
[semantic-release-url]: https://github.com/semantic-release/semantic-release
|
|
665
698
|
[spec.ts]: https://github.com/aleclarson/spec.ts
|
|
666
699
|
[ts-essentials]: https://github.com/ts-essentials/ts-essentials
|
|
667
700
|
[ts-expect]: https://github.com/TypeStrong/ts-expect
|
|
@@ -676,5 +709,3 @@ git push
|
|
|
676
709
|
[utility-types]: https://github.com/piotrwitek/utility-types
|
|
677
710
|
[vscode-image]: https://img.shields.io/badge/vscode-ready-green.svg
|
|
678
711
|
[vscode-url]: https://code.visualstudio.com/
|
|
679
|
-
[wallaby-image]: https://img.shields.io/badge/wallaby.js-configured-green.svg
|
|
680
|
-
[wallaby-url]: https://wallabyjs.com
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { IsNever } from '../never/never_type.js';
|
|
2
|
+
import type { IsAny } from './any_type.js';
|
|
3
|
+
/**
|
|
4
|
+
* Is `T` type `any` or `never`.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* import type { IsAnyOrNever } from 'type-plus'
|
|
8
|
+
*
|
|
9
|
+
* type R = IsAnyOrNever<any> // true
|
|
10
|
+
* type R = IsAnyOrNever<never> // true
|
|
11
|
+
*
|
|
12
|
+
* type R = IsAnyOrNever<1> // false
|
|
13
|
+
* type R = IsAnyOrNever<unknown> // false
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export type IsAnyOrNever<T, Then = true, Else = false> = IsNever<T, Then, IsAny<T, Then, Else>>;
|
|
17
|
+
//# sourceMappingURL=any_or_never.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"any_or_never.d.ts","sourceRoot":"","sources":["../../ts/any/any_or_never.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAE1C;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"any_or_never.js","sourceRoot":"","sources":["../../ts/any/any_or_never.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if the type `T` is exactly `any`.
|
|
3
|
+
*
|
|
4
|
+
* ```
|
|
5
|
+
* import type { AnyType } from 'type-plus'
|
|
6
|
+
*
|
|
7
|
+
* type R = AnyType<any> // any
|
|
8
|
+
*
|
|
9
|
+
* type R = AnyType<never> // never
|
|
10
|
+
* type R = AnyType<unknown> // never
|
|
11
|
+
* type R = AnyType<string | boolean> // never
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export type AnyType<T, Then = T, Else = never> = 0 extends 1 & T ? Then : Else;
|
|
15
|
+
/**
|
|
16
|
+
* Is the type `T` exactly `any`.
|
|
17
|
+
*
|
|
18
|
+
* ```
|
|
19
|
+
* import type { IsAny } from 'type-plus'
|
|
20
|
+
*
|
|
21
|
+
* type R = IsAny<any> // true
|
|
22
|
+
*
|
|
23
|
+
* type R = IsAny<never> // false
|
|
24
|
+
* type R = IsAny<unknown> // false
|
|
25
|
+
* type R = IsAny<string | boolean> // false
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export type IsAny<T, Then = true, Else = false> = AnyType<T, Then, Else>;
|
|
29
|
+
/**
|
|
30
|
+
* Check if the type `T` is not `any`.
|
|
31
|
+
*
|
|
32
|
+
* ```
|
|
33
|
+
* import type { NotAnyType } from 'type-plus'
|
|
34
|
+
*
|
|
35
|
+
* type R = NotAnyType<any> // never
|
|
36
|
+
*
|
|
37
|
+
* type R = NotAnyType<never> // never
|
|
38
|
+
* type R = NotAnyType<unknown> // unknown
|
|
39
|
+
* type R = NotAnyType<string | boolean> // string | boolean
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export type NotAnyType<T, Then = T, Else = never> = AnyType<T, Else, Then>;
|
|
43
|
+
/**
|
|
44
|
+
* Is the type `T` not `any`.
|
|
45
|
+
*
|
|
46
|
+
* ```
|
|
47
|
+
* import type { IsNotAny } from 'type-plus'
|
|
48
|
+
*
|
|
49
|
+
* type R = IsNotAny<any> // false
|
|
50
|
+
*
|
|
51
|
+
* type R = IsNotAny<never> // true
|
|
52
|
+
* type R = IsNotAny<unknown> // true
|
|
53
|
+
* type R = IsNotAny<string | boolean> // true
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export type IsNotAny<T, Then = true, Else = false> = AnyType<T, Else, Then>;
|
|
57
|
+
//# sourceMappingURL=any_type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"any_type.d.ts","sourceRoot":"","sources":["../../ts/any/any_type.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAA;AAE9E;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAExE;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE1E;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"any_type.js","sourceRoot":"","sources":["../../ts/any/any_type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { IndexAt } from './array_index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Gets the type of the array or tuple at index `N`.
|
|
4
|
+
*
|
|
5
|
+
* Like `Array.at()`, this type supports negative numbers.
|
|
6
|
+
*
|
|
7
|
+
* @alias ArrayPlus.At
|
|
8
|
+
* @see https://github.com/microsoft/TypeScript/issues/53345#issuecomment-1477138167
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* import type { At } from 'type-plus'
|
|
12
|
+
*
|
|
13
|
+
* type R = At<[1, 2, 3], 2> // 3
|
|
14
|
+
* type R = At<[1, 2, 3], -1> // 3
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export type At<A extends unknown[], N extends number, Fail = never> = IndexAt<A, N, Fail> extends infer I ? I extends number ? A[I] : Fail : never;
|
|
18
|
+
/**
|
|
19
|
+
* Concats two arrays.
|
|
20
|
+
*
|
|
21
|
+
* alias of: `[...A, ...B]`
|
|
22
|
+
*
|
|
23
|
+
* @alias ArrayPlus.Concat
|
|
24
|
+
*
|
|
25
|
+
* ```ts
|
|
26
|
+
* import type { Concat } form 'type-plus'
|
|
27
|
+
*
|
|
28
|
+
* type R = Concat<[1], [2, 3]> // [1, 2, 3]
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export type Concat<A extends unknown[], B extends unknown[]> = [...A, ...B];
|
|
32
|
+
//# sourceMappingURL=array.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../ts/array/array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE/C;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,EAAE,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,SAAS,MAAM,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,SAAS,MAAM,CAAC,GACtG,CAAC,SAAS,MAAM,GACf,CAAC,CAAC,CAAC,CAAC,GACJ,IAAI,GACL,KAAK,CAAA;AAER;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array.js","sourceRoot":"","sources":["../../ts/array/array.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { IsAny } from '../any/any_type.js';
|
|
2
|
+
import type { Equal } from '../equal/equal.js';
|
|
3
|
+
import type { Abs } from '../math/Abs.js';
|
|
4
|
+
import type { GreaterThan } from '../math/GreaterThan.js';
|
|
5
|
+
import type { Subtract } from '../math/Subtract.js';
|
|
6
|
+
import type { IsNever } from '../never/never_type.js';
|
|
7
|
+
import type { Integer } from '../number/integer.js';
|
|
8
|
+
import type { Negative } from '../number/negative.js';
|
|
9
|
+
import type { StrictNumberType } from '../number/strict_number_type.js';
|
|
10
|
+
/**
|
|
11
|
+
* Gets the normalized index to access the element of an array or tuple.
|
|
12
|
+
*
|
|
13
|
+
* ```
|
|
14
|
+
* import type { ArrayPlus } from 'type-plus'
|
|
15
|
+
*
|
|
16
|
+
* type R = ArrayPlus.IndexAt<['a', 'b', 'c'], 2> // 2
|
|
17
|
+
* type R = ArrayPlus.IndexAt<['a', 'b', 'c'], -2> // 1
|
|
18
|
+
*
|
|
19
|
+
* type R = ArrayPlus.IndexAt<['a', 'b', 'c'], 3> // never
|
|
20
|
+
* type R = ArrayPlus.IndexAt<['a', 'b', 'c'], -4> // never
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export type IndexAt<A extends Array<unknown>, N extends number, Fail = never> = Equal<A['length'], 0, Fail, Integer<N, StrictNumberType<A['length'], N, Negative<N, GreaterThan<Abs<N>, A['length']> extends true ? Fail : Subtract<A['length'], Abs<N>>, GreaterThan<A['length'], N> extends true ? N : Fail>>, IsAny<N, number, StrictNumberType<N, N>>>>;
|
|
24
|
+
/**
|
|
25
|
+
* Is N an out of bound index of A.
|
|
26
|
+
*
|
|
27
|
+
* ```
|
|
28
|
+
* import { IsIndexOutOfBound } from 'type-plus'
|
|
29
|
+
*
|
|
30
|
+
* type R = IsIndexOutOfBound<[1], 0> // false
|
|
31
|
+
* type R = IsIndexOutOfBound<[1], -1> // false
|
|
32
|
+
|
|
33
|
+
* type R = IsIndexOutOfBound<[1], 1> // true
|
|
34
|
+
* type R = IsIndexOutOfBound<[1], -2> // true
|
|
35
|
+
*/
|
|
36
|
+
export type IsIndexOutOfBound<A extends unknown[], N extends number, Then = true, Else = false> = IsNever<IndexAt<A, N>, Then, Else>;
|
|
37
|
+
//# sourceMappingURL=array_index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array_index.d.ts","sourceRoot":"","sources":["../../ts/array/array_index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAEvE;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,SAAS,MAAM,EAAE,IAAI,GAAG,KAAK,IAAI,KAAK,CACpF,CAAC,CAAC,QAAQ,CAAC,EACX,CAAC,EACD,IAAI,EACJ,OAAO,CACN,CAAC,EACD,gBAAgB,CACf,CAAC,CAAC,QAAQ,CAAC,EAEX,CAAC,EAED,QAAQ,CACP,CAAC,EACD,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EACpF,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,IAAI,GAAG,CAAC,GAAG,IAAI,CACnD,CACD,EAED,KAAK,CACJ,CAAC,EACD,MAAM,EACN,gBAAgB,CACf,CAAC,EAED,CAAC,CACD,CACD,CACD,CACD,CAAA;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,SAAS,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,CACxG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EACb,IAAI,EACJ,IAAI,CACJ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array_index.js","sourceRoot":"","sources":["../../ts/array/array_index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array_plus.d.ts","sourceRoot":"","sources":["../../ts/array/array_plus.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAC5C,YAAY,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array_plus.js","sourceRoot":"","sources":["../../ts/array/array_plus.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { IsNever } from '../never/never_type.js';
|
|
2
|
+
import type { StrictNumberType } from '../number/strict_number_type.js';
|
|
3
|
+
/**
|
|
4
|
+
* Check if the type `T` is an array and not a tuple.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* import type { ArrayType } from 'type-plus'
|
|
8
|
+
*
|
|
9
|
+
* type R = ArrayType<number[]> // number[]
|
|
10
|
+
*
|
|
11
|
+
* type R = ArrayType<[1]> // never
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export type ArrayType<T, Then = T, Else = never> = IsNever<T, Else, [
|
|
15
|
+
any[]
|
|
16
|
+
] extends [T] ? ([T] extends [any[]] ? StrictNumberType<T['length'], Then, Else> : Else) : Else>;
|
|
17
|
+
/**
|
|
18
|
+
* Check if the type `T` is not an array.
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* import type { NotArrayType } from 'type-plus'
|
|
22
|
+
*
|
|
23
|
+
* type R = NotArrayType<number[]> // never
|
|
24
|
+
*
|
|
25
|
+
* type R = NotArrayType<number> // number
|
|
26
|
+
* type R = NotArrayType<[1]> // [1]
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export type NotArrayType<T, Then = T, Else = never> = ArrayType<T, Else, Then>;
|
|
30
|
+
/**
|
|
31
|
+
* Is `T` an array?
|
|
32
|
+
*
|
|
33
|
+
* ```ts
|
|
34
|
+
* import type { IsArray } from 'type-plus'
|
|
35
|
+
*
|
|
36
|
+
* type R = IsArray<number[]> // true
|
|
37
|
+
*
|
|
38
|
+
* type R = IsArray<number> // false
|
|
39
|
+
* type R = IsArray<[1]> // false
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export type IsArray<T, Then = true, Else = false> = ArrayType<T, Then, Else>;
|
|
43
|
+
/**
|
|
44
|
+
* Is `T` not an array?
|
|
45
|
+
*
|
|
46
|
+
* ```ts
|
|
47
|
+
* import type { IsNotArray } from 'type-plus'
|
|
48
|
+
*
|
|
49
|
+
* type R = IsNotArray<number[]> // false
|
|
50
|
+
*
|
|
51
|
+
* type R = IsNotArray<number> // true
|
|
52
|
+
* type R = IsNotArray<[1]> // true
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export type IsNotArray<T, Then = true, Else = false> = ArrayType<T, Else, Then>;
|
|
56
|
+
//# sourceMappingURL=array_type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array_type.d.ts","sourceRoot":"","sources":["../../ts/array/array_type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAEvE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,OAAO,CACzD,CAAC,EACD,IAAI,EACJ;IAAC,GAAG,EAAE;CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,IAAI,CACrG,CAAA;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,IAAI,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE9E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;AAE5E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array_type.js","sourceRoot":"","sources":["../../ts/array/array_type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common_prop_keys.d.ts","sourceRoot":"","sources":["../../ts/array/common_prop_keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAErC;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACpF,KAAK,GACL,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACrB,MAAM,CAAC,CAAC,CAAC,CAAC,GACV,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACrB,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,GACvB,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAE1D;;;GAGG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,IAAI,cAAc,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common_prop_keys.js","sourceRoot":"","sources":["../../ts/array/common_prop_keys.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DigitArray } from '../math/index.js';
|
|
2
|
+
import type { IsInteger } from '../number/integer.js';
|
|
3
|
+
import type { IsPositive } from '../number/positive.js';
|
|
4
|
+
/**
|
|
5
|
+
* Creates `Tuple<T>` with `L` number of elements.
|
|
6
|
+
* @note Other cool implementations by @lazytype, @jcalz:
|
|
7
|
+
* @see https://github.com/microsoft/TypeScript/issues/26223#issuecomment-674514787
|
|
8
|
+
* @see https://github.com/microsoft/TypeScript/issues/47874#issuecomment-1039157322
|
|
9
|
+
*/
|
|
10
|
+
export type CreateTuple<L extends number, T = unknown, Fail = never> = number extends L ? T[] : IsPositive<L> extends true ? IsInteger<L> extends true ? DigitArray.ToTuple<[], DigitArray.FromNumber<L>, T> : Fail : Fail;
|
|
11
|
+
//# sourceMappingURL=create_tuple.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_tuple.d.ts","sourceRoot":"","sources":["../../ts/array/create_tuple.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAEvD;;;;;GAKG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,GAAG,OAAO,EAAE,IAAI,GAAG,KAAK,IAAI,MAAM,SAAS,CAAC,GACpF,CAAC,EAAE,GACH,UAAU,CAAC,CAAC,CAAC,SAAS,IAAI,GAC1B,SAAS,CAAC,CAAC,CAAC,SAAS,IAAI,GACxB,UAAU,CAAC,OAAO,CAAC,EAAE,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,GACnD,IAAI,GACL,IAAI,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_tuple.js","sourceRoot":"","sources":["../../ts/array/create_tuple.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Equal } from '../equal/equal.js';
|
|
2
|
+
import type { NonNull, NonUndefined } from '../utils/index.js';
|
|
3
|
+
export type DropFirst<A extends any[]> = number extends A['length'] ? A : A['length'] extends 0 ? never[] : A['length'] extends 1 ? never[] : A extends [any, ...infer Tail] ? Tail : never;
|
|
4
|
+
export type DropLast<A extends any[]> = number extends A['length'] ? A : A['length'] extends 0 ? never[] : A['length'] extends 1 ? never[] : A extends [...infer Heads, any] ? Heads : never;
|
|
5
|
+
type ExcludeUnionOfEmptyTuple<A> = Equal<A, []> extends true ? A : Exclude<A, []>;
|
|
6
|
+
/**
|
|
7
|
+
* drops entries matching `Criteria` in array or tuple `A`.
|
|
8
|
+
*/
|
|
9
|
+
export type DropMatch<A extends Readonly<Array<any>>, Criteria> = number extends A['length'] ? A[0] extends Criteria ? never[] : undefined extends Criteria ? null extends Criteria ? Array<NonNullable<A[0]>> : Array<NonUndefined<A[0]>> : null extends Criteria ? Array<NonNull<A[0]>> : Criteria extends A[0] ? Array<Exclude<A[0], Criteria>> : A[0] extends Criteria ? A : Array<Exclude<A[0], Criteria>> : DropMatchTuple<A, Criteria>;
|
|
10
|
+
type DropMatchTuple<A extends Readonly<Array<any>>, Criteria> = A['length'] extends 0 ? A : A extends readonly [infer Head, ...infer Tail] ? Tail['length'] extends 0 ? undefined extends Criteria ? ExcludeUnionOfEmptyTuple<Head extends Criteria ? [] : [Head]> : ExcludeUnionOfEmptyTuple<Head extends Criteria ? [] : [Head]> : Exclude<Head, Criteria> extends never ? DropMatch<Tail, Criteria> : [Exclude<Head, Criteria>, ...DropMatch<Tail, Criteria>] : never[];
|
|
11
|
+
export type DropNull<A extends Array<any>> = DropMatch<A, null>;
|
|
12
|
+
export type DropNullable<A extends Array<any>> = DropMatch<A, null | undefined>;
|
|
13
|
+
export type DropUndefined<A extends Array<any>> = DropMatch<A, undefined>;
|
|
14
|
+
/**
|
|
15
|
+
* drop a particular value from an array
|
|
16
|
+
*/
|
|
17
|
+
export declare function drop<A extends Readonly<Array<any>>, C>(array: A, value: C): DropMatch<A, C>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=drop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drop.d.ts","sourceRoot":"","sources":["../../ts/array/drop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAE9D,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,GAAG,EAAE,IAAI,MAAM,SAAS,CAAC,CAAC,QAAQ,CAAC,GAChE,CAAC,GACD,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACrB,KAAK,EAAE,GACP,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACrB,KAAK,EAAE,GACP,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,MAAM,IAAI,CAAC,GAC9B,IAAI,GACJ,KAAK,CAAA;AAER,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,GAAG,EAAE,IAAI,MAAM,SAAS,CAAC,CAAC,QAAQ,CAAC,GAC/D,CAAC,GACD,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACrB,KAAK,EAAE,GACP,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACrB,KAAK,EAAE,GACP,CAAC,SAAS,CAAC,GAAG,MAAM,KAAK,EAAE,GAAG,CAAC,GAC/B,KAAK,GACL,KAAK,CAAA;AAER,KAAK,wBAAwB,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,IAAI,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;AAEjF;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,IAAI,MAAM,SAAS,CAAC,CAAC,QAAQ,CAAC,GAEzF,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GAEpB,KAAK,EAAE,GACP,SAAS,SAAS,QAAQ,GAC1B,IAAI,SAAS,QAAQ,GACpB,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACxB,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAC1B,IAAI,SAAS,QAAQ,GACrB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACpB,QAAQ,SAAS,CAAC,CAAC,CAAC,CAAC,GACrB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,GAC9B,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GACrB,CAAC,GACD,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,GAC/B,cAAc,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;AAE9B,KAAK,cAAc,CAAC,CAAC,SAAS,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GAElF,CAAC,GACD,CAAC,SAAS,SAAS,CAAC,MAAM,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,GAC9C,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,GAEvB,SAAS,SAAS,QAAQ,GACzB,wBAAwB,CAAC,IAAI,SAAS,QAAQ,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,GAC7D,wBAAwB,CAAC,IAAI,SAAS,QAAQ,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,GAEhE,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,KAAK,GACnC,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,GACzB,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,GAAG,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,GACxD,KAAK,EAAE,CAAA;AAEV,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;AAC/D,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC,CAAA;AAC/E,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAA;AAEzE;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAE3F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drop.js","sourceRoot":"","sources":["../../ts/array/drop.ts"],"names":[],"mappings":";;;AAiEA;;GAEG;AACH,SAAgB,IAAI,CAAoC,KAAQ,EAAE,KAAQ;IACzE,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,KAAK,CAAoB,CAAA;AACzD,CAAC;AAFD,oBAEC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* filter the array or tuple `A`, keeping entries satisfying `Criteria`.
|
|
3
|
+
*/
|
|
4
|
+
export type Filter<A extends Array<any>, Criteria> = number extends A['length'] ? A[0] extends Criteria ? A : Criteria extends A[0] ? Array<Criteria> : never[] : A['length'] extends 0 ? never : A extends [infer Head, ...infer Tail] ? Tail['length'] extends 0 ? Head extends Criteria ? [Head] : never[] : Head extends Criteria ? [Head, ...Filter<Tail, Criteria>] : Filter<Tail, Criteria> : never;
|
|
5
|
+
/**
|
|
6
|
+
* keeps entries satisfying `Criteria` in array or tuple `A`.
|
|
7
|
+
*/
|
|
8
|
+
export type KeepMatch<A extends Array<any>, Criteria> = Filter<A, Criteria>;
|
|
9
|
+
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../ts/array/filter.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,EAAE,QAAQ,IAAI,MAAM,SAAS,CAAC,CAAC,QAAQ,CAAC,GAE5E,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GACpB,CAAC,GACD,QAAQ,SAAS,CAAC,CAAC,CAAC,CAAC,GACrB,KAAK,CAAC,QAAQ,CAAC,GACf,KAAK,EAAE,GAEV,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACnB,KAAK,GACL,CAAC,SAAS,CAAC,MAAM,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,GACrC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,GACvB,IAAI,SAAS,QAAQ,GACpB,CAAC,IAAI,CAAC,GACN,KAAK,EAAE,GACR,IAAI,SAAS,QAAQ,GACrB,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,GACjC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,GACvB,KAAK,CAAA;AAER;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,EAAE,QAAQ,IAAI,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter.js","sourceRoot":"","sources":["../../ts/array/filter.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find_first.d.ts","sourceRoot":"","sources":["../../ts/array/find_first.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,EAAE,QAAQ,IAAI,MAAM,SAAS,CAAC,CAAC,QAAQ,CAAC,GAC/E,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GACpB,CAAC,CAAC,CAAC,CAAC,GACJ,KAAK,GACN,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACrB,KAAK,GACL,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,MAAM,IAAI,CAAC,GAC9B,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GACpB,CAAC,CAAC,CAAC,CAAC,GACJ,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,GAC1B,KAAK,CAAA;AAER;;GAEG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,GAAG,EAAE,EAAE,QAAQ,IAAI,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find_first.js","sourceRoot":"","sources":["../../ts/array/find_first.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find_last.d.ts","sourceRoot":"","sources":["../../ts/array/find_last.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,EAAE,QAAQ,IAAI,MAAM,SAAS,CAAC,CAAC,QAAQ,CAAC,GAC9E,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GACpB,CAAC,CAAC,CAAC,CAAC,GACJ,KAAK,GACN,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACrB,KAAK,GACL,CAAC,SAAS,CAAC,GAAG,MAAM,KAAK,EAAE,MAAM,IAAI,CAAC,GACtC,IAAI,SAAS,QAAQ,GACpB,IAAI,GACJ,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,GAC1B,KAAK,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find_last.js","sourceRoot":"","sources":["../../ts/array/find_last.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"head.d.ts","sourceRoot":"","sources":["../../ts/array/head.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,CAAC,CAAC,SAAS,GAAG,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"head.js","sourceRoot":"","sources":["../../ts/array/head.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from './common_prop_keys.js';
|
|
2
|
+
export * from './create_tuple.js';
|
|
3
|
+
export * from './drop.js';
|
|
4
|
+
export * from './filter.js';
|
|
5
|
+
export * from './find_first.js';
|
|
6
|
+
export * from './find_last.js';
|
|
7
|
+
export * from './head.js';
|
|
8
|
+
export * from './intersect_of_props.js';
|
|
9
|
+
export * from './last.js';
|
|
10
|
+
export * from './literal_array.js';
|
|
11
|
+
export * from './pad_left.js';
|
|
12
|
+
export * from './reduce_while.js';
|
|
13
|
+
export * from './reverse.js';
|
|
14
|
+
export * from './some.js';
|
|
15
|
+
export * from './tail.js';
|
|
16
|
+
export * from './union_of_props.js';
|
|
17
|
+
export * from './union_of_values.js';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../ts/array/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,yBAAyB,CAAA;AACvC,cAAc,WAAW,CAAA;AACzB,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./common_prop_keys.js"), exports);
|
|
18
|
+
__exportStar(require("./create_tuple.js"), exports);
|
|
19
|
+
__exportStar(require("./drop.js"), exports);
|
|
20
|
+
__exportStar(require("./filter.js"), exports);
|
|
21
|
+
__exportStar(require("./find_first.js"), exports);
|
|
22
|
+
__exportStar(require("./find_last.js"), exports);
|
|
23
|
+
__exportStar(require("./head.js"), exports);
|
|
24
|
+
__exportStar(require("./intersect_of_props.js"), exports);
|
|
25
|
+
__exportStar(require("./last.js"), exports);
|
|
26
|
+
__exportStar(require("./literal_array.js"), exports);
|
|
27
|
+
__exportStar(require("./pad_left.js"), exports);
|
|
28
|
+
__exportStar(require("./reduce_while.js"), exports);
|
|
29
|
+
__exportStar(require("./reverse.js"), exports);
|
|
30
|
+
__exportStar(require("./some.js"), exports);
|
|
31
|
+
__exportStar(require("./tail.js"), exports);
|
|
32
|
+
__exportStar(require("./union_of_props.js"), exports);
|
|
33
|
+
__exportStar(require("./union_of_values.js"), exports);
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../ts/array/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAqC;AACrC,oDAAiC;AACjC,4CAAyB;AACzB,8CAA2B;AAC3B,kDAA+B;AAC/B,iDAA8B;AAC9B,4CAAyB;AACzB,0DAAuC;AACvC,4CAAyB;AACzB,qDAAkC;AAClC,gDAA6B;AAC7B,oDAAiC;AACjC,+CAA4B;AAC5B,4CAAyB;AACzB,4CAAyB;AACzB,sDAAmC;AACnC,uDAAoC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intersect_of_props.d.ts","sourceRoot":"","sources":["../../ts/array/intersect_of_props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAErC;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,SAAS,QAAQ,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACvG,KAAK,GACL,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACrB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACP,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAEzC;;;GAGG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,SAAS,QAAQ,IAAI,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intersect_of_props.js","sourceRoot":"","sources":["../../ts/array/intersect_of_props.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"last.d.ts","sourceRoot":"","sources":["../../ts/array/last.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,IAAI,CAAC,CAAC,SAAS,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"last.js","sourceRoot":"","sources":["../../ts/array/last.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"literal_array.d.ts","sourceRoot":"","sources":["../../ts/array/literal_array.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAElD,wBAAgB,YAAY,CAAC,CAAC,SAAS,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAErE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"literal_array.js","sourceRoot":"","sources":["../../ts/array/literal_array.ts"],"names":[],"mappings":";;;AAEA,SAAgB,YAAY,CAAqB,GAAG,OAAY;IAC/D,OAAO,OAAO,CAAA;AACf,CAAC;AAFD,oCAEC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IsAny } from '../any/any_type.js';
|
|
2
|
+
import type { Equal } from '../equal/equal.js';
|
|
3
|
+
import type { CreateTuple } from './create_tuple.js';
|
|
4
|
+
import type { UnionOfValues } from './union_of_values.js';
|
|
5
|
+
export type PadLeft<A extends any[], Total extends number, PadWith = any> = number extends A['length'] ? IsAny<UnionOfValues<A>> extends true ? A : Equal<UnionOfValues<A>, PadWith> extends true ? A : PadLeft<[...CreateTuple<Total, PadWith>, ...A], Total, PadWith> : CreateTuple<Total, any> extends [...infer U, ...A] ? number extends U['length'] ? A : [...CreateTuple<U['length'], PadWith>, ...A] : A;
|
|
6
|
+
//# sourceMappingURL=pad_left.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pad_left.d.ts","sourceRoot":"","sources":["../../ts/array/pad_left.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEzD,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,GAAG,EAAE,EAAE,KAAK,SAAS,MAAM,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,SAAS,CAAC,CAAC,QAAQ,CAAC,GACnG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,GACnC,CAAC,GACD,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,IAAI,GAC7C,CAAC,GACD,OAAO,CAAC,CAAC,GAAG,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,GAChE,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC,GAClD,MAAM,SAAS,CAAC,CAAC,QAAQ,CAAC,GACzB,CAAC,GACD,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,EAAE,GAAG,CAAC,CAAC,GAC7C,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pad_left.js","sourceRoot":"","sources":["../../ts/array/pad_left.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reduce_while.d.ts","sourceRoot":"","sources":["../../ts/array/reduce_while.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAC/B,SAAS,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,KAAK,OAAO,EAC/C,UAAU,EAAE,CAAC,aAAa,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EACtF,YAAY,EAAE,CAAC,EACf,KAAK,EAAE,CAAC,EAAE,KASV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reduce_while.js","sourceRoot":"","sources":["../../ts/array/reduce_while.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAC1B,SAA+C,EAC/C,UAAsF,EACtF,YAAe,EACf,KAAU;IAEV,IAAI,GAAG,GAAG,YAAY,CAAA;IACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;QACtB,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC;YAAE,OAAO,GAAG,CAAA;QACtC,GAAG,GAAG,UAAU,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,CAAA;KACtC;IACD,OAAO,GAAG,CAAA;AACX,CAAC;AAbD,kCAaC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reverse.d.ts","sourceRoot":"","sources":["../../ts/array/reverse.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,MAAM,SAAS,CAAC,CAAC,QAAQ,CAAC,GAClE,CAAC,GACD,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACrB,CAAC,GACD,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GACrB,CAAC,GACD,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,CAAC,GAC3B,CAAC,SAAS,GAAG,EAAE,GACd,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GACrB,KAAK,GACN,KAAK,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reverse.js","sourceRoot":"","sources":["../../ts/array/reverse.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Equal } from '../equal/equal.js';
|
|
2
|
+
import type { Tail } from './tail.js';
|
|
3
|
+
import type { UnionOfValues } from './union_of_values.js';
|
|
4
|
+
export type Some<A extends any[], Criteria, Mode extends 'strict' | 'loose' = 'loose', Then = true, Else = false> = Mode extends 'strict' ? Some.Strict<A, Criteria, Then, Else> : number extends A['length'] ? UnionOfValues<A> extends Criteria ? Then : Else : A['length'] extends 0 ? Else : A[0] extends Criteria ? Then : Some<Tail<A>, Criteria, 'loose', Then, Else>;
|
|
5
|
+
export declare namespace Some {
|
|
6
|
+
type Strict<A extends any[], Criteria, Then, Else> = number extends A['length'] ? Equal<UnionOfValues<A>, Criteria> extends true ? Then : Else : A['length'] extends 0 ? Else : Equal<A[0], Criteria> extends true ? Then : Strict<Tail<A>, Criteria, Then, Else>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=some.d.ts.map
|