structured-outputs 0.1.0-beta.2 → 0.1.0-beta.20
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +77 -6
- package/esm/ResponseFormat.js +33 -5
- package/esm/ResponseFormat.js.map +1 -1
- package/esm/Tool.js +17 -0
- package/esm/Tool.js.map +1 -0
- package/esm/_dnt.polyfills.js +16 -0
- package/esm/_dnt.polyfills.js.map +1 -0
- package/esm/_dnt.shims.js +58 -0
- package/esm/_dnt.shims.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.js +47 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.js +47 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/assert.js +23 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/assert.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.js +31 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/equal.js +184 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/equal.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/equals.js +46 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/equals.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/exists.js +28 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/exists.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/fail.js +21 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/fail.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/false.js +23 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/false.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.js +53 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.js +54 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/less.js +29 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/less.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/match.js +27 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/match.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/mod.js +46 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/mod.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.js +33 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js +30 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.js +27 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js +33 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.js +160 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.js +54 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.js +58 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.js +27 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/throws.js +45 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/throws.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.js +21 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.js.map +1 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.js +21 -0
- package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/_utils.js +19 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/_utils.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.js +51 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/associate_by.js +45 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/associate_by.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/associate_with.js +41 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/associate_with.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/chunk.js +51 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/chunk.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/deep_merge.js +96 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/deep_merge.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/distinct.js +28 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/distinct.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/distinct_by.js +39 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/distinct_by.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/drop_last_while.js +33 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/drop_last_while.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/drop_while.js +34 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/drop_while.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/filter_entries.js +43 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/filter_entries.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/filter_keys.js +46 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/filter_keys.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/filter_values.js +46 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/filter_values.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/find_single.js +45 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/find_single.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.js +42 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/includes_value.js +39 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/includes_value.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/intersect.js +36 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/intersect.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/invert.js +29 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/invert.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/invert_by.js +46 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/invert_by.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/join_to_string.js +59 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/join_to_string.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_entries.js +47 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_entries.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_keys.js +42 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_keys.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.js +43 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_values.js +13 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_values.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/max_by.js +15 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/max_by.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/max_of.js +17 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/max_of.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/max_with.js +41 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/max_with.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/min_by.js +15 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/min_by.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/min_of.js +17 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/min_of.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/min_with.js +37 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/min_with.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/mod.js +75 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/mod.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/omit.js +29 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/omit.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/partition.js +16 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/partition.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/partition_entries.js +54 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/partition_entries.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/permutations.js +58 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/permutations.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/pick.js +33 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/pick.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/reduce_groups.js +40 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/reduce_groups.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/running_reduce.js +32 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/running_reduce.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sample.js +35 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sample.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sliding_windows.js +57 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sliding_windows.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sort_by.js +30 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sort_by.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sum_of.js +37 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sum_of.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/take_last_while.js +34 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/take_last_while.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/take_while.js +39 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/take_while.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/union.js +34 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/union.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/unzip.js +46 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/unzip.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/without_all.js +28 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/without_all.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/zip.js +43 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/zip.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js +111 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js +277 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js +180 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.js +38 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/format.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js +208 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js.map +1 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.js +3 -0
- package/esm/deps/jsr.io/@std/internal/1.0.5/types.js.map +1 -0
- package/esm/mod.js +3 -10
- package/esm/mod.js.map +1 -1
- package/esm/types/Ref.js +11 -0
- package/esm/types/Ref.js.map +1 -0
- package/esm/types/RootTy.js +19 -0
- package/esm/types/RootTy.js.map +1 -0
- package/esm/types/Ty.js +17 -0
- package/esm/types/Ty.js.map +1 -0
- package/esm/types/array.js +9 -0
- package/esm/types/array.js.map +1 -0
- package/esm/types/constant.js +8 -0
- package/esm/types/constant.js.map +1 -0
- package/esm/types/constantUnion.js +25 -0
- package/esm/types/constantUnion.js.map +1 -0
- package/esm/types/leaves.js +18 -0
- package/esm/types/leaves.js.map +1 -0
- package/esm/types/mod.js +11 -0
- package/esm/types/mod.js.map +1 -0
- package/esm/{object.js → types/object.js} +4 -4
- package/esm/types/object.js.map +1 -0
- package/esm/types/std/Option.js +9 -0
- package/esm/types/std/Option.js.map +1 -0
- package/esm/types/std/Wrapper.js +5 -0
- package/esm/types/std/Wrapper.js.map +1 -0
- package/esm/types/std/mod.js +3 -0
- package/esm/types/std/mod.js.map +1 -0
- package/esm/types/taggedUnion.js +20 -0
- package/esm/types/taggedUnion.js.map +1 -0
- package/esm/util/phantoms.js +4 -0
- package/esm/util/phantoms.js.map +1 -0
- package/esm/util/recombineTaggedTemplateArgs.js +4 -0
- package/esm/util/recombineTaggedTemplateArgs.js.map +1 -0
- package/package.json +10 -7
- package/src/ResponseFormat.ts +76 -25
- package/src/Tool.ts +38 -0
- package/src/_dnt.polyfills.ts +27 -0
- package/src/_dnt.shims.ts +60 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/almost_equals.ts +55 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/array_includes.ts +57 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/assert.ts +23 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/assertion_error.ts +31 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/equal.ts +210 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/equals.ts +52 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/exists.ts +31 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/fail.ts +21 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/false.ts +26 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/greater.ts +30 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.ts +36 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/instance_of.ts +64 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/is_error.ts +65 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/less.ts +29 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/less_or_equal.ts +36 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/match.ts +30 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/mod.ts +47 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/not_equals.ts +36 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/not_instance_of.ts +33 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/not_match.ts +30 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.ts +42 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/object_match.ts +202 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/rejects.ts +123 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/strict_equals.ts +67 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/string_includes.ts +30 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/throws.ts +111 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/unimplemented.ts +21 -0
- package/src/deps/jsr.io/@std/assert/1.0.8/unreachable.ts +21 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/_utils.ts +26 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.ts +62 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/associate_by.ts +50 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/associate_with.ts +46 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/chunk.ts +56 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/deep_merge.ts +578 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/distinct.ts +29 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/distinct_by.ts +42 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/drop_last_while.ts +36 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/drop_while.ts +39 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/filter_entries.ts +48 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/filter_keys.ts +51 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/filter_values.ts +51 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/find_single.ts +48 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.ts +47 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/includes_value.ts +45 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/intersect.ts +35 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/invert.ts +38 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/invert_by.ts +56 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/join_to_string.ts +109 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/map_entries.ts +53 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/map_keys.ts +47 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.ts +49 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/map_values.ts +96 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/max_by.ts +153 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/max_of.ts +90 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/max_with.ts +46 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/min_by.ts +151 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/min_of.ts +90 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/min_with.ts +42 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/mod.ts +76 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/omit.ts +34 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/partition.ts +85 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/partition_entries.ts +58 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/permutations.ts +66 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/pick.ts +34 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/reduce_groups.ts +45 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/running_reduce.ts +38 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/sample.ts +36 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/sliding_windows.ts +86 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/sort_by.ts +219 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/sum_of.ts +42 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/take_last_while.ts +37 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/take_while.ts +44 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/union.ts +36 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/unzip.ts +50 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/without_all.ts +28 -0
- package/src/deps/jsr.io/@std/collections/1.0.9/zip.ts +49 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/build_message.ts +134 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/diff.ts +317 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/diff_str.ts +204 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/format.ts +39 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/styles.ts +233 -0
- package/src/deps/jsr.io/@std/internal/1.0.5/types.ts +18 -0
- package/src/mod.ts +3 -18
- package/src/types/Ref.ts +16 -0
- package/src/types/RootTy.ts +40 -0
- package/src/types/Ty.ts +57 -0
- package/src/types/array.ts +9 -0
- package/src/types/constant.ts +8 -0
- package/src/types/constantUnion.ts +27 -0
- package/src/types/leaves.ts +21 -0
- package/src/types/mod.ts +10 -0
- package/src/types/object.ts +15 -0
- package/src/types/std/Option.ts +15 -0
- package/src/types/std/Wrapper.ts +8 -0
- package/src/types/std/mod.ts +2 -0
- package/src/types/taggedUnion.ts +28 -0
- package/src/util/phantoms.ts +3 -0
- package/src/util/recombineTaggedTemplateArgs.ts +6 -0
- package/types/ResponseFormat.d.ts +26 -0
- package/types/ResponseFormat.d.ts.map +1 -0
- package/types/Tool.d.ts +13 -0
- package/types/Tool.d.ts.map +1 -0
- package/types/_dnt.polyfills.d.ts +12 -0
- package/types/_dnt.polyfills.d.ts.map +1 -0
- package/types/_dnt.shims.d.ts +2 -0
- package/types/_dnt.shims.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts +29 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts +24 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/assert.d.ts +16 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/assert.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts +26 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/equal.d.ts +17 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/equal.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/equals.d.ts +22 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/exists.d.ts +18 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/exists.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/fail.d.ts +15 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/fail.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/false.d.ts +18 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/false.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/greater.d.ts +20 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/greater.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts +20 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts +23 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts +25 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/less.d.ts +19 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/less.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts +20 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/match.d.ts +18 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/match.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/mod.d.ts +44 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts +21 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts +20 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts +18 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts +23 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts +28 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts +42 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts +24 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts +18 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/throws.d.ts +45 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/throws.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts +15 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts +15 -0
- package/types/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/_utils.d.ts +6 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/_utils.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.d.ts +41 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/associate_by.d.ts +37 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/associate_by.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/associate_with.d.ts +33 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/associate_with.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/chunk.d.ts +38 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/chunk.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/deep_merge.d.ts +322 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/deep_merge.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/distinct.d.ts +23 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/distinct.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/distinct_by.d.ts +26 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/distinct_by.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/drop_last_while.d.ts +26 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/drop_last_while.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/drop_while.d.ts +25 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/drop_while.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/filter_entries.d.ts +32 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/filter_entries.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/filter_keys.d.ts +36 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/filter_keys.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/filter_values.d.ts +35 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/filter_values.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/find_single.d.ts +31 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/find_single.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.d.ts +32 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/includes_value.d.ts +29 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/includes_value.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/intersect.d.ts +25 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/intersect.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/invert.d.ts +29 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/invert.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/invert_by.d.ts +34 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/invert_by.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/join_to_string.d.ts +75 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/join_to_string.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/map_entries.d.ts +37 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/map_entries.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/map_keys.d.ts +33 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/map_keys.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.d.ts +32 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/map_values.d.ts +71 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/map_values.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/max_by.d.ts +117 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/max_by.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/max_of.d.ts +61 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/max_of.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/max_with.d.ts +29 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/max_with.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/min_by.d.ts +115 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/min_by.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/min_of.d.ts +61 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/min_of.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/min_with.d.ts +25 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/min_with.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/mod.d.ts +73 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/omit.d.ts +24 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/omit.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/partition.d.ts +60 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/partition.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/partition_entries.d.ts +39 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/partition_entries.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/permutations.d.ts +27 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/permutations.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/pick.d.ts +25 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/pick.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/reduce_groups.d.ts +35 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/reduce_groups.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/running_reduce.d.ts +27 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/running_reduce.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/sample.d.ts +24 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/sample.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/sliding_windows.d.ts +66 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/sliding_windows.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/sort_by.d.ts +161 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/sort_by.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/sum_of.d.ts +29 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/sum_of.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/take_last_while.d.ts +27 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/take_last_while.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/take_while.d.ts +30 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/take_while.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/union.d.ts +24 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/union.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/unzip.d.ts +32 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/unzip.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/without_all.d.ts +23 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/without_all.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/zip.d.ts +34 -0
- package/types/deps/jsr.io/@std/collections/1.0.9/zip.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +82 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +140 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +99 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/format.d.ts +2 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +159 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/types.d.ts +16 -0
- package/types/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +1 -0
- package/types/mod.d.ts +5 -0
- package/types/mod.d.ts.map +1 -0
- package/types/types/Ref.d.ts +4 -0
- package/types/types/Ref.d.ts.map +1 -0
- package/types/types/RootTy.d.ts +8 -0
- package/types/types/RootTy.d.ts.map +1 -0
- package/types/types/Ty.d.ts +27 -0
- package/types/types/Ty.d.ts.map +1 -0
- package/types/types/array.d.ts +3 -0
- package/types/types/array.d.ts.map +1 -0
- package/types/types/constant.d.ts +3 -0
- package/types/types/constant.d.ts.map +1 -0
- package/types/types/constantUnion.d.ts +3 -0
- package/types/types/constantUnion.d.ts.map +1 -0
- package/types/types/leaves.d.ts +6 -0
- package/types/types/leaves.d.ts.map +1 -0
- package/types/types/mod.d.ts +11 -0
- package/types/types/mod.d.ts.map +1 -0
- package/types/types/object.d.ts +6 -0
- package/types/types/object.d.ts.map +1 -0
- package/types/types/std/Option.d.ts +7 -0
- package/types/types/std/Option.d.ts.map +1 -0
- package/types/types/std/Wrapper.d.ts +7 -0
- package/types/types/std/Wrapper.d.ts.map +1 -0
- package/types/types/std/mod.d.ts +3 -0
- package/types/types/std/mod.d.ts.map +1 -0
- package/types/types/taggedUnion.d.ts +8 -0
- package/types/types/taggedUnion.d.ts.map +1 -0
- package/types/util/phantoms.d.ts +2 -0
- package/types/util/phantoms.d.ts.map +1 -0
- package/types/util/recombineTaggedTemplateArgs.d.ts +2 -0
- package/types/util/recombineTaggedTemplateArgs.d.ts.map +1 -0
- package/esm/F.d.ts +0 -13
- package/esm/F.d.ts.map +0 -1
- package/esm/F.js +0 -10
- package/esm/F.js.map +0 -1
- package/esm/ResponseFormat.d.ts +0 -14
- package/esm/ResponseFormat.d.ts.map +0 -1
- package/esm/_base.d.ts +0 -13
- package/esm/_base.d.ts.map +0 -1
- package/esm/_base.js +0 -40
- package/esm/_base.js.map +0 -1
- package/esm/array.d.ts +0 -4
- package/esm/array.d.ts.map +0 -1
- package/esm/array.js +0 -9
- package/esm/array.js.map +0 -1
- package/esm/common.d.ts +0 -6
- package/esm/common.d.ts.map +0 -1
- package/esm/common.js +0 -2
- package/esm/common.js.map +0 -1
- package/esm/literal.d.ts +0 -4
- package/esm/literal.d.ts.map +0 -1
- package/esm/literal.js +0 -8
- package/esm/literal.js.map +0 -1
- package/esm/mod.d.ts +0 -16
- package/esm/mod.d.ts.map +0 -1
- package/esm/number.d.ts +0 -4
- package/esm/number.d.ts.map +0 -1
- package/esm/number.js +0 -8
- package/esm/number.js.map +0 -1
- package/esm/object.d.ts +0 -7
- package/esm/object.d.ts.map +0 -1
- package/esm/object.js.map +0 -1
- package/esm/schema.d.ts +0 -4
- package/esm/schema.d.ts.map +0 -1
- package/esm/schema.js +0 -9
- package/esm/schema.js.map +0 -1
- package/esm/string.d.ts +0 -4
- package/esm/string.d.ts.map +0 -1
- package/esm/string.js +0 -8
- package/esm/string.js.map +0 -1
- package/esm/union.d.ts +0 -6
- package/esm/union.d.ts.map +0 -1
- package/esm/union.js +0 -8
- package/esm/union.js.map +0 -1
- package/src/F.ts +0 -27
- package/src/_base.ts +0 -25
- package/src/array.ts +0 -11
- package/src/common.ts +0 -6
- package/src/literal.ts +0 -10
- package/src/number.ts +0 -10
- package/src/object.ts +0 -17
- package/src/schema.ts +0 -10
- package/src/string.ts +0 -10
- package/src/union.ts +0 -12
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"strict_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/strict_equals.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,IAAI,CAAC,CA+BrB"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* Make an assertion that actual includes expected. If not
|
3
|
+
* then throw.
|
4
|
+
*
|
5
|
+
* @example Usage
|
6
|
+
* ```ts ignore
|
7
|
+
* import { assertStringIncludes } from "@std/assert";
|
8
|
+
*
|
9
|
+
* assertStringIncludes("Hello", "ello"); // Doesn't throw
|
10
|
+
* assertStringIncludes("Hello", "world"); // Throws
|
11
|
+
* ```
|
12
|
+
*
|
13
|
+
* @param actual The actual string to check for inclusion.
|
14
|
+
* @param expected The expected string to check for inclusion.
|
15
|
+
* @param msg The optional message to display if the assertion fails.
|
16
|
+
*/
|
17
|
+
export declare function assertStringIncludes(actual: string, expected: string, msg?: string): void;
|
18
|
+
//# sourceMappingURL=string_includes.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"string_includes.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/string_includes.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,GAAG,CAAC,EAAE,MAAM,QAMb"}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/**
|
2
|
+
* Executes a function, expecting it to throw. If it does not, then it
|
3
|
+
* throws.
|
4
|
+
*
|
5
|
+
* To assert that an asynchronous function rejects, use
|
6
|
+
* {@linkcode assertRejects}.
|
7
|
+
*
|
8
|
+
* @example Usage
|
9
|
+
* ```ts ignore
|
10
|
+
* import { assertThrows } from "@std/assert";
|
11
|
+
*
|
12
|
+
* assertThrows(() => { throw new TypeError("hello world!"); }); // Doesn't throw
|
13
|
+
* assertThrows(() => console.log("hello world!")); // Throws
|
14
|
+
* ```
|
15
|
+
*
|
16
|
+
* @param fn The function to execute.
|
17
|
+
* @param msg The optional message to display if the assertion fails.
|
18
|
+
* @returns The error that was thrown.
|
19
|
+
*/
|
20
|
+
export declare function assertThrows(fn: () => unknown, msg?: string): unknown;
|
21
|
+
/**
|
22
|
+
* Executes a function, expecting it to throw. If it does not, then it
|
23
|
+
* throws. An error class and a string that should be included in the
|
24
|
+
* error message can also be asserted.
|
25
|
+
*
|
26
|
+
* To assert that an asynchronous function rejects, use
|
27
|
+
* {@linkcode assertRejects}.
|
28
|
+
*
|
29
|
+
* @example Usage
|
30
|
+
* ```ts ignore
|
31
|
+
* import { assertThrows } from "@std/assert";
|
32
|
+
*
|
33
|
+
* assertThrows(() => { throw new TypeError("hello world!"); }, TypeError); // Doesn't throw
|
34
|
+
* assertThrows(() => { throw new TypeError("hello world!"); }, RangeError); // Throws
|
35
|
+
* ```
|
36
|
+
*
|
37
|
+
* @typeParam E The error class to assert.
|
38
|
+
* @param fn The function to execute.
|
39
|
+
* @param ErrorClass The error class to assert.
|
40
|
+
* @param msgIncludes The string that should be included in the error message.
|
41
|
+
* @param msg The optional message to display if the assertion fails.
|
42
|
+
* @returns The error that was thrown.
|
43
|
+
*/
|
44
|
+
export declare function assertThrows<E extends Error = Error>(fn: () => unknown, ErrorClass: abstract new (...args: any[]) => E, msgIncludes?: string, msg?: string): E;
|
45
|
+
//# sourceMappingURL=throws.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"throws.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/throws.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAC1B,EAAE,EAAE,MAAM,OAAO,EACjB,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC;AACX;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,KAAK,GAAG,KAAK,EAClD,EAAE,EAAE,MAAM,OAAO,EAEjB,UAAU,EAAE,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC9C,WAAW,CAAC,EAAE,MAAM,EACpB,GAAG,CAAC,EAAE,MAAM,GACX,CAAC,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/**
|
2
|
+
* Use this to stub out methods that will throw when invoked.
|
3
|
+
*
|
4
|
+
* @example Usage
|
5
|
+
* ```ts ignore
|
6
|
+
* import { unimplemented } from "@std/assert";
|
7
|
+
*
|
8
|
+
* unimplemented(); // Throws
|
9
|
+
* ```
|
10
|
+
*
|
11
|
+
* @param msg Optional message to include in the error.
|
12
|
+
* @returns Never returns, always throws.
|
13
|
+
*/
|
14
|
+
export declare function unimplemented(msg?: string): never;
|
15
|
+
//# sourceMappingURL=unimplemented.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"unimplemented.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/unimplemented.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAGjD"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/**
|
2
|
+
* Use this to assert unreachable code.
|
3
|
+
*
|
4
|
+
* @example Usage
|
5
|
+
* ```ts ignore
|
6
|
+
* import { unreachable } from "@std/assert";
|
7
|
+
*
|
8
|
+
* unreachable(); // Throws
|
9
|
+
* ```
|
10
|
+
*
|
11
|
+
* @param msg Optional message to include in the error.
|
12
|
+
* @returns Never returns, always throws.
|
13
|
+
*/
|
14
|
+
export declare function unreachable(msg?: string): never;
|
15
|
+
//# sourceMappingURL=unreachable.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"unreachable.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.8/unreachable.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAG/C"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/**
|
2
|
+
* Filters the given array, removing all elements that do not match the given predicate
|
3
|
+
* **in place. This means `array` will be modified!**.
|
4
|
+
*/
|
5
|
+
export declare function filterInPlace<T>(array: Array<T>, predicate: (el: T) => boolean): Array<T>;
|
6
|
+
//# sourceMappingURL=_utils.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"_utils.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/_utils.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EACf,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,OAAO,GAC5B,KAAK,CAAC,CAAC,CAAC,CAeV"}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
/**
|
2
|
+
* Applies the given aggregator to each group in the given grouping, returning the
|
3
|
+
* results together with the respective group keys
|
4
|
+
*
|
5
|
+
* @typeParam T Type of the values in the input record.
|
6
|
+
* @typeParam A Type of the accumulator value, which will match the returned
|
7
|
+
* record's values.
|
8
|
+
*
|
9
|
+
* @param record The grouping to aggregate.
|
10
|
+
* @param aggregator The function to apply to each group.
|
11
|
+
*
|
12
|
+
* @returns A record with the same keys as the input record, but with the values
|
13
|
+
* being the result of applying the aggregator to each group.
|
14
|
+
*
|
15
|
+
* @example Basic usage
|
16
|
+
* ```ts
|
17
|
+
* import { aggregateGroups } from "@std/collections/aggregate-groups";
|
18
|
+
* import { assertEquals } from "@std/assert";
|
19
|
+
*
|
20
|
+
* const foodProperties = {
|
21
|
+
* Curry: ["spicy", "vegan"],
|
22
|
+
* Omelette: ["creamy", "vegetarian"],
|
23
|
+
* };
|
24
|
+
*
|
25
|
+
* const descriptions = aggregateGroups(
|
26
|
+
* foodProperties,
|
27
|
+
* (current, key, first, acc) => {
|
28
|
+
* return first
|
29
|
+
* ? `${key} is ${current}`
|
30
|
+
* : `${acc} and ${current}`;
|
31
|
+
* },
|
32
|
+
* );
|
33
|
+
*
|
34
|
+
* assertEquals(descriptions, {
|
35
|
+
* Curry: "Curry is spicy and vegan",
|
36
|
+
* Omelette: "Omelette is creamy and vegetarian",
|
37
|
+
* });
|
38
|
+
* ```
|
39
|
+
*/
|
40
|
+
export declare function aggregateGroups<T, A>(record: Readonly<Record<string, ReadonlyArray<T>>>, aggregator: (current: T, key: string, first: boolean, accumulator?: A) => A): Record<string, A>;
|
41
|
+
//# sourceMappingURL=aggregate_groups.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"aggregate_groups.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,CAAC,EAClC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,EAClD,UAAU,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,GAC1E,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAcnB"}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
/**
|
2
|
+
* Creates a record by associating each element of the input array with a key
|
3
|
+
* generated by the selector function.
|
4
|
+
*
|
5
|
+
* If the selector produces the same key for multiple elements, the latest one
|
6
|
+
* will be used (overriding the ones before it).
|
7
|
+
*
|
8
|
+
* @typeParam T Type of the elements in the input array.
|
9
|
+
*
|
10
|
+
* @param array The array to transform.
|
11
|
+
* @param selector The function to extract the key from each element.
|
12
|
+
*
|
13
|
+
* @returns A record with the keys produced by the selector and the elements as
|
14
|
+
* values.
|
15
|
+
*
|
16
|
+
* @example Basic usage
|
17
|
+
* ```ts
|
18
|
+
* import { associateBy } from "@std/collections/associate-by";
|
19
|
+
* import { assertEquals } from "@std/assert";
|
20
|
+
*
|
21
|
+
* const users = [
|
22
|
+
* { id: "a2e", userName: "Anna" },
|
23
|
+
* { id: "5f8", userName: "Arnold" },
|
24
|
+
* { id: "d2c", userName: "Kim" },
|
25
|
+
* ];
|
26
|
+
*
|
27
|
+
* const usersById = associateBy(users, (user) => user.id);
|
28
|
+
*
|
29
|
+
* assertEquals(usersById, {
|
30
|
+
* "a2e": { id: "a2e", userName: "Anna" },
|
31
|
+
* "5f8": { id: "5f8", userName: "Arnold" },
|
32
|
+
* "d2c": { id: "d2c", userName: "Kim" },
|
33
|
+
* });
|
34
|
+
* ```
|
35
|
+
*/
|
36
|
+
export declare function associateBy<T>(array: Iterable<T>, selector: (el: T) => string): Record<string, T>;
|
37
|
+
//# sourceMappingURL=associate_by.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"associate_by.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/associate_by.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAC3B,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAClB,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,MAAM,GAC1B,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAQnB"}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
/**
|
2
|
+
* Associates each string element of an array with a value returned by a selector
|
3
|
+
* function.
|
4
|
+
*
|
5
|
+
* If any of two pairs would have the same value, the latest one will be used
|
6
|
+
* (overriding the ones before it).
|
7
|
+
*
|
8
|
+
* @typeParam T The type of the values returned by the selector function.
|
9
|
+
*
|
10
|
+
* @param array The array of elements to associate with values.
|
11
|
+
* @param selector The selector function that returns a value for each element.
|
12
|
+
*
|
13
|
+
* @returns An object where each element of the array is associated with a value
|
14
|
+
* returned by the selector function.
|
15
|
+
*
|
16
|
+
* @example Basic usage
|
17
|
+
* ```ts
|
18
|
+
* import { associateWith } from "@std/collections/associate-with";
|
19
|
+
* import { assertEquals } from "@std/assert";
|
20
|
+
*
|
21
|
+
* const names = ["Kim", "Lara", "Jonathan"];
|
22
|
+
*
|
23
|
+
* const namesToLength = associateWith(names, (person) => person.length);
|
24
|
+
*
|
25
|
+
* assertEquals(namesToLength, {
|
26
|
+
* "Kim": 3,
|
27
|
+
* "Lara": 4,
|
28
|
+
* "Jonathan": 8,
|
29
|
+
* });
|
30
|
+
* ```
|
31
|
+
*/
|
32
|
+
export declare function associateWith<T>(array: Iterable<string>, selector: (key: string) => T): Record<string, T>;
|
33
|
+
//# sourceMappingURL=associate_with.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"associate_with.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/associate_with.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,EACvB,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,CAAC,GAC3B,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAQnB"}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
/**
|
2
|
+
* Splits the given array into chunks of the given size and returns them.
|
3
|
+
*
|
4
|
+
* @typeParam T Type of the elements in the input array.
|
5
|
+
*
|
6
|
+
* @param array The array to split into chunks.
|
7
|
+
* @param size The size of the chunks. This must be a positive integer.
|
8
|
+
*
|
9
|
+
* @returns An array of chunks of the given size.
|
10
|
+
*
|
11
|
+
* @example Basic usage
|
12
|
+
* ```ts
|
13
|
+
* import { chunk } from "@std/collections/chunk";
|
14
|
+
* import { assertEquals } from "@std/assert";
|
15
|
+
*
|
16
|
+
* const words = [
|
17
|
+
* "lorem",
|
18
|
+
* "ipsum",
|
19
|
+
* "dolor",
|
20
|
+
* "sit",
|
21
|
+
* "amet",
|
22
|
+
* "consetetur",
|
23
|
+
* "sadipscing",
|
24
|
+
* ];
|
25
|
+
* const chunks = chunk(words, 3);
|
26
|
+
*
|
27
|
+
* assertEquals(
|
28
|
+
* chunks,
|
29
|
+
* [
|
30
|
+
* ["lorem", "ipsum", "dolor"],
|
31
|
+
* ["sit", "amet", "consetetur"],
|
32
|
+
* ["sadipscing"],
|
33
|
+
* ],
|
34
|
+
* );
|
35
|
+
* ```
|
36
|
+
*/
|
37
|
+
export declare function chunk<T>(array: readonly T[], size: number): T[][];
|
38
|
+
//# sourceMappingURL=chunk.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"chunk.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/chunk.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE,EAAE,CAgBjE"}
|
@@ -0,0 +1,322 @@
|
|
1
|
+
/**
|
2
|
+
* Merges the two given records, recursively merging any nested records with the
|
3
|
+
* second collection overriding the first in case of conflict.
|
4
|
+
*
|
5
|
+
* For arrays, maps and sets, a merging strategy can be specified to either
|
6
|
+
* `replace` values, or `merge` them instead.
|
7
|
+
*
|
8
|
+
* @typeParam T Type of the first record
|
9
|
+
*
|
10
|
+
* @param record First record to merge.
|
11
|
+
* @param other Second record to merge.
|
12
|
+
* @param options Merging options.
|
13
|
+
*
|
14
|
+
* @returns A new record with the merged values.
|
15
|
+
*
|
16
|
+
* @example Merge objects
|
17
|
+
* ```ts
|
18
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
19
|
+
* import { assertEquals } from "@std/assert";
|
20
|
+
*
|
21
|
+
* const a = { foo: true };
|
22
|
+
* const b = { foo: { bar: true } };
|
23
|
+
*
|
24
|
+
* const result = deepMerge(a, b);
|
25
|
+
*
|
26
|
+
* const expected = { foo: { bar: true } };
|
27
|
+
*
|
28
|
+
* assertEquals(result, expected);
|
29
|
+
* ```
|
30
|
+
*
|
31
|
+
* @example Merge arrays
|
32
|
+
* ```ts
|
33
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
34
|
+
* import { assertEquals } from "@std/assert";
|
35
|
+
*
|
36
|
+
* const a = { foo: [1, 2] };
|
37
|
+
* const b = { foo: [3, 4] };
|
38
|
+
*
|
39
|
+
* const result = deepMerge(a, b);
|
40
|
+
*
|
41
|
+
* const expected = { foo: [1, 2, 3, 4] };
|
42
|
+
*
|
43
|
+
* assertEquals(result, expected);
|
44
|
+
* ```
|
45
|
+
*
|
46
|
+
* @example Merge maps
|
47
|
+
* ```ts
|
48
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
49
|
+
* import { assertEquals } from "@std/assert";
|
50
|
+
*
|
51
|
+
* const a = { foo: new Map([["a", 1]]) };
|
52
|
+
* const b = { foo: new Map([["b", 2]]) };
|
53
|
+
*
|
54
|
+
* const result = deepMerge(a, b);
|
55
|
+
*
|
56
|
+
* const expected = { foo: new Map([["a", 1], ["b", 2]]) };
|
57
|
+
*
|
58
|
+
* assertEquals(result, expected);
|
59
|
+
* ```
|
60
|
+
*
|
61
|
+
* @example Merge sets
|
62
|
+
* ```ts
|
63
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
64
|
+
* import { assertEquals } from "@std/assert";
|
65
|
+
*
|
66
|
+
* const a = { foo: new Set([1]) };
|
67
|
+
* const b = { foo: new Set([2]) };
|
68
|
+
*
|
69
|
+
* const result = deepMerge(a, b);
|
70
|
+
*
|
71
|
+
* const expected = { foo: new Set([1, 2]) };
|
72
|
+
*
|
73
|
+
* assertEquals(result, expected);
|
74
|
+
* ```
|
75
|
+
*
|
76
|
+
* @example Merge with custom options
|
77
|
+
* ```ts
|
78
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
79
|
+
* import { assertEquals } from "@std/assert";
|
80
|
+
*
|
81
|
+
* const a = { foo: [1, 2] };
|
82
|
+
* const b = { foo: [3, 4] };
|
83
|
+
*
|
84
|
+
* const result = deepMerge(a, b, { arrays: "replace" });
|
85
|
+
*
|
86
|
+
* const expected = { foo: [3, 4] };
|
87
|
+
*
|
88
|
+
* assertEquals(result, expected);
|
89
|
+
* ```
|
90
|
+
*/
|
91
|
+
export declare function deepMerge<T extends Record<PropertyKey, unknown>>(record: Partial<Readonly<T>>, other: Partial<Readonly<T>>, options?: Readonly<DeepMergeOptions>): T;
|
92
|
+
/**
|
93
|
+
* Merges the two given records, recursively merging any nested records with the
|
94
|
+
* second collection overriding the first in case of conflict.
|
95
|
+
*
|
96
|
+
* For arrays, maps and sets, a merging strategy can be specified to either
|
97
|
+
* `replace` values, or `merge` them instead.
|
98
|
+
*
|
99
|
+
* @typeParam T Type of the first record
|
100
|
+
* @typeParam U Type of the second record
|
101
|
+
* @typeParam Options Merging options
|
102
|
+
*
|
103
|
+
* @param record First record to merge.
|
104
|
+
* @param other Second record to merge.
|
105
|
+
* @param options Merging options.
|
106
|
+
*
|
107
|
+
* @returns A new record with the merged values.
|
108
|
+
*
|
109
|
+
* @example Merge objects
|
110
|
+
* ```ts
|
111
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
112
|
+
* import { assertEquals } from "@std/assert";
|
113
|
+
*
|
114
|
+
* const a = { foo: true };
|
115
|
+
* const b = { foo: { bar: true } };
|
116
|
+
*
|
117
|
+
* const result = deepMerge(a, b);
|
118
|
+
*
|
119
|
+
* const expected = { foo: { bar: true } };
|
120
|
+
*
|
121
|
+
* assertEquals(result, expected);
|
122
|
+
* ```
|
123
|
+
*
|
124
|
+
* @example Merge arrays
|
125
|
+
* ```ts
|
126
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
127
|
+
* import { assertEquals } from "@std/assert";
|
128
|
+
*
|
129
|
+
* const a = { foo: [1, 2] };
|
130
|
+
* const b = { foo: [3, 4] };
|
131
|
+
*
|
132
|
+
* const result = deepMerge(a, b);
|
133
|
+
*
|
134
|
+
* const expected = { foo: [1, 2, 3, 4] };
|
135
|
+
*
|
136
|
+
* assertEquals(result, expected);
|
137
|
+
* ```
|
138
|
+
*
|
139
|
+
* @example Merge maps
|
140
|
+
* ```ts
|
141
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
142
|
+
* import { assertEquals } from "@std/assert";
|
143
|
+
*
|
144
|
+
* const a = { foo: new Map([["a", 1]]) };
|
145
|
+
* const b = { foo: new Map([["b", 2]]) };
|
146
|
+
*
|
147
|
+
* const result = deepMerge(a, b);
|
148
|
+
*
|
149
|
+
* const expected = { foo: new Map([["a", 1], ["b", 2]]) };
|
150
|
+
*
|
151
|
+
* assertEquals(result, expected);
|
152
|
+
* ```
|
153
|
+
*
|
154
|
+
* @example Merge sets
|
155
|
+
* ```ts
|
156
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
157
|
+
* import { assertEquals } from "@std/assert";
|
158
|
+
*
|
159
|
+
* const a = { foo: new Set([1]) };
|
160
|
+
* const b = { foo: new Set([2]) };
|
161
|
+
*
|
162
|
+
* const result = deepMerge(a, b);
|
163
|
+
*
|
164
|
+
* const expected = { foo: new Set([1, 2]) };
|
165
|
+
*
|
166
|
+
* assertEquals(result, expected);
|
167
|
+
* ```
|
168
|
+
*
|
169
|
+
* @example Merge with custom options
|
170
|
+
* ```ts
|
171
|
+
* import { deepMerge } from "@std/collections/deep-merge";
|
172
|
+
* import { assertEquals } from "@std/assert";
|
173
|
+
*
|
174
|
+
* const a = { foo: [1, 2] };
|
175
|
+
* const b = { foo: [3, 4] };
|
176
|
+
*
|
177
|
+
* const result = deepMerge(a, b, { arrays: "replace" });
|
178
|
+
*
|
179
|
+
* const expected = { foo: [3, 4] };
|
180
|
+
*
|
181
|
+
* assertEquals(result, expected);
|
182
|
+
* ```
|
183
|
+
*/
|
184
|
+
export declare function deepMerge<T extends Record<PropertyKey, unknown>, U extends Record<PropertyKey, unknown>, Options extends DeepMergeOptions>(record: Readonly<T>, other: Readonly<U>, options?: Readonly<Options>): DeepMerge<T, U, Options>;
|
185
|
+
/** Merging strategy */
|
186
|
+
export type MergingStrategy = "replace" | "merge";
|
187
|
+
/** Options for {@linkcode deepMerge}. */
|
188
|
+
export type DeepMergeOptions = {
|
189
|
+
/**
|
190
|
+
* Merging strategy for arrays
|
191
|
+
*
|
192
|
+
* @default {"merge"}
|
193
|
+
*/
|
194
|
+
arrays?: MergingStrategy;
|
195
|
+
/**
|
196
|
+
* Merging strategy for maps.
|
197
|
+
*
|
198
|
+
* @default {"merge"}
|
199
|
+
*/
|
200
|
+
maps?: MergingStrategy;
|
201
|
+
/**
|
202
|
+
* Merging strategy for sets.
|
203
|
+
*
|
204
|
+
* @default {"merge"}
|
205
|
+
*/
|
206
|
+
sets?: MergingStrategy;
|
207
|
+
};
|
208
|
+
/**
|
209
|
+
* How does recursive typing works ?
|
210
|
+
*
|
211
|
+
* Deep merging process is handled through `DeepMerge<T, U, Options>` type.
|
212
|
+
* If both T and U are Records, we recursively merge them,
|
213
|
+
* else we treat them as primitives.
|
214
|
+
*
|
215
|
+
* Merging process is handled through `Merge<T, U>` type, in which
|
216
|
+
* we remove all maps, sets, arrays and records so we can handle them
|
217
|
+
* separately depending on merging strategy:
|
218
|
+
*
|
219
|
+
* Merge<
|
220
|
+
* {foo: string},
|
221
|
+
* {bar: string, baz: Set<unknown>},
|
222
|
+
* > // "foo" and "bar" will be handled with `MergeRightOmitComplexes`
|
223
|
+
* // "baz" will be handled with `MergeAll*` type
|
224
|
+
*
|
225
|
+
* `MergeRightOmitComplexes<T, U>` will do the above: all T's
|
226
|
+
* exclusive keys will be kept, though common ones with U will have their
|
227
|
+
* typing overridden instead:
|
228
|
+
*
|
229
|
+
* MergeRightOmitComplexes<
|
230
|
+
* {foo: string, baz: number},
|
231
|
+
* {foo: boolean, bar: string}
|
232
|
+
* > // {baz: number, foo: boolean, bar: string}
|
233
|
+
* // "baz" was kept from T
|
234
|
+
* // "foo" was overridden by U's typing
|
235
|
+
* // "bar" was added from U
|
236
|
+
*
|
237
|
+
* For Maps, Arrays, Sets and Records, we use `MergeAll*<T, U>` utility
|
238
|
+
* types. They will extract relevant data structure from both T and U
|
239
|
+
* (providing that both have same data data structure, except for typing).
|
240
|
+
*
|
241
|
+
* From these, `*ValueType<T>` will extract values (and keys) types to be
|
242
|
+
* able to create a new data structure with an union typing from both
|
243
|
+
* data structure of T and U:
|
244
|
+
*
|
245
|
+
* MergeAllSets<
|
246
|
+
* {foo: Set<number>},
|
247
|
+
* {foo: Set<string>}
|
248
|
+
* > // `SetValueType` will extract "number" for T
|
249
|
+
* // `SetValueType` will extract "string" for U
|
250
|
+
* // `MergeAllSets` will infer type as Set<number|string>
|
251
|
+
* // Process is similar for Maps, Arrays, and Sets
|
252
|
+
*
|
253
|
+
* `DeepMerge<T, U, Options>` is taking a third argument to be handle to
|
254
|
+
* infer final typing depending on merging strategy:
|
255
|
+
*
|
256
|
+
* & (Options extends { sets: "replace" } ? PartialByType<U, Set<unknown>>
|
257
|
+
* : MergeAllSets<T, U>)
|
258
|
+
*
|
259
|
+
* In the above line, if "Options" have its merging strategy for Sets set to
|
260
|
+
* "replace", instead of performing merging of Sets type, it will take the
|
261
|
+
* typing from right operand (U) instead, effectively replacing the typing.
|
262
|
+
*
|
263
|
+
* An additional note, we use `ExpandRecursively<T>` utility type to expand
|
264
|
+
* the resulting typing and hide all the typing logic of deep merging so it is
|
265
|
+
* more user friendly.
|
266
|
+
*/
|
267
|
+
/** Force intellisense to expand the typing to hide merging typings */
|
268
|
+
export type ExpandRecursively<T> = T extends Record<PropertyKey, unknown> ? T extends infer O ? {
|
269
|
+
[K in keyof O]: ExpandRecursively<O[K]>;
|
270
|
+
} : never : T;
|
271
|
+
/** Filter of keys matching a given type */
|
272
|
+
export type PartialByType<T, U> = {
|
273
|
+
[K in keyof T as T[K] extends U ? K : never]: T[K];
|
274
|
+
};
|
275
|
+
/** Get set values type */
|
276
|
+
export type SetValueType<T> = T extends Set<infer V> ? V : never;
|
277
|
+
/** Merge all sets types definitions from keys present in both objects */
|
278
|
+
export type MergeAllSets<T, U, X = PartialByType<T, Set<unknown>>, Y = PartialByType<U, Set<unknown>>, Z = {
|
279
|
+
[K in keyof X & keyof Y]: Set<SetValueType<X[K]> | SetValueType<Y[K]>>;
|
280
|
+
}> = Z;
|
281
|
+
/** Get array values type */
|
282
|
+
export type ArrayValueType<T> = T extends Array<infer V> ? V : never;
|
283
|
+
/** Merge all sets types definitions from keys present in both objects */
|
284
|
+
export type MergeAllArrays<T, U, X = PartialByType<T, Array<unknown>>, Y = PartialByType<U, Array<unknown>>, Z = {
|
285
|
+
[K in keyof X & keyof Y]: Array<ArrayValueType<X[K]> | ArrayValueType<Y[K]>>;
|
286
|
+
}> = Z;
|
287
|
+
/** Get map values types */
|
288
|
+
export type MapKeyType<T> = T extends Map<infer K, unknown> ? K : never;
|
289
|
+
/** Get map values types */
|
290
|
+
export type MapValueType<T> = T extends Map<unknown, infer V> ? V : never;
|
291
|
+
/** Merge all sets types definitions from keys present in both objects */
|
292
|
+
export type MergeAllMaps<T, U, X = PartialByType<T, Map<unknown, unknown>>, Y = PartialByType<U, Map<unknown, unknown>>, Z = {
|
293
|
+
[K in keyof X & keyof Y]: Map<MapKeyType<X[K]> | MapKeyType<Y[K]>, MapValueType<X[K]> | MapValueType<Y[K]>>;
|
294
|
+
}> = Z;
|
295
|
+
/** Merge all records types definitions from keys present in both objects */
|
296
|
+
export type MergeAllRecords<T, U, Options, X = PartialByType<T, Record<PropertyKey, unknown>>, Y = PartialByType<U, Record<PropertyKey, unknown>>, Z = {
|
297
|
+
[K in keyof X & keyof Y]: DeepMerge<X[K], Y[K], Options>;
|
298
|
+
}> = Z;
|
299
|
+
/** Exclude map, sets and array from type */
|
300
|
+
export type OmitComplexes<T> = Omit<T, keyof PartialByType<T, Map<unknown, unknown> | Set<unknown> | Array<unknown> | Record<PropertyKey, unknown>>>;
|
301
|
+
/** Object with keys in either T or U but not in both */
|
302
|
+
export type ObjectXorKeys<T, U, X = Omit<T, keyof U> & Omit<U, keyof T>, Y = {
|
303
|
+
[K in keyof X]: X[K];
|
304
|
+
}> = Y;
|
305
|
+
/** Merge two objects, with left precedence */
|
306
|
+
export type MergeRightOmitComplexes<T, U, X = ObjectXorKeys<T, U> & OmitComplexes<{
|
307
|
+
[K in keyof U]: U[K];
|
308
|
+
}>> = X;
|
309
|
+
/** Merge two objects */
|
310
|
+
export type Merge<T, U, Options, X = MergeRightOmitComplexes<T, U> & MergeAllRecords<T, U, Options> & (Options extends {
|
311
|
+
sets: "replace";
|
312
|
+
} ? PartialByType<U, Set<unknown>> : MergeAllSets<T, U>) & (Options extends {
|
313
|
+
arrays: "replace";
|
314
|
+
} ? PartialByType<U, Array<unknown>> : MergeAllArrays<T, U>) & (Options extends {
|
315
|
+
maps: "replace";
|
316
|
+
} ? PartialByType<U, Map<unknown, unknown>> : MergeAllMaps<T, U>)> = ExpandRecursively<X>;
|
317
|
+
/** Merge deeply two objects */
|
318
|
+
export type DeepMerge<T, U, Options = Record<string, MergingStrategy>> = [
|
319
|
+
T,
|
320
|
+
U
|
321
|
+
] extends [Record<PropertyKey, unknown>, Record<PropertyKey, unknown>] ? Merge<T, U, Options> : T | U;
|
322
|
+
//# sourceMappingURL=deep_merge.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"deep_merge.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/deep_merge.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;AACH,wBAAgB,SAAS,CACvB,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EAEtC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC5B,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC3B,OAAO,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,GACnC,CAAC,CAAC;AACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AACH,wBAAgB,SAAS,CACvB,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EACtC,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EACtC,OAAO,SAAS,gBAAgB,EAEhC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EACnB,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAClB,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,GAC1B,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE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AC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,GAEpB,CAAC,GAAG,CAAC,CAAC"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/**
|
2
|
+
* Returns all distinct elements in the given array, preserving order by first
|
3
|
+
* occurrence.
|
4
|
+
*
|
5
|
+
* @typeParam T The type of the elements in the input array.
|
6
|
+
*
|
7
|
+
* @param array The array to filter for distinct elements.
|
8
|
+
*
|
9
|
+
* @returns An array of distinct elements in the input array.
|
10
|
+
*
|
11
|
+
* @example Basic usage
|
12
|
+
* ```ts
|
13
|
+
* import { distinct } from "@std/collections/distinct";
|
14
|
+
* import { assertEquals } from "@std/assert";
|
15
|
+
*
|
16
|
+
* const numbers = [3, 2, 5, 2, 5];
|
17
|
+
* const distinctNumbers = distinct(numbers);
|
18
|
+
*
|
19
|
+
* assertEquals(distinctNumbers, [3, 2, 5]);
|
20
|
+
* ```
|
21
|
+
*/
|
22
|
+
export declare function distinct<T>(array: Iterable<T>): T[];
|
23
|
+
//# sourceMappingURL=distinct.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"distinct.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/distinct.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAInD"}
|