structured-outputs 0.1.0-beta.2 → 0.1.0-beta.21
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.d.ts +18 -11
- package/esm/ResponseFormat.d.ts.map +1 -1
- package/esm/ResponseFormat.js +57 -5
- package/esm/ResponseFormat.js.map +1 -1
- package/esm/Tool.d.ts +13 -0
- package/esm/Tool.d.ts.map +1 -0
- package/esm/Tool.js +17 -0
- package/esm/Tool.js.map +1 -0
- package/esm/_dnt.polyfills.d.ts +12 -0
- package/esm/_dnt.polyfills.d.ts.map +1 -0
- package/esm/_dnt.polyfills.js +16 -0
- package/esm/_dnt.polyfills.js.map +1 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/_utils.d.ts +6 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/_utils.d.ts.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.d.ts +41 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.d.ts.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.d.ts +37 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/associate_by.d.ts.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.d.ts +33 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/associate_with.d.ts.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.d.ts +38 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/chunk.d.ts.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.d.ts +322 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/deep_merge.d.ts.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.d.ts +23 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/distinct.d.ts.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.d.ts +26 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/distinct_by.d.ts.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.d.ts +26 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/drop_last_while.d.ts.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.d.ts +25 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/drop_while.d.ts.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.d.ts +32 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/filter_entries.d.ts.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.d.ts +36 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/filter_keys.d.ts.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.d.ts +35 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/filter_values.d.ts.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.d.ts +31 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/find_single.d.ts.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.d.ts +32 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.d.ts.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.d.ts +29 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/includes_value.d.ts.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.d.ts +25 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/intersect.d.ts.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.d.ts +29 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/invert.d.ts.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.d.ts +34 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/invert_by.d.ts.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.d.ts +75 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/join_to_string.d.ts.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.d.ts +37 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_entries.d.ts.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.d.ts +33 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_keys.d.ts.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.d.ts +32 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.d.ts.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.d.ts +71 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/map_values.d.ts.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.d.ts +117 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/max_by.d.ts.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.d.ts +61 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/max_of.d.ts.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.d.ts +29 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/max_with.d.ts.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.d.ts +115 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/min_by.d.ts.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.d.ts +61 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/min_of.d.ts.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.d.ts +25 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/min_with.d.ts.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.d.ts +73 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/mod.d.ts.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.d.ts +24 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/omit.d.ts.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.d.ts +60 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/partition.d.ts.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.d.ts +39 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/partition_entries.d.ts.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.d.ts +27 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/permutations.d.ts.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.d.ts +25 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/pick.d.ts.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.d.ts +35 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/reduce_groups.d.ts.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.d.ts +27 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/running_reduce.d.ts.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.d.ts +24 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sample.d.ts.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.d.ts +66 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sliding_windows.d.ts.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.d.ts +161 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sort_by.d.ts.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.d.ts +29 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/sum_of.d.ts.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.d.ts +27 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/take_last_while.d.ts.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.d.ts +30 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/take_while.d.ts.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.d.ts +24 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/union.d.ts.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.d.ts +32 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/unzip.d.ts.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.d.ts +23 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/without_all.d.ts.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.d.ts +34 -0
- package/esm/deps/jsr.io/@std/collections/1.0.9/zip.d.ts.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/mod.d.ts +3 -14
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +3 -10
- package/esm/mod.js.map +1 -1
- package/esm/oai.d.ts +5 -0
- package/esm/oai.d.ts.map +1 -0
- package/esm/oai.js +2 -0
- package/esm/oai.js.map +1 -0
- package/esm/types/Ref.d.ts +4 -0
- package/esm/types/Ref.d.ts.map +1 -0
- package/esm/types/Ref.js +11 -0
- package/esm/types/Ref.js.map +1 -0
- package/esm/types/RootTy.d.ts +8 -0
- package/esm/types/RootTy.d.ts.map +1 -0
- package/esm/types/RootTy.js +19 -0
- package/esm/types/RootTy.js.map +1 -0
- package/esm/types/Ty.d.ts +27 -0
- package/esm/types/Ty.d.ts.map +1 -0
- package/esm/types/Ty.js +17 -0
- package/esm/types/Ty.js.map +1 -0
- package/esm/types/array.d.ts +3 -0
- package/esm/types/array.d.ts.map +1 -0
- package/esm/types/array.js +9 -0
- package/esm/types/array.js.map +1 -0
- package/esm/types/constant.d.ts +3 -0
- package/esm/types/constant.d.ts.map +1 -0
- package/esm/types/constant.js +8 -0
- package/esm/types/constant.js.map +1 -0
- package/esm/types/constantUnion.d.ts +3 -0
- package/esm/types/constantUnion.d.ts.map +1 -0
- package/esm/types/constantUnion.js +25 -0
- package/esm/types/constantUnion.js.map +1 -0
- package/esm/types/leaves.d.ts +6 -0
- package/esm/types/leaves.d.ts.map +1 -0
- package/esm/types/leaves.js +18 -0
- package/esm/types/leaves.js.map +1 -0
- package/esm/types/mod.d.ts +11 -0
- package/esm/types/mod.d.ts.map +1 -0
- package/esm/types/mod.js +11 -0
- package/esm/types/mod.js.map +1 -0
- package/esm/types/object.d.ts +6 -0
- package/esm/types/object.d.ts.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.d.ts +7 -0
- package/esm/types/std/Option.d.ts.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.d.ts +7 -0
- package/esm/types/std/Wrapper.d.ts.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.d.ts +3 -0
- package/esm/types/std/mod.d.ts.map +1 -0
- package/esm/types/std/mod.js +3 -0
- package/esm/types/std/mod.js.map +1 -0
- package/esm/types/taggedUnion.d.ts +8 -0
- package/esm/types/taggedUnion.d.ts.map +1 -0
- package/esm/types/taggedUnion.js +20 -0
- package/esm/types/taggedUnion.js.map +1 -0
- package/esm/util/phantoms.d.ts +2 -0
- package/esm/util/phantoms.d.ts.map +1 -0
- package/esm/util/phantoms.js +4 -0
- package/esm/util/phantoms.js.map +1 -0
- package/esm/util/recombineTaggedTemplateArgs.d.ts +2 -0
- package/esm/util/recombineTaggedTemplateArgs.d.ts.map +1 -0
- package/esm/util/recombineTaggedTemplateArgs.js +4 -0
- package/esm/util/recombineTaggedTemplateArgs.js.map +1 -0
- package/package.json +7 -9
- package/src/ResponseFormat.ts +80 -22
- package/src/Tool.ts +38 -0
- package/src/_dnt.polyfills.ts +27 -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/mod.ts +3 -18
- package/src/oai.ts +5 -0
- 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/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/_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/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,30 @@
|
|
1
|
+
/**
|
2
|
+
* Returns all elements in the given collection until the first element that
|
3
|
+
* does not match the given predicate.
|
4
|
+
*
|
5
|
+
* Note: If you want to process any iterable, use the new version of
|
6
|
+
* `takeWhile` from `@std/collections/unstable-take-while`.
|
7
|
+
*
|
8
|
+
* @typeParam T The type of the array elements.
|
9
|
+
*
|
10
|
+
* @param array The array to take elements from.
|
11
|
+
* @param predicate The predicate function to determine if an element should be
|
12
|
+
* included.
|
13
|
+
*
|
14
|
+
* @returns A new array containing all elements until the first element that
|
15
|
+
* does not match the predicate.
|
16
|
+
*
|
17
|
+
* @example Basic usage
|
18
|
+
* ```ts
|
19
|
+
* import { takeWhile } from "@std/collections/take-while";
|
20
|
+
* import { assertEquals } from "@std/assert";
|
21
|
+
*
|
22
|
+
* const numbers = [1, 2, 3, 4, 5, 6];
|
23
|
+
*
|
24
|
+
* const result = takeWhile(numbers, (number) => number < 4);
|
25
|
+
*
|
26
|
+
* assertEquals(result, [1, 2, 3]);
|
27
|
+
* ```
|
28
|
+
*/
|
29
|
+
export declare function takeWhile<T>(array: readonly T[], predicate: (el: T) => boolean): T[];
|
30
|
+
//# sourceMappingURL=take_while.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"take_while.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/take_while.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,OAAO,GAC5B,CAAC,EAAE,CASL"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
/**
|
4
|
+
* Returns all elements in the given collection until the first element that
|
5
|
+
* does not match the given predicate.
|
6
|
+
*
|
7
|
+
* Note: If you want to process any iterable, use the new version of
|
8
|
+
* `takeWhile` from `@std/collections/unstable-take-while`.
|
9
|
+
*
|
10
|
+
* @typeParam T The type of the array elements.
|
11
|
+
*
|
12
|
+
* @param array The array to take elements from.
|
13
|
+
* @param predicate The predicate function to determine if an element should be
|
14
|
+
* included.
|
15
|
+
*
|
16
|
+
* @returns A new array containing all elements until the first element that
|
17
|
+
* does not match the predicate.
|
18
|
+
*
|
19
|
+
* @example Basic usage
|
20
|
+
* ```ts
|
21
|
+
* import { takeWhile } from "@std/collections/take-while";
|
22
|
+
* import { assertEquals } from "@std/assert";
|
23
|
+
*
|
24
|
+
* const numbers = [1, 2, 3, 4, 5, 6];
|
25
|
+
*
|
26
|
+
* const result = takeWhile(numbers, (number) => number < 4);
|
27
|
+
*
|
28
|
+
* assertEquals(result, [1, 2, 3]);
|
29
|
+
* ```
|
30
|
+
*/
|
31
|
+
export function takeWhile(array, predicate) {
|
32
|
+
let offset = 0;
|
33
|
+
const length = array.length;
|
34
|
+
while (length > offset && predicate(array[offset])) {
|
35
|
+
offset++;
|
36
|
+
}
|
37
|
+
return array.slice(0, offset);
|
38
|
+
}
|
39
|
+
//# sourceMappingURL=take_while.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"take_while.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/take_while.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,SAAS,CACvB,KAAmB,EACnB,SAA6B;IAE7B,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IAE5B,OAAO,MAAM,GAAG,MAAM,IAAI,SAAS,CAAC,KAAK,CAAC,MAAM,CAAM,CAAC,EAAE,CAAC;QACxD,MAAM,EAAE,CAAC;IACX,CAAC;IAED,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAChC,CAAC"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
/**
|
2
|
+
* Returns all distinct elements that appear in any of the given arrays.
|
3
|
+
*
|
4
|
+
* @typeParam T The type of the array elements.
|
5
|
+
*
|
6
|
+
* @param arrays The arrays to get the union of.
|
7
|
+
*
|
8
|
+
* @returns A new array containing all distinct elements from the given arrays.
|
9
|
+
*
|
10
|
+
* @example Basic usage
|
11
|
+
* ```ts
|
12
|
+
* import { union } from "@std/collections/union";
|
13
|
+
* import { assertEquals } from "@std/assert";
|
14
|
+
*
|
15
|
+
* const soupIngredients = ["Pepper", "Carrots", "Leek"];
|
16
|
+
* const saladIngredients = ["Carrots", "Radicchio", "Pepper"];
|
17
|
+
*
|
18
|
+
* const shoppingList = union(soupIngredients, saladIngredients);
|
19
|
+
*
|
20
|
+
* assertEquals(shoppingList, ["Pepper", "Carrots", "Leek", "Radicchio"]);
|
21
|
+
* ```
|
22
|
+
*/
|
23
|
+
export declare function union<T>(...arrays: Iterable<T>[]): T[];
|
24
|
+
//# sourceMappingURL=union.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"union.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/union.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAUtD"}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
/**
|
4
|
+
* Returns all distinct elements that appear in any of the given arrays.
|
5
|
+
*
|
6
|
+
* @typeParam T The type of the array elements.
|
7
|
+
*
|
8
|
+
* @param arrays The arrays to get the union of.
|
9
|
+
*
|
10
|
+
* @returns A new array containing all distinct elements from the given arrays.
|
11
|
+
*
|
12
|
+
* @example Basic usage
|
13
|
+
* ```ts
|
14
|
+
* import { union } from "@std/collections/union";
|
15
|
+
* import { assertEquals } from "@std/assert";
|
16
|
+
*
|
17
|
+
* const soupIngredients = ["Pepper", "Carrots", "Leek"];
|
18
|
+
* const saladIngredients = ["Carrots", "Radicchio", "Pepper"];
|
19
|
+
*
|
20
|
+
* const shoppingList = union(soupIngredients, saladIngredients);
|
21
|
+
*
|
22
|
+
* assertEquals(shoppingList, ["Pepper", "Carrots", "Leek", "Radicchio"]);
|
23
|
+
* ```
|
24
|
+
*/
|
25
|
+
export function union(...arrays) {
|
26
|
+
const set = new Set();
|
27
|
+
for (const array of arrays) {
|
28
|
+
for (const element of array) {
|
29
|
+
set.add(element);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
return Array.from(set);
|
33
|
+
}
|
34
|
+
//# sourceMappingURL=union.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"union.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/union.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AAErC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,KAAK,CAAI,GAAG,MAAqB;IAC/C,MAAM,GAAG,GAAG,IAAI,GAAG,EAAK,CAAC;IAEzB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,KAAK,MAAM,OAAO,IAAI,KAAK,EAAE,CAAC;YAC5B,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
/**
|
2
|
+
* Builds two separate arrays from the given array of 2-tuples, with the first
|
3
|
+
* returned array holding all first tuple elements and the second one holding
|
4
|
+
* all the second elements.
|
5
|
+
*
|
6
|
+
* @typeParam T The type of the first tuple elements.
|
7
|
+
* @typeParam U The type of the second tuple elements.
|
8
|
+
*
|
9
|
+
* @param pairs The array of 2-tuples to unzip.
|
10
|
+
*
|
11
|
+
* @returns A tuple containing two arrays, the first one holding all first tuple
|
12
|
+
* elements and the second one holding all second elements.
|
13
|
+
*
|
14
|
+
* @example Basic usage
|
15
|
+
* ```ts
|
16
|
+
* import { unzip } from "@std/collections/unzip";
|
17
|
+
* import { assertEquals } from "@std/assert";
|
18
|
+
*
|
19
|
+
* const parents = [
|
20
|
+
* ["Maria", "Jeff"],
|
21
|
+
* ["Anna", "Kim"],
|
22
|
+
* ["John", "Leroy"],
|
23
|
+
* ] as [string, string][];
|
24
|
+
*
|
25
|
+
* const [moms, dads] = unzip(parents);
|
26
|
+
*
|
27
|
+
* assertEquals(moms, ["Maria", "Anna", "John"]);
|
28
|
+
* assertEquals(dads, ["Jeff", "Kim", "Leroy"]);
|
29
|
+
* ```
|
30
|
+
*/
|
31
|
+
export declare function unzip<T, U>(pairs: readonly [T, U][]): [T[], U[]];
|
32
|
+
//# sourceMappingURL=unzip.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"unzip.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/unzip.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAgBhE"}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
/**
|
4
|
+
* Builds two separate arrays from the given array of 2-tuples, with the first
|
5
|
+
* returned array holding all first tuple elements and the second one holding
|
6
|
+
* all the second elements.
|
7
|
+
*
|
8
|
+
* @typeParam T The type of the first tuple elements.
|
9
|
+
* @typeParam U The type of the second tuple elements.
|
10
|
+
*
|
11
|
+
* @param pairs The array of 2-tuples to unzip.
|
12
|
+
*
|
13
|
+
* @returns A tuple containing two arrays, the first one holding all first tuple
|
14
|
+
* elements and the second one holding all second elements.
|
15
|
+
*
|
16
|
+
* @example Basic usage
|
17
|
+
* ```ts
|
18
|
+
* import { unzip } from "@std/collections/unzip";
|
19
|
+
* import { assertEquals } from "@std/assert";
|
20
|
+
*
|
21
|
+
* const parents = [
|
22
|
+
* ["Maria", "Jeff"],
|
23
|
+
* ["Anna", "Kim"],
|
24
|
+
* ["John", "Leroy"],
|
25
|
+
* ] as [string, string][];
|
26
|
+
*
|
27
|
+
* const [moms, dads] = unzip(parents);
|
28
|
+
*
|
29
|
+
* assertEquals(moms, ["Maria", "Anna", "John"]);
|
30
|
+
* assertEquals(dads, ["Jeff", "Kim", "Leroy"]);
|
31
|
+
* ```
|
32
|
+
*/
|
33
|
+
export function unzip(pairs) {
|
34
|
+
const { length } = pairs;
|
35
|
+
const result = [
|
36
|
+
new Array(length),
|
37
|
+
new Array(length),
|
38
|
+
];
|
39
|
+
for (let i = 0; i < length; ++i) {
|
40
|
+
const pair = pairs[i];
|
41
|
+
result[0][i] = pair[0];
|
42
|
+
result[1][i] = pair[1];
|
43
|
+
}
|
44
|
+
return result;
|
45
|
+
}
|
46
|
+
//# sourceMappingURL=unzip.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"unzip.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/unzip.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,KAAK,CAAO,KAAwB;IAClD,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAEzB,MAAM,MAAM,GAAe;QACzB,IAAI,KAAK,CAAI,MAAM,CAAC;QACpB,IAAI,KAAK,CAAI,MAAM,CAAC;KACrB,CAAC;IAEF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAW,CAAC;QAEhC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACvB,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/**
|
2
|
+
* Returns an array excluding all given values.
|
3
|
+
*
|
4
|
+
* @typeParam T The type of the array elements.
|
5
|
+
*
|
6
|
+
* @param array The array to exclude values from.
|
7
|
+
* @param values The values to exclude from the array.
|
8
|
+
*
|
9
|
+
* @returns A new array containing all elements from the given array except the
|
10
|
+
* ones that are in the values array.
|
11
|
+
*
|
12
|
+
* @example Basic usage
|
13
|
+
* ```ts
|
14
|
+
* import { withoutAll } from "@std/collections/without-all";
|
15
|
+
* import { assertEquals } from "@std/assert";
|
16
|
+
*
|
17
|
+
* const withoutList = withoutAll([2, 1, 2, 3], [1, 2]);
|
18
|
+
*
|
19
|
+
* assertEquals(withoutList, [3]);
|
20
|
+
* ```
|
21
|
+
*/
|
22
|
+
export declare function withoutAll<T>(array: readonly T[], values: readonly T[]): T[];
|
23
|
+
//# sourceMappingURL=without_all.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"without_all.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/without_all.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,EAAE,CAG5E"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
/**
|
4
|
+
* Returns an array excluding all given values.
|
5
|
+
*
|
6
|
+
* @typeParam T The type of the array elements.
|
7
|
+
*
|
8
|
+
* @param array The array to exclude values from.
|
9
|
+
* @param values The values to exclude from the array.
|
10
|
+
*
|
11
|
+
* @returns A new array containing all elements from the given array except the
|
12
|
+
* ones that are in the values array.
|
13
|
+
*
|
14
|
+
* @example Basic usage
|
15
|
+
* ```ts
|
16
|
+
* import { withoutAll } from "@std/collections/without-all";
|
17
|
+
* import { assertEquals } from "@std/assert";
|
18
|
+
*
|
19
|
+
* const withoutList = withoutAll([2, 1, 2, 3], [1, 2]);
|
20
|
+
*
|
21
|
+
* assertEquals(withoutList, [3]);
|
22
|
+
* ```
|
23
|
+
*/
|
24
|
+
export function withoutAll(array, values) {
|
25
|
+
const toExclude = new Set(values);
|
26
|
+
return array.filter((it) => !toExclude.has(it));
|
27
|
+
}
|
28
|
+
//# sourceMappingURL=without_all.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"without_all.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/without_all.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AAErC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,UAAU,CAAI,KAAmB,EAAE,MAAoB;IACrE,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAClC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;AAClD,CAAC"}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/**
|
2
|
+
* Builds N-tuples of elements from the given N arrays with matching indices,
|
3
|
+
* stopping when the smallest array's end is reached.
|
4
|
+
*
|
5
|
+
* @typeParam T the type of the tuples produced by this function.
|
6
|
+
*
|
7
|
+
* @param arrays The arrays to zip.
|
8
|
+
*
|
9
|
+
* @returns A new array containing N-tuples of elements from the given arrays.
|
10
|
+
*
|
11
|
+
* @example Basic usage
|
12
|
+
* ```ts
|
13
|
+
* import { zip } from "@std/collections/zip";
|
14
|
+
* import { assertEquals } from "@std/assert";
|
15
|
+
*
|
16
|
+
* const numbers = [1, 2, 3, 4];
|
17
|
+
* const letters = ["a", "b", "c", "d"];
|
18
|
+
* const pairs = zip(numbers, letters);
|
19
|
+
*
|
20
|
+
* assertEquals(
|
21
|
+
* pairs,
|
22
|
+
* [
|
23
|
+
* [1, "a"],
|
24
|
+
* [2, "b"],
|
25
|
+
* [3, "c"],
|
26
|
+
* [4, "d"],
|
27
|
+
* ],
|
28
|
+
* );
|
29
|
+
* ```
|
30
|
+
*/
|
31
|
+
export declare function zip<T extends unknown[]>(...arrays: {
|
32
|
+
[K in keyof T]: ReadonlyArray<T[K]>;
|
33
|
+
}): T[];
|
34
|
+
//# sourceMappingURL=zip.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"zip.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/zip.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EAAE,EACrC,GAAG,MAAM,EAAE;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACjD,CAAC,EAAE,CAWL"}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2
|
+
// This module is browser compatible.
|
3
|
+
import { minOf } from "./min_of.js";
|
4
|
+
/**
|
5
|
+
* Builds N-tuples of elements from the given N arrays with matching indices,
|
6
|
+
* stopping when the smallest array's end is reached.
|
7
|
+
*
|
8
|
+
* @typeParam T the type of the tuples produced by this function.
|
9
|
+
*
|
10
|
+
* @param arrays The arrays to zip.
|
11
|
+
*
|
12
|
+
* @returns A new array containing N-tuples of elements from the given arrays.
|
13
|
+
*
|
14
|
+
* @example Basic usage
|
15
|
+
* ```ts
|
16
|
+
* import { zip } from "@std/collections/zip";
|
17
|
+
* import { assertEquals } from "@std/assert";
|
18
|
+
*
|
19
|
+
* const numbers = [1, 2, 3, 4];
|
20
|
+
* const letters = ["a", "b", "c", "d"];
|
21
|
+
* const pairs = zip(numbers, letters);
|
22
|
+
*
|
23
|
+
* assertEquals(
|
24
|
+
* pairs,
|
25
|
+
* [
|
26
|
+
* [1, "a"],
|
27
|
+
* [2, "b"],
|
28
|
+
* [3, "c"],
|
29
|
+
* [4, "d"],
|
30
|
+
* ],
|
31
|
+
* );
|
32
|
+
* ```
|
33
|
+
*/
|
34
|
+
export function zip(...arrays) {
|
35
|
+
const minLength = minOf(arrays, (element) => element.length) ?? 0;
|
36
|
+
const result = new Array(minLength);
|
37
|
+
for (let i = 0; i < minLength; i += 1) {
|
38
|
+
const arr = arrays.map((it) => it[i]);
|
39
|
+
result[i] = arr;
|
40
|
+
}
|
41
|
+
return result;
|
42
|
+
}
|
43
|
+
//# sourceMappingURL=zip.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/collections/1.0.9/zip.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,qCAAqC;AAErC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,GAAG,CACjB,GAAG,MAA+C;IAElD,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAElE,MAAM,MAAM,GAAQ,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;IAEzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QACtC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACtC,MAAM,CAAC,CAAC,CAAC,GAAG,GAAQ,CAAC;IACvB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/esm/mod.d.ts
CHANGED
@@ -1,16 +1,5 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
import type { ObjectTy } from "./object.js";
|
4
|
-
import type { StringTy } from "./string.js";
|
5
|
-
export type RootTy = NumberTy | StringTy | ObjectTy | ArrayTy;
|
6
|
-
export * from "./array.js";
|
7
|
-
export * from "./common.js";
|
8
|
-
export * from "./F.js";
|
9
|
-
export * from "./literal.js";
|
10
|
-
export * from "./number.js";
|
11
|
-
export * from "./object.js";
|
1
|
+
import "./_dnt.polyfills.js";
|
2
|
+
export * as T from "./types/mod.js";
|
12
3
|
export * from "./ResponseFormat.js";
|
13
|
-
export * from "./
|
14
|
-
export * from "./string.js";
|
15
|
-
export * from "./union.js";
|
4
|
+
export * from "./Tool.js";
|
16
5
|
//# sourceMappingURL=mod.d.ts.map
|
package/esm/mod.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA"}
|
package/esm/mod.js
CHANGED
@@ -1,12 +1,5 @@
|
|
1
|
-
|
2
|
-
export * from "./
|
3
|
-
export * from "./common.js";
|
4
|
-
export * from "./F.js";
|
5
|
-
export * from "./literal.js";
|
6
|
-
export * from "./number.js";
|
7
|
-
export * from "./object.js";
|
1
|
+
import "./_dnt.polyfills.js";
|
2
|
+
export * as T from "./types/mod.js";
|
8
3
|
export * from "./ResponseFormat.js";
|
9
|
-
export * from "./
|
10
|
-
export * from "./string.js";
|
11
|
-
export * from "./union.js";
|
4
|
+
export * from "./Tool.js";
|
12
5
|
//# sourceMappingURL=mod.js.map
|
package/esm/mod.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"mod.js","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA"}
|
package/esm/oai.d.ts
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
import type Openai from "openai";
|
2
|
+
export type JsonSchema = Openai.ResponseFormatJSONSchema["json_schema"];
|
3
|
+
export type ChatCompletion = Openai.Chat.ChatCompletion;
|
4
|
+
export type ChatCompletionChoice = Openai.Chat.Completions.ChatCompletion.Choice;
|
5
|
+
//# sourceMappingURL=oai.d.ts.map
|
package/esm/oai.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"oai.d.ts","sourceRoot":"","sources":["../src/oai.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAA;AAEhC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,aAAa,CAAC,CAAA;AACvE,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAA;AACvD,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,MAAM,CAAA"}
|
package/esm/oai.js
ADDED
package/esm/oai.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"oai.js","sourceRoot":"","sources":["../src/oai.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Ref.d.ts","sourceRoot":"","sources":["../../src/types/Ref.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAGlD,MAAM,MAAM,GAAG,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK,MAAM,CAAA;AAEpC,wBAAgB,GAAG,CAAC,OAAO,EAAE,OAAO,GAAG,GAAG,CAUzC"}
|
package/esm/types/Ref.js
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
import { recombineTaggedTemplateArgs } from "../util/recombineTaggedTemplateArgs.js";
|
2
|
+
export function Ref(applied) {
|
3
|
+
return (ty) => {
|
4
|
+
applied = { ...applied, ...ty.applied };
|
5
|
+
const description = ty.descriptions
|
6
|
+
.map(({ template, placeheld }) => recombineTaggedTemplateArgs(template, placeheld.map((k) => applied[k])))
|
7
|
+
.join(" ");
|
8
|
+
return ty.toSchema(description, Ref(applied));
|
9
|
+
};
|
10
|
+
}
|
11
|
+
//# sourceMappingURL=Ref.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Ref.js","sourceRoot":"","sources":["../../src/types/Ref.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAA;AAIpF,MAAM,UAAU,GAAG,CAAC,OAAgB;IAClC,OAAO,CAAC,EAAE,EAAE,EAAE;QACZ,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAA;QACvC,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY;aAChC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,CAC/B,2BAA2B,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAE,CAAC,CAAC,CACzE;aACA,IAAI,CAAC,GAAG,CAAC,CAAA;QACZ,OAAO,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;IAC/C,CAAC,CAAA;AACH,CAAC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import type { Applied, Description, Schema, ToSchema, Ty } from "./Ty.js";
|
2
|
+
export declare function RootTy<T, P extends string = never>(toSchema: ToSchema, descriptions?: Array<Description>, applied?: Applied): RootTy<T, P>;
|
3
|
+
export interface RootTy<T = any, P extends string = string> extends Ty<T, P> {
|
4
|
+
<P2 extends Array<string>>(template: TemplateStringsArray, ...placeheld: P2): RootTy<T, P | P2[number]>;
|
5
|
+
apply: <A extends Partial<Record<P, number | string>>>(values: A) => RootTy<T, Exclude<P, keyof A>>;
|
6
|
+
schema(this: RootTy<T, never>): Schema;
|
7
|
+
}
|
8
|
+
//# sourceMappingURL=RootTy.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RootTy.d.ts","sourceRoot":"","sources":["../../src/types/RootTy.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAEzE,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,KAAK,EAChD,QAAQ,EAAE,QAAQ,EAClB,YAAY,GAAE,KAAK,CAAC,WAAW,CAAM,EACrC,OAAO,GAAE,OAAY,GACpB,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAoBd;AAED,MAAM,WAAW,MAAM,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IAC1E,CAAC,EAAE,SAAS,KAAK,CAAC,MAAM,CAAC,EACvB,QAAQ,EAAE,oBAAoB,EAC9B,GAAG,SAAS,EAAE,EAAE,GACf,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,KAAK,EAAE,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,EACnD,MAAM,EAAE,CAAC,KACN,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;IACnC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG,MAAM,CAAA;CACvC"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { phantoms } from "../util/phantoms.js";
|
2
|
+
import { Ref } from "./Ref.js";
|
3
|
+
export function RootTy(toSchema, descriptions = [], applied = {}) {
|
4
|
+
return Object.assign((template, ...placeheld) => RootTy(toSchema, [{ template, placeheld }, ...descriptions], applied), phantoms(), {
|
5
|
+
toSchema,
|
6
|
+
descriptions,
|
7
|
+
applied,
|
8
|
+
apply: (values) => {
|
9
|
+
return RootTy(toSchema, descriptions, { ...applied, ...values });
|
10
|
+
},
|
11
|
+
schema() {
|
12
|
+
return Ref({})(this);
|
13
|
+
},
|
14
|
+
isRoot() {
|
15
|
+
return true;
|
16
|
+
},
|
17
|
+
});
|
18
|
+
}
|
19
|
+
//# sourceMappingURL=RootTy.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RootTy.js","sourceRoot":"","sources":["../../src/types/RootTy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAG9B,MAAM,UAAU,MAAM,CACpB,QAAkB,EAClB,eAAmC,EAAE,EACrC,UAAmB,EAAE;IAErB,OAAO,MAAM,CAAC,MAAM,CAClB,CAA2B,QAA8B,EAAE,GAAG,SAAa,EAAE,EAAE,CAC7E,MAAM,CAAoB,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,GAAG,YAAY,CAAC,EAAE,OAAO,CAAC,EAC1F,QAAQ,EAA4B,EACpC;QACE,QAAQ;QACR,YAAY;QACZ,OAAO;QACP,KAAK,EAAE,CAAgD,MAAS,EAAE,EAAE;YAClE,OAAO,MAAM,CAAyB,QAAQ,EAAE,YAAY,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC,CAAA;QAC1F,CAAC;QACD,MAAM;YACJ,OAAO,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAA;QACtB,CAAC;QACD,MAAM;YACJ,OAAO,IAAI,CAAA;QACb,CAAC;KACF,CACF,CAAA;AACH,CAAC"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import type { Ref } from "./Ref.js";
|
2
|
+
import type { RootTy } from "./RootTy.js";
|
3
|
+
export declare function Ty<T, P extends string = never>(toSchema: ToSchema, descriptions?: Array<Description>, applied?: Applied): Ty<T, P>;
|
4
|
+
export interface Ty<T = any, P extends string = string> {
|
5
|
+
<P2 extends Array<string>>(template: TemplateStringsArray, ...placeheld: P2): Ty<T, P | P2[number]>;
|
6
|
+
[Ty.T]: T;
|
7
|
+
[Ty.P]: P;
|
8
|
+
toSchema: ToSchema;
|
9
|
+
descriptions: Array<Description>;
|
10
|
+
applied: Applied;
|
11
|
+
apply: <A extends Partial<Record<P, number | string>>>(values: A) => Ty<T, Exclude<P, keyof A>>;
|
12
|
+
isRoot(): this is RootTy;
|
13
|
+
}
|
14
|
+
export declare namespace Ty {
|
15
|
+
type T = typeof T;
|
16
|
+
const T: unique symbol;
|
17
|
+
type P = typeof P;
|
18
|
+
const P: unique symbol;
|
19
|
+
}
|
20
|
+
export type ToSchema = (description: string | undefined, ref: Ref) => Schema;
|
21
|
+
export type Schema = Record<string, unknown>;
|
22
|
+
export interface Description {
|
23
|
+
template: TemplateStringsArray;
|
24
|
+
placeheld: Array<string>;
|
25
|
+
}
|
26
|
+
export type Applied = Record<string, number | string>;
|
27
|
+
//# sourceMappingURL=Ty.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Ty.d.ts","sourceRoot":"","sources":["../../src/types/Ty.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,wBAAgB,EAAE,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,KAAK,EAC5C,QAAQ,EAAE,QAAQ,EAClB,YAAY,GAAE,KAAK,CAAC,WAAW,CAAM,EACrC,OAAO,GAAE,OAAY,GACpB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAiBV;AAED,MAAM,WAAW,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM;IACpD,CAAC,EAAE,SAAS,KAAK,CAAC,MAAM,CAAC,EACvB,QAAQ,EAAE,oBAAoB,EAC9B,GAAG,SAAS,EAAE,EAAE,GACf,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IACxB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACT,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACT,QAAQ,EAAE,QAAQ,CAAA;IAClB,YAAY,EAAE,KAAK,CAAC,WAAW,CAAC,CAAA;IAChC,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,CAAC,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;IAC/F,MAAM,IAAI,IAAI,IAAI,MAAM,CAAA;CACzB;AAED,yBAAiB,EAAE,CAAC;IAClB,KAAY,CAAC,GAAG,OAAO,CAAC,CAAA;IACT,MAAM,CAAC,EAAE,OAAO,MAAM,CAAA;IACrC,KAAY,CAAC,GAAG,OAAO,CAAC,CAAA;IACT,MAAM,CAAC,EAAE,OAAO,MAAM,CAAA;CACtC;AAED,MAAM,MAAM,QAAQ,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,GAAG,KAAK,MAAM,CAAA;AAC5E,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE5C,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,oBAAoB,CAAA;IAC9B,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CACzB;AAED,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA"}
|
package/esm/types/Ty.js
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
import { phantoms } from "../util/phantoms.js";
|
2
|
+
export function Ty(toSchema, descriptions = [], applied = {}) {
|
3
|
+
return Object.assign((template, ...placeheld) => Ty(toSchema, [{ template, placeheld }, ...descriptions], applied), phantoms(), {
|
4
|
+
toSchema,
|
5
|
+
descriptions,
|
6
|
+
applied,
|
7
|
+
apply: (values) => {
|
8
|
+
return Ty(toSchema, descriptions, { ...applied, ...values });
|
9
|
+
},
|
10
|
+
isRoot() {
|
11
|
+
return false;
|
12
|
+
},
|
13
|
+
});
|
14
|
+
}
|
15
|
+
(function (Ty) {
|
16
|
+
})(Ty || (Ty = {}));
|
17
|
+
//# sourceMappingURL=Ty.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Ty.js","sourceRoot":"","sources":["../../src/types/Ty.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAG9C,MAAM,UAAU,EAAE,CAChB,QAAkB,EAClB,eAAmC,EAAE,EACrC,UAAmB,EAAE;IAErB,OAAO,MAAM,CAAC,MAAM,CAClB,CAA2B,QAA8B,EAAE,GAAG,SAAa,EAAE,EAAE,CAC7E,EAAE,CAAoB,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,GAAG,YAAY,CAAC,EAAE,OAAO,CAAC,EACtF,QAAQ,EAA4B,EACpC;QACE,QAAQ;QACR,YAAY;QACZ,OAAO;QACP,KAAK,EAAE,CAAgD,MAAS,EAAE,EAAE;YAClE,OAAO,EAAE,CAAyB,QAAQ,EAAE,YAAY,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC,CAAA;QACtF,CAAC;QACD,MAAM;YACJ,OAAO,KAAK,CAAA;QACd,CAAC;KACF,CACF,CAAA;AACH,CAAC;AAgBD,WAAiB,EAAE;AAKnB,CAAC,EALgB,EAAE,KAAF,EAAE,QAKlB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/types/array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,wBAAgB,KAAK,CAAC,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAM3E"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"array.js","sourceRoot":"","sources":["../../src/types/array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,MAAM,UAAU,KAAK,CAAe,OAAU;IAC5C,OAAO,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;QAC/B,IAAI,EAAE,OAAO;QACb,WAAW;QACX,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC;KACpB,CAAC,CAAC,CAAA;AACL,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../src/types/constant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,CAK1E"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constant.js","sourceRoot":"","sources":["../../src/types/constant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,MAAM,UAAU,QAAQ,CAA4B,KAAQ;IAC1D,OAAO,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAC1B,KAAK,EAAE,KAAK;QACZ,WAAW;KACZ,CAAC,CAAC,CAAA;AACL,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constantUnion.d.ts","sourceRoot":"","sources":["../../src/types/constantUnion.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,wBAAgB,aAAa,CAAC,CAAC,SAAS,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,EAC5D,GAAG,OAAO,EAAE,CAAC,GACZ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,CAqBtB"}
|