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.
Files changed (565) hide show
  1. package/README.md +77 -6
  2. package/esm/ResponseFormat.js +33 -5
  3. package/esm/ResponseFormat.js.map +1 -1
  4. package/esm/Tool.js +17 -0
  5. package/esm/Tool.js.map +1 -0
  6. package/esm/_dnt.polyfills.js +16 -0
  7. package/esm/_dnt.polyfills.js.map +1 -0
  8. package/esm/_dnt.shims.js +58 -0
  9. package/esm/_dnt.shims.js.map +1 -0
  10. package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.js +47 -0
  11. package/esm/deps/jsr.io/@std/assert/1.0.8/almost_equals.js.map +1 -0
  12. package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.js +47 -0
  13. package/esm/deps/jsr.io/@std/assert/1.0.8/array_includes.js.map +1 -0
  14. package/esm/deps/jsr.io/@std/assert/1.0.8/assert.js +23 -0
  15. package/esm/deps/jsr.io/@std/assert/1.0.8/assert.js.map +1 -0
  16. package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.js +31 -0
  17. package/esm/deps/jsr.io/@std/assert/1.0.8/assertion_error.js.map +1 -0
  18. package/esm/deps/jsr.io/@std/assert/1.0.8/equal.js +184 -0
  19. package/esm/deps/jsr.io/@std/assert/1.0.8/equal.js.map +1 -0
  20. package/esm/deps/jsr.io/@std/assert/1.0.8/equals.js +46 -0
  21. package/esm/deps/jsr.io/@std/assert/1.0.8/equals.js.map +1 -0
  22. package/esm/deps/jsr.io/@std/assert/1.0.8/exists.js +28 -0
  23. package/esm/deps/jsr.io/@std/assert/1.0.8/exists.js.map +1 -0
  24. package/esm/deps/jsr.io/@std/assert/1.0.8/fail.js +21 -0
  25. package/esm/deps/jsr.io/@std/assert/1.0.8/fail.js.map +1 -0
  26. package/esm/deps/jsr.io/@std/assert/1.0.8/false.js +23 -0
  27. package/esm/deps/jsr.io/@std/assert/1.0.8/false.js.map +1 -0
  28. package/esm/deps/jsr.io/@std/assert/1.0.8/greater.js +30 -0
  29. package/esm/deps/jsr.io/@std/assert/1.0.8/greater.js.map +1 -0
  30. package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js +30 -0
  31. package/esm/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.js.map +1 -0
  32. package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.js +53 -0
  33. package/esm/deps/jsr.io/@std/assert/1.0.8/instance_of.js.map +1 -0
  34. package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.js +54 -0
  35. package/esm/deps/jsr.io/@std/assert/1.0.8/is_error.js.map +1 -0
  36. package/esm/deps/jsr.io/@std/assert/1.0.8/less.js +29 -0
  37. package/esm/deps/jsr.io/@std/assert/1.0.8/less.js.map +1 -0
  38. package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js +30 -0
  39. package/esm/deps/jsr.io/@std/assert/1.0.8/less_or_equal.js.map +1 -0
  40. package/esm/deps/jsr.io/@std/assert/1.0.8/match.js +27 -0
  41. package/esm/deps/jsr.io/@std/assert/1.0.8/match.js.map +1 -0
  42. package/esm/deps/jsr.io/@std/assert/1.0.8/mod.js +46 -0
  43. package/esm/deps/jsr.io/@std/assert/1.0.8/mod.js.map +1 -0
  44. package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.js +33 -0
  45. package/esm/deps/jsr.io/@std/assert/1.0.8/not_equals.js.map +1 -0
  46. package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js +30 -0
  47. package/esm/deps/jsr.io/@std/assert/1.0.8/not_instance_of.js.map +1 -0
  48. package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.js +27 -0
  49. package/esm/deps/jsr.io/@std/assert/1.0.8/not_match.js.map +1 -0
  50. package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js +33 -0
  51. package/esm/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.js.map +1 -0
  52. package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.js +160 -0
  53. package/esm/deps/jsr.io/@std/assert/1.0.8/object_match.js.map +1 -0
  54. package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.js +54 -0
  55. package/esm/deps/jsr.io/@std/assert/1.0.8/rejects.js.map +1 -0
  56. package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.js +58 -0
  57. package/esm/deps/jsr.io/@std/assert/1.0.8/strict_equals.js.map +1 -0
  58. package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.js +27 -0
  59. package/esm/deps/jsr.io/@std/assert/1.0.8/string_includes.js.map +1 -0
  60. package/esm/deps/jsr.io/@std/assert/1.0.8/throws.js +45 -0
  61. package/esm/deps/jsr.io/@std/assert/1.0.8/throws.js.map +1 -0
  62. package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.js +21 -0
  63. package/esm/deps/jsr.io/@std/assert/1.0.8/unimplemented.js.map +1 -0
  64. package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.js +21 -0
  65. package/esm/deps/jsr.io/@std/assert/1.0.8/unreachable.js.map +1 -0
  66. package/esm/deps/jsr.io/@std/collections/1.0.9/_utils.js +19 -0
  67. package/esm/deps/jsr.io/@std/collections/1.0.9/_utils.js.map +1 -0
  68. package/esm/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.js +51 -0
  69. package/esm/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.js.map +1 -0
  70. package/esm/deps/jsr.io/@std/collections/1.0.9/associate_by.js +45 -0
  71. package/esm/deps/jsr.io/@std/collections/1.0.9/associate_by.js.map +1 -0
  72. package/esm/deps/jsr.io/@std/collections/1.0.9/associate_with.js +41 -0
  73. package/esm/deps/jsr.io/@std/collections/1.0.9/associate_with.js.map +1 -0
  74. package/esm/deps/jsr.io/@std/collections/1.0.9/chunk.js +51 -0
  75. package/esm/deps/jsr.io/@std/collections/1.0.9/chunk.js.map +1 -0
  76. package/esm/deps/jsr.io/@std/collections/1.0.9/deep_merge.js +96 -0
  77. package/esm/deps/jsr.io/@std/collections/1.0.9/deep_merge.js.map +1 -0
  78. package/esm/deps/jsr.io/@std/collections/1.0.9/distinct.js +28 -0
  79. package/esm/deps/jsr.io/@std/collections/1.0.9/distinct.js.map +1 -0
  80. package/esm/deps/jsr.io/@std/collections/1.0.9/distinct_by.js +39 -0
  81. package/esm/deps/jsr.io/@std/collections/1.0.9/distinct_by.js.map +1 -0
  82. package/esm/deps/jsr.io/@std/collections/1.0.9/drop_last_while.js +33 -0
  83. package/esm/deps/jsr.io/@std/collections/1.0.9/drop_last_while.js.map +1 -0
  84. package/esm/deps/jsr.io/@std/collections/1.0.9/drop_while.js +34 -0
  85. package/esm/deps/jsr.io/@std/collections/1.0.9/drop_while.js.map +1 -0
  86. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_entries.js +43 -0
  87. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_entries.js.map +1 -0
  88. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_keys.js +46 -0
  89. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_keys.js.map +1 -0
  90. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_values.js +46 -0
  91. package/esm/deps/jsr.io/@std/collections/1.0.9/filter_values.js.map +1 -0
  92. package/esm/deps/jsr.io/@std/collections/1.0.9/find_single.js +45 -0
  93. package/esm/deps/jsr.io/@std/collections/1.0.9/find_single.js.map +1 -0
  94. package/esm/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.js +42 -0
  95. package/esm/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.js.map +1 -0
  96. package/esm/deps/jsr.io/@std/collections/1.0.9/includes_value.js +39 -0
  97. package/esm/deps/jsr.io/@std/collections/1.0.9/includes_value.js.map +1 -0
  98. package/esm/deps/jsr.io/@std/collections/1.0.9/intersect.js +36 -0
  99. package/esm/deps/jsr.io/@std/collections/1.0.9/intersect.js.map +1 -0
  100. package/esm/deps/jsr.io/@std/collections/1.0.9/invert.js +29 -0
  101. package/esm/deps/jsr.io/@std/collections/1.0.9/invert.js.map +1 -0
  102. package/esm/deps/jsr.io/@std/collections/1.0.9/invert_by.js +46 -0
  103. package/esm/deps/jsr.io/@std/collections/1.0.9/invert_by.js.map +1 -0
  104. package/esm/deps/jsr.io/@std/collections/1.0.9/join_to_string.js +59 -0
  105. package/esm/deps/jsr.io/@std/collections/1.0.9/join_to_string.js.map +1 -0
  106. package/esm/deps/jsr.io/@std/collections/1.0.9/map_entries.js +47 -0
  107. package/esm/deps/jsr.io/@std/collections/1.0.9/map_entries.js.map +1 -0
  108. package/esm/deps/jsr.io/@std/collections/1.0.9/map_keys.js +42 -0
  109. package/esm/deps/jsr.io/@std/collections/1.0.9/map_keys.js.map +1 -0
  110. package/esm/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.js +43 -0
  111. package/esm/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.js.map +1 -0
  112. package/esm/deps/jsr.io/@std/collections/1.0.9/map_values.js +13 -0
  113. package/esm/deps/jsr.io/@std/collections/1.0.9/map_values.js.map +1 -0
  114. package/esm/deps/jsr.io/@std/collections/1.0.9/max_by.js +15 -0
  115. package/esm/deps/jsr.io/@std/collections/1.0.9/max_by.js.map +1 -0
  116. package/esm/deps/jsr.io/@std/collections/1.0.9/max_of.js +17 -0
  117. package/esm/deps/jsr.io/@std/collections/1.0.9/max_of.js.map +1 -0
  118. package/esm/deps/jsr.io/@std/collections/1.0.9/max_with.js +41 -0
  119. package/esm/deps/jsr.io/@std/collections/1.0.9/max_with.js.map +1 -0
  120. package/esm/deps/jsr.io/@std/collections/1.0.9/min_by.js +15 -0
  121. package/esm/deps/jsr.io/@std/collections/1.0.9/min_by.js.map +1 -0
  122. package/esm/deps/jsr.io/@std/collections/1.0.9/min_of.js +17 -0
  123. package/esm/deps/jsr.io/@std/collections/1.0.9/min_of.js.map +1 -0
  124. package/esm/deps/jsr.io/@std/collections/1.0.9/min_with.js +37 -0
  125. package/esm/deps/jsr.io/@std/collections/1.0.9/min_with.js.map +1 -0
  126. package/esm/deps/jsr.io/@std/collections/1.0.9/mod.js +75 -0
  127. package/esm/deps/jsr.io/@std/collections/1.0.9/mod.js.map +1 -0
  128. package/esm/deps/jsr.io/@std/collections/1.0.9/omit.js +29 -0
  129. package/esm/deps/jsr.io/@std/collections/1.0.9/omit.js.map +1 -0
  130. package/esm/deps/jsr.io/@std/collections/1.0.9/partition.js +16 -0
  131. package/esm/deps/jsr.io/@std/collections/1.0.9/partition.js.map +1 -0
  132. package/esm/deps/jsr.io/@std/collections/1.0.9/partition_entries.js +54 -0
  133. package/esm/deps/jsr.io/@std/collections/1.0.9/partition_entries.js.map +1 -0
  134. package/esm/deps/jsr.io/@std/collections/1.0.9/permutations.js +58 -0
  135. package/esm/deps/jsr.io/@std/collections/1.0.9/permutations.js.map +1 -0
  136. package/esm/deps/jsr.io/@std/collections/1.0.9/pick.js +33 -0
  137. package/esm/deps/jsr.io/@std/collections/1.0.9/pick.js.map +1 -0
  138. package/esm/deps/jsr.io/@std/collections/1.0.9/reduce_groups.js +40 -0
  139. package/esm/deps/jsr.io/@std/collections/1.0.9/reduce_groups.js.map +1 -0
  140. package/esm/deps/jsr.io/@std/collections/1.0.9/running_reduce.js +32 -0
  141. package/esm/deps/jsr.io/@std/collections/1.0.9/running_reduce.js.map +1 -0
  142. package/esm/deps/jsr.io/@std/collections/1.0.9/sample.js +35 -0
  143. package/esm/deps/jsr.io/@std/collections/1.0.9/sample.js.map +1 -0
  144. package/esm/deps/jsr.io/@std/collections/1.0.9/sliding_windows.js +57 -0
  145. package/esm/deps/jsr.io/@std/collections/1.0.9/sliding_windows.js.map +1 -0
  146. package/esm/deps/jsr.io/@std/collections/1.0.9/sort_by.js +30 -0
  147. package/esm/deps/jsr.io/@std/collections/1.0.9/sort_by.js.map +1 -0
  148. package/esm/deps/jsr.io/@std/collections/1.0.9/sum_of.js +37 -0
  149. package/esm/deps/jsr.io/@std/collections/1.0.9/sum_of.js.map +1 -0
  150. package/esm/deps/jsr.io/@std/collections/1.0.9/take_last_while.js +34 -0
  151. package/esm/deps/jsr.io/@std/collections/1.0.9/take_last_while.js.map +1 -0
  152. package/esm/deps/jsr.io/@std/collections/1.0.9/take_while.js +39 -0
  153. package/esm/deps/jsr.io/@std/collections/1.0.9/take_while.js.map +1 -0
  154. package/esm/deps/jsr.io/@std/collections/1.0.9/union.js +34 -0
  155. package/esm/deps/jsr.io/@std/collections/1.0.9/union.js.map +1 -0
  156. package/esm/deps/jsr.io/@std/collections/1.0.9/unzip.js +46 -0
  157. package/esm/deps/jsr.io/@std/collections/1.0.9/unzip.js.map +1 -0
  158. package/esm/deps/jsr.io/@std/collections/1.0.9/without_all.js +28 -0
  159. package/esm/deps/jsr.io/@std/collections/1.0.9/without_all.js.map +1 -0
  160. package/esm/deps/jsr.io/@std/collections/1.0.9/zip.js +43 -0
  161. package/esm/deps/jsr.io/@std/collections/1.0.9/zip.js.map +1 -0
  162. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js +111 -0
  163. package/esm/deps/jsr.io/@std/internal/1.0.5/build_message.js.map +1 -0
  164. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js +277 -0
  165. package/esm/deps/jsr.io/@std/internal/1.0.5/diff.js.map +1 -0
  166. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js +180 -0
  167. package/esm/deps/jsr.io/@std/internal/1.0.5/diff_str.js.map +1 -0
  168. package/esm/deps/jsr.io/@std/internal/1.0.5/format.js +38 -0
  169. package/esm/deps/jsr.io/@std/internal/1.0.5/format.js.map +1 -0
  170. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js +208 -0
  171. package/esm/deps/jsr.io/@std/internal/1.0.5/styles.js.map +1 -0
  172. package/esm/deps/jsr.io/@std/internal/1.0.5/types.js +3 -0
  173. package/esm/deps/jsr.io/@std/internal/1.0.5/types.js.map +1 -0
  174. package/esm/mod.js +3 -10
  175. package/esm/mod.js.map +1 -1
  176. package/esm/types/Ref.js +11 -0
  177. package/esm/types/Ref.js.map +1 -0
  178. package/esm/types/RootTy.js +19 -0
  179. package/esm/types/RootTy.js.map +1 -0
  180. package/esm/types/Ty.js +17 -0
  181. package/esm/types/Ty.js.map +1 -0
  182. package/esm/types/array.js +9 -0
  183. package/esm/types/array.js.map +1 -0
  184. package/esm/types/constant.js +8 -0
  185. package/esm/types/constant.js.map +1 -0
  186. package/esm/types/constantUnion.js +25 -0
  187. package/esm/types/constantUnion.js.map +1 -0
  188. package/esm/types/leaves.js +18 -0
  189. package/esm/types/leaves.js.map +1 -0
  190. package/esm/types/mod.js +11 -0
  191. package/esm/types/mod.js.map +1 -0
  192. package/esm/{object.js → types/object.js} +4 -4
  193. package/esm/types/object.js.map +1 -0
  194. package/esm/types/std/Option.js +9 -0
  195. package/esm/types/std/Option.js.map +1 -0
  196. package/esm/types/std/Wrapper.js +5 -0
  197. package/esm/types/std/Wrapper.js.map +1 -0
  198. package/esm/types/std/mod.js +3 -0
  199. package/esm/types/std/mod.js.map +1 -0
  200. package/esm/types/taggedUnion.js +20 -0
  201. package/esm/types/taggedUnion.js.map +1 -0
  202. package/esm/util/phantoms.js +4 -0
  203. package/esm/util/phantoms.js.map +1 -0
  204. package/esm/util/recombineTaggedTemplateArgs.js +4 -0
  205. package/esm/util/recombineTaggedTemplateArgs.js.map +1 -0
  206. package/package.json +10 -7
  207. package/src/ResponseFormat.ts +76 -25
  208. package/src/Tool.ts +38 -0
  209. package/src/_dnt.polyfills.ts +27 -0
  210. package/src/_dnt.shims.ts +60 -0
  211. package/src/deps/jsr.io/@std/assert/1.0.8/almost_equals.ts +55 -0
  212. package/src/deps/jsr.io/@std/assert/1.0.8/array_includes.ts +57 -0
  213. package/src/deps/jsr.io/@std/assert/1.0.8/assert.ts +23 -0
  214. package/src/deps/jsr.io/@std/assert/1.0.8/assertion_error.ts +31 -0
  215. package/src/deps/jsr.io/@std/assert/1.0.8/equal.ts +210 -0
  216. package/src/deps/jsr.io/@std/assert/1.0.8/equals.ts +52 -0
  217. package/src/deps/jsr.io/@std/assert/1.0.8/exists.ts +31 -0
  218. package/src/deps/jsr.io/@std/assert/1.0.8/fail.ts +21 -0
  219. package/src/deps/jsr.io/@std/assert/1.0.8/false.ts +26 -0
  220. package/src/deps/jsr.io/@std/assert/1.0.8/greater.ts +30 -0
  221. package/src/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.ts +36 -0
  222. package/src/deps/jsr.io/@std/assert/1.0.8/instance_of.ts +64 -0
  223. package/src/deps/jsr.io/@std/assert/1.0.8/is_error.ts +65 -0
  224. package/src/deps/jsr.io/@std/assert/1.0.8/less.ts +29 -0
  225. package/src/deps/jsr.io/@std/assert/1.0.8/less_or_equal.ts +36 -0
  226. package/src/deps/jsr.io/@std/assert/1.0.8/match.ts +30 -0
  227. package/src/deps/jsr.io/@std/assert/1.0.8/mod.ts +47 -0
  228. package/src/deps/jsr.io/@std/assert/1.0.8/not_equals.ts +36 -0
  229. package/src/deps/jsr.io/@std/assert/1.0.8/not_instance_of.ts +33 -0
  230. package/src/deps/jsr.io/@std/assert/1.0.8/not_match.ts +30 -0
  231. package/src/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.ts +42 -0
  232. package/src/deps/jsr.io/@std/assert/1.0.8/object_match.ts +202 -0
  233. package/src/deps/jsr.io/@std/assert/1.0.8/rejects.ts +123 -0
  234. package/src/deps/jsr.io/@std/assert/1.0.8/strict_equals.ts +67 -0
  235. package/src/deps/jsr.io/@std/assert/1.0.8/string_includes.ts +30 -0
  236. package/src/deps/jsr.io/@std/assert/1.0.8/throws.ts +111 -0
  237. package/src/deps/jsr.io/@std/assert/1.0.8/unimplemented.ts +21 -0
  238. package/src/deps/jsr.io/@std/assert/1.0.8/unreachable.ts +21 -0
  239. package/src/deps/jsr.io/@std/collections/1.0.9/_utils.ts +26 -0
  240. package/src/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.ts +62 -0
  241. package/src/deps/jsr.io/@std/collections/1.0.9/associate_by.ts +50 -0
  242. package/src/deps/jsr.io/@std/collections/1.0.9/associate_with.ts +46 -0
  243. package/src/deps/jsr.io/@std/collections/1.0.9/chunk.ts +56 -0
  244. package/src/deps/jsr.io/@std/collections/1.0.9/deep_merge.ts +578 -0
  245. package/src/deps/jsr.io/@std/collections/1.0.9/distinct.ts +29 -0
  246. package/src/deps/jsr.io/@std/collections/1.0.9/distinct_by.ts +42 -0
  247. package/src/deps/jsr.io/@std/collections/1.0.9/drop_last_while.ts +36 -0
  248. package/src/deps/jsr.io/@std/collections/1.0.9/drop_while.ts +39 -0
  249. package/src/deps/jsr.io/@std/collections/1.0.9/filter_entries.ts +48 -0
  250. package/src/deps/jsr.io/@std/collections/1.0.9/filter_keys.ts +51 -0
  251. package/src/deps/jsr.io/@std/collections/1.0.9/filter_values.ts +51 -0
  252. package/src/deps/jsr.io/@std/collections/1.0.9/find_single.ts +48 -0
  253. package/src/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.ts +47 -0
  254. package/src/deps/jsr.io/@std/collections/1.0.9/includes_value.ts +45 -0
  255. package/src/deps/jsr.io/@std/collections/1.0.9/intersect.ts +35 -0
  256. package/src/deps/jsr.io/@std/collections/1.0.9/invert.ts +38 -0
  257. package/src/deps/jsr.io/@std/collections/1.0.9/invert_by.ts +56 -0
  258. package/src/deps/jsr.io/@std/collections/1.0.9/join_to_string.ts +109 -0
  259. package/src/deps/jsr.io/@std/collections/1.0.9/map_entries.ts +53 -0
  260. package/src/deps/jsr.io/@std/collections/1.0.9/map_keys.ts +47 -0
  261. package/src/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.ts +49 -0
  262. package/src/deps/jsr.io/@std/collections/1.0.9/map_values.ts +96 -0
  263. package/src/deps/jsr.io/@std/collections/1.0.9/max_by.ts +153 -0
  264. package/src/deps/jsr.io/@std/collections/1.0.9/max_of.ts +90 -0
  265. package/src/deps/jsr.io/@std/collections/1.0.9/max_with.ts +46 -0
  266. package/src/deps/jsr.io/@std/collections/1.0.9/min_by.ts +151 -0
  267. package/src/deps/jsr.io/@std/collections/1.0.9/min_of.ts +90 -0
  268. package/src/deps/jsr.io/@std/collections/1.0.9/min_with.ts +42 -0
  269. package/src/deps/jsr.io/@std/collections/1.0.9/mod.ts +76 -0
  270. package/src/deps/jsr.io/@std/collections/1.0.9/omit.ts +34 -0
  271. package/src/deps/jsr.io/@std/collections/1.0.9/partition.ts +85 -0
  272. package/src/deps/jsr.io/@std/collections/1.0.9/partition_entries.ts +58 -0
  273. package/src/deps/jsr.io/@std/collections/1.0.9/permutations.ts +66 -0
  274. package/src/deps/jsr.io/@std/collections/1.0.9/pick.ts +34 -0
  275. package/src/deps/jsr.io/@std/collections/1.0.9/reduce_groups.ts +45 -0
  276. package/src/deps/jsr.io/@std/collections/1.0.9/running_reduce.ts +38 -0
  277. package/src/deps/jsr.io/@std/collections/1.0.9/sample.ts +36 -0
  278. package/src/deps/jsr.io/@std/collections/1.0.9/sliding_windows.ts +86 -0
  279. package/src/deps/jsr.io/@std/collections/1.0.9/sort_by.ts +219 -0
  280. package/src/deps/jsr.io/@std/collections/1.0.9/sum_of.ts +42 -0
  281. package/src/deps/jsr.io/@std/collections/1.0.9/take_last_while.ts +37 -0
  282. package/src/deps/jsr.io/@std/collections/1.0.9/take_while.ts +44 -0
  283. package/src/deps/jsr.io/@std/collections/1.0.9/union.ts +36 -0
  284. package/src/deps/jsr.io/@std/collections/1.0.9/unzip.ts +50 -0
  285. package/src/deps/jsr.io/@std/collections/1.0.9/without_all.ts +28 -0
  286. package/src/deps/jsr.io/@std/collections/1.0.9/zip.ts +49 -0
  287. package/src/deps/jsr.io/@std/internal/1.0.5/build_message.ts +134 -0
  288. package/src/deps/jsr.io/@std/internal/1.0.5/diff.ts +317 -0
  289. package/src/deps/jsr.io/@std/internal/1.0.5/diff_str.ts +204 -0
  290. package/src/deps/jsr.io/@std/internal/1.0.5/format.ts +39 -0
  291. package/src/deps/jsr.io/@std/internal/1.0.5/styles.ts +233 -0
  292. package/src/deps/jsr.io/@std/internal/1.0.5/types.ts +18 -0
  293. package/src/mod.ts +3 -18
  294. package/src/types/Ref.ts +16 -0
  295. package/src/types/RootTy.ts +40 -0
  296. package/src/types/Ty.ts +57 -0
  297. package/src/types/array.ts +9 -0
  298. package/src/types/constant.ts +8 -0
  299. package/src/types/constantUnion.ts +27 -0
  300. package/src/types/leaves.ts +21 -0
  301. package/src/types/mod.ts +10 -0
  302. package/src/types/object.ts +15 -0
  303. package/src/types/std/Option.ts +15 -0
  304. package/src/types/std/Wrapper.ts +8 -0
  305. package/src/types/std/mod.ts +2 -0
  306. package/src/types/taggedUnion.ts +28 -0
  307. package/src/util/phantoms.ts +3 -0
  308. package/src/util/recombineTaggedTemplateArgs.ts +6 -0
  309. package/types/ResponseFormat.d.ts +26 -0
  310. package/types/ResponseFormat.d.ts.map +1 -0
  311. package/types/Tool.d.ts +13 -0
  312. package/types/Tool.d.ts.map +1 -0
  313. package/types/_dnt.polyfills.d.ts +12 -0
  314. package/types/_dnt.polyfills.d.ts.map +1 -0
  315. package/types/_dnt.shims.d.ts +2 -0
  316. package/types/_dnt.shims.d.ts.map +1 -0
  317. package/types/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts +29 -0
  318. package/types/deps/jsr.io/@std/assert/1.0.8/almost_equals.d.ts.map +1 -0
  319. package/types/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts +24 -0
  320. package/types/deps/jsr.io/@std/assert/1.0.8/array_includes.d.ts.map +1 -0
  321. package/types/deps/jsr.io/@std/assert/1.0.8/assert.d.ts +16 -0
  322. package/types/deps/jsr.io/@std/assert/1.0.8/assert.d.ts.map +1 -0
  323. package/types/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts +26 -0
  324. package/types/deps/jsr.io/@std/assert/1.0.8/assertion_error.d.ts.map +1 -0
  325. package/types/deps/jsr.io/@std/assert/1.0.8/equal.d.ts +17 -0
  326. package/types/deps/jsr.io/@std/assert/1.0.8/equal.d.ts.map +1 -0
  327. package/types/deps/jsr.io/@std/assert/1.0.8/equals.d.ts +22 -0
  328. package/types/deps/jsr.io/@std/assert/1.0.8/equals.d.ts.map +1 -0
  329. package/types/deps/jsr.io/@std/assert/1.0.8/exists.d.ts +18 -0
  330. package/types/deps/jsr.io/@std/assert/1.0.8/exists.d.ts.map +1 -0
  331. package/types/deps/jsr.io/@std/assert/1.0.8/fail.d.ts +15 -0
  332. package/types/deps/jsr.io/@std/assert/1.0.8/fail.d.ts.map +1 -0
  333. package/types/deps/jsr.io/@std/assert/1.0.8/false.d.ts +18 -0
  334. package/types/deps/jsr.io/@std/assert/1.0.8/false.d.ts.map +1 -0
  335. package/types/deps/jsr.io/@std/assert/1.0.8/greater.d.ts +20 -0
  336. package/types/deps/jsr.io/@std/assert/1.0.8/greater.d.ts.map +1 -0
  337. package/types/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts +20 -0
  338. package/types/deps/jsr.io/@std/assert/1.0.8/greater_or_equal.d.ts.map +1 -0
  339. package/types/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts +23 -0
  340. package/types/deps/jsr.io/@std/assert/1.0.8/instance_of.d.ts.map +1 -0
  341. package/types/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts +25 -0
  342. package/types/deps/jsr.io/@std/assert/1.0.8/is_error.d.ts.map +1 -0
  343. package/types/deps/jsr.io/@std/assert/1.0.8/less.d.ts +19 -0
  344. package/types/deps/jsr.io/@std/assert/1.0.8/less.d.ts.map +1 -0
  345. package/types/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts +20 -0
  346. package/types/deps/jsr.io/@std/assert/1.0.8/less_or_equal.d.ts.map +1 -0
  347. package/types/deps/jsr.io/@std/assert/1.0.8/match.d.ts +18 -0
  348. package/types/deps/jsr.io/@std/assert/1.0.8/match.d.ts.map +1 -0
  349. package/types/deps/jsr.io/@std/assert/1.0.8/mod.d.ts +44 -0
  350. package/types/deps/jsr.io/@std/assert/1.0.8/mod.d.ts.map +1 -0
  351. package/types/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts +21 -0
  352. package/types/deps/jsr.io/@std/assert/1.0.8/not_equals.d.ts.map +1 -0
  353. package/types/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts +20 -0
  354. package/types/deps/jsr.io/@std/assert/1.0.8/not_instance_of.d.ts.map +1 -0
  355. package/types/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts +18 -0
  356. package/types/deps/jsr.io/@std/assert/1.0.8/not_match.d.ts.map +1 -0
  357. package/types/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts +23 -0
  358. package/types/deps/jsr.io/@std/assert/1.0.8/not_strict_equals.d.ts.map +1 -0
  359. package/types/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts +28 -0
  360. package/types/deps/jsr.io/@std/assert/1.0.8/object_match.d.ts.map +1 -0
  361. package/types/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts +42 -0
  362. package/types/deps/jsr.io/@std/assert/1.0.8/rejects.d.ts.map +1 -0
  363. package/types/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts +24 -0
  364. package/types/deps/jsr.io/@std/assert/1.0.8/strict_equals.d.ts.map +1 -0
  365. package/types/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts +18 -0
  366. package/types/deps/jsr.io/@std/assert/1.0.8/string_includes.d.ts.map +1 -0
  367. package/types/deps/jsr.io/@std/assert/1.0.8/throws.d.ts +45 -0
  368. package/types/deps/jsr.io/@std/assert/1.0.8/throws.d.ts.map +1 -0
  369. package/types/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts +15 -0
  370. package/types/deps/jsr.io/@std/assert/1.0.8/unimplemented.d.ts.map +1 -0
  371. package/types/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts +15 -0
  372. package/types/deps/jsr.io/@std/assert/1.0.8/unreachable.d.ts.map +1 -0
  373. package/types/deps/jsr.io/@std/collections/1.0.9/_utils.d.ts +6 -0
  374. package/types/deps/jsr.io/@std/collections/1.0.9/_utils.d.ts.map +1 -0
  375. package/types/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.d.ts +41 -0
  376. package/types/deps/jsr.io/@std/collections/1.0.9/aggregate_groups.d.ts.map +1 -0
  377. package/types/deps/jsr.io/@std/collections/1.0.9/associate_by.d.ts +37 -0
  378. package/types/deps/jsr.io/@std/collections/1.0.9/associate_by.d.ts.map +1 -0
  379. package/types/deps/jsr.io/@std/collections/1.0.9/associate_with.d.ts +33 -0
  380. package/types/deps/jsr.io/@std/collections/1.0.9/associate_with.d.ts.map +1 -0
  381. package/types/deps/jsr.io/@std/collections/1.0.9/chunk.d.ts +38 -0
  382. package/types/deps/jsr.io/@std/collections/1.0.9/chunk.d.ts.map +1 -0
  383. package/types/deps/jsr.io/@std/collections/1.0.9/deep_merge.d.ts +322 -0
  384. package/types/deps/jsr.io/@std/collections/1.0.9/deep_merge.d.ts.map +1 -0
  385. package/types/deps/jsr.io/@std/collections/1.0.9/distinct.d.ts +23 -0
  386. package/types/deps/jsr.io/@std/collections/1.0.9/distinct.d.ts.map +1 -0
  387. package/types/deps/jsr.io/@std/collections/1.0.9/distinct_by.d.ts +26 -0
  388. package/types/deps/jsr.io/@std/collections/1.0.9/distinct_by.d.ts.map +1 -0
  389. package/types/deps/jsr.io/@std/collections/1.0.9/drop_last_while.d.ts +26 -0
  390. package/types/deps/jsr.io/@std/collections/1.0.9/drop_last_while.d.ts.map +1 -0
  391. package/types/deps/jsr.io/@std/collections/1.0.9/drop_while.d.ts +25 -0
  392. package/types/deps/jsr.io/@std/collections/1.0.9/drop_while.d.ts.map +1 -0
  393. package/types/deps/jsr.io/@std/collections/1.0.9/filter_entries.d.ts +32 -0
  394. package/types/deps/jsr.io/@std/collections/1.0.9/filter_entries.d.ts.map +1 -0
  395. package/types/deps/jsr.io/@std/collections/1.0.9/filter_keys.d.ts +36 -0
  396. package/types/deps/jsr.io/@std/collections/1.0.9/filter_keys.d.ts.map +1 -0
  397. package/types/deps/jsr.io/@std/collections/1.0.9/filter_values.d.ts +35 -0
  398. package/types/deps/jsr.io/@std/collections/1.0.9/filter_values.d.ts.map +1 -0
  399. package/types/deps/jsr.io/@std/collections/1.0.9/find_single.d.ts +31 -0
  400. package/types/deps/jsr.io/@std/collections/1.0.9/find_single.d.ts.map +1 -0
  401. package/types/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.d.ts +32 -0
  402. package/types/deps/jsr.io/@std/collections/1.0.9/first_not_nullish_of.d.ts.map +1 -0
  403. package/types/deps/jsr.io/@std/collections/1.0.9/includes_value.d.ts +29 -0
  404. package/types/deps/jsr.io/@std/collections/1.0.9/includes_value.d.ts.map +1 -0
  405. package/types/deps/jsr.io/@std/collections/1.0.9/intersect.d.ts +25 -0
  406. package/types/deps/jsr.io/@std/collections/1.0.9/intersect.d.ts.map +1 -0
  407. package/types/deps/jsr.io/@std/collections/1.0.9/invert.d.ts +29 -0
  408. package/types/deps/jsr.io/@std/collections/1.0.9/invert.d.ts.map +1 -0
  409. package/types/deps/jsr.io/@std/collections/1.0.9/invert_by.d.ts +34 -0
  410. package/types/deps/jsr.io/@std/collections/1.0.9/invert_by.d.ts.map +1 -0
  411. package/types/deps/jsr.io/@std/collections/1.0.9/join_to_string.d.ts +75 -0
  412. package/types/deps/jsr.io/@std/collections/1.0.9/join_to_string.d.ts.map +1 -0
  413. package/types/deps/jsr.io/@std/collections/1.0.9/map_entries.d.ts +37 -0
  414. package/types/deps/jsr.io/@std/collections/1.0.9/map_entries.d.ts.map +1 -0
  415. package/types/deps/jsr.io/@std/collections/1.0.9/map_keys.d.ts +33 -0
  416. package/types/deps/jsr.io/@std/collections/1.0.9/map_keys.d.ts.map +1 -0
  417. package/types/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.d.ts +32 -0
  418. package/types/deps/jsr.io/@std/collections/1.0.9/map_not_nullish.d.ts.map +1 -0
  419. package/types/deps/jsr.io/@std/collections/1.0.9/map_values.d.ts +71 -0
  420. package/types/deps/jsr.io/@std/collections/1.0.9/map_values.d.ts.map +1 -0
  421. package/types/deps/jsr.io/@std/collections/1.0.9/max_by.d.ts +117 -0
  422. package/types/deps/jsr.io/@std/collections/1.0.9/max_by.d.ts.map +1 -0
  423. package/types/deps/jsr.io/@std/collections/1.0.9/max_of.d.ts +61 -0
  424. package/types/deps/jsr.io/@std/collections/1.0.9/max_of.d.ts.map +1 -0
  425. package/types/deps/jsr.io/@std/collections/1.0.9/max_with.d.ts +29 -0
  426. package/types/deps/jsr.io/@std/collections/1.0.9/max_with.d.ts.map +1 -0
  427. package/types/deps/jsr.io/@std/collections/1.0.9/min_by.d.ts +115 -0
  428. package/types/deps/jsr.io/@std/collections/1.0.9/min_by.d.ts.map +1 -0
  429. package/types/deps/jsr.io/@std/collections/1.0.9/min_of.d.ts +61 -0
  430. package/types/deps/jsr.io/@std/collections/1.0.9/min_of.d.ts.map +1 -0
  431. package/types/deps/jsr.io/@std/collections/1.0.9/min_with.d.ts +25 -0
  432. package/types/deps/jsr.io/@std/collections/1.0.9/min_with.d.ts.map +1 -0
  433. package/types/deps/jsr.io/@std/collections/1.0.9/mod.d.ts +73 -0
  434. package/types/deps/jsr.io/@std/collections/1.0.9/mod.d.ts.map +1 -0
  435. package/types/deps/jsr.io/@std/collections/1.0.9/omit.d.ts +24 -0
  436. package/types/deps/jsr.io/@std/collections/1.0.9/omit.d.ts.map +1 -0
  437. package/types/deps/jsr.io/@std/collections/1.0.9/partition.d.ts +60 -0
  438. package/types/deps/jsr.io/@std/collections/1.0.9/partition.d.ts.map +1 -0
  439. package/types/deps/jsr.io/@std/collections/1.0.9/partition_entries.d.ts +39 -0
  440. package/types/deps/jsr.io/@std/collections/1.0.9/partition_entries.d.ts.map +1 -0
  441. package/types/deps/jsr.io/@std/collections/1.0.9/permutations.d.ts +27 -0
  442. package/types/deps/jsr.io/@std/collections/1.0.9/permutations.d.ts.map +1 -0
  443. package/types/deps/jsr.io/@std/collections/1.0.9/pick.d.ts +25 -0
  444. package/types/deps/jsr.io/@std/collections/1.0.9/pick.d.ts.map +1 -0
  445. package/types/deps/jsr.io/@std/collections/1.0.9/reduce_groups.d.ts +35 -0
  446. package/types/deps/jsr.io/@std/collections/1.0.9/reduce_groups.d.ts.map +1 -0
  447. package/types/deps/jsr.io/@std/collections/1.0.9/running_reduce.d.ts +27 -0
  448. package/types/deps/jsr.io/@std/collections/1.0.9/running_reduce.d.ts.map +1 -0
  449. package/types/deps/jsr.io/@std/collections/1.0.9/sample.d.ts +24 -0
  450. package/types/deps/jsr.io/@std/collections/1.0.9/sample.d.ts.map +1 -0
  451. package/types/deps/jsr.io/@std/collections/1.0.9/sliding_windows.d.ts +66 -0
  452. package/types/deps/jsr.io/@std/collections/1.0.9/sliding_windows.d.ts.map +1 -0
  453. package/types/deps/jsr.io/@std/collections/1.0.9/sort_by.d.ts +161 -0
  454. package/types/deps/jsr.io/@std/collections/1.0.9/sort_by.d.ts.map +1 -0
  455. package/types/deps/jsr.io/@std/collections/1.0.9/sum_of.d.ts +29 -0
  456. package/types/deps/jsr.io/@std/collections/1.0.9/sum_of.d.ts.map +1 -0
  457. package/types/deps/jsr.io/@std/collections/1.0.9/take_last_while.d.ts +27 -0
  458. package/types/deps/jsr.io/@std/collections/1.0.9/take_last_while.d.ts.map +1 -0
  459. package/types/deps/jsr.io/@std/collections/1.0.9/take_while.d.ts +30 -0
  460. package/types/deps/jsr.io/@std/collections/1.0.9/take_while.d.ts.map +1 -0
  461. package/types/deps/jsr.io/@std/collections/1.0.9/union.d.ts +24 -0
  462. package/types/deps/jsr.io/@std/collections/1.0.9/union.d.ts.map +1 -0
  463. package/types/deps/jsr.io/@std/collections/1.0.9/unzip.d.ts +32 -0
  464. package/types/deps/jsr.io/@std/collections/1.0.9/unzip.d.ts.map +1 -0
  465. package/types/deps/jsr.io/@std/collections/1.0.9/without_all.d.ts +23 -0
  466. package/types/deps/jsr.io/@std/collections/1.0.9/without_all.d.ts.map +1 -0
  467. package/types/deps/jsr.io/@std/collections/1.0.9/zip.d.ts +34 -0
  468. package/types/deps/jsr.io/@std/collections/1.0.9/zip.d.ts.map +1 -0
  469. package/types/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts +82 -0
  470. package/types/deps/jsr.io/@std/internal/1.0.5/build_message.d.ts.map +1 -0
  471. package/types/deps/jsr.io/@std/internal/1.0.5/diff.d.ts +140 -0
  472. package/types/deps/jsr.io/@std/internal/1.0.5/diff.d.ts.map +1 -0
  473. package/types/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts +99 -0
  474. package/types/deps/jsr.io/@std/internal/1.0.5/diff_str.d.ts.map +1 -0
  475. package/types/deps/jsr.io/@std/internal/1.0.5/format.d.ts +2 -0
  476. package/types/deps/jsr.io/@std/internal/1.0.5/format.d.ts.map +1 -0
  477. package/types/deps/jsr.io/@std/internal/1.0.5/styles.d.ts +159 -0
  478. package/types/deps/jsr.io/@std/internal/1.0.5/styles.d.ts.map +1 -0
  479. package/types/deps/jsr.io/@std/internal/1.0.5/types.d.ts +16 -0
  480. package/types/deps/jsr.io/@std/internal/1.0.5/types.d.ts.map +1 -0
  481. package/types/mod.d.ts +5 -0
  482. package/types/mod.d.ts.map +1 -0
  483. package/types/types/Ref.d.ts +4 -0
  484. package/types/types/Ref.d.ts.map +1 -0
  485. package/types/types/RootTy.d.ts +8 -0
  486. package/types/types/RootTy.d.ts.map +1 -0
  487. package/types/types/Ty.d.ts +27 -0
  488. package/types/types/Ty.d.ts.map +1 -0
  489. package/types/types/array.d.ts +3 -0
  490. package/types/types/array.d.ts.map +1 -0
  491. package/types/types/constant.d.ts +3 -0
  492. package/types/types/constant.d.ts.map +1 -0
  493. package/types/types/constantUnion.d.ts +3 -0
  494. package/types/types/constantUnion.d.ts.map +1 -0
  495. package/types/types/leaves.d.ts +6 -0
  496. package/types/types/leaves.d.ts.map +1 -0
  497. package/types/types/mod.d.ts +11 -0
  498. package/types/types/mod.d.ts.map +1 -0
  499. package/types/types/object.d.ts +6 -0
  500. package/types/types/object.d.ts.map +1 -0
  501. package/types/types/std/Option.d.ts +7 -0
  502. package/types/types/std/Option.d.ts.map +1 -0
  503. package/types/types/std/Wrapper.d.ts +7 -0
  504. package/types/types/std/Wrapper.d.ts.map +1 -0
  505. package/types/types/std/mod.d.ts +3 -0
  506. package/types/types/std/mod.d.ts.map +1 -0
  507. package/types/types/taggedUnion.d.ts +8 -0
  508. package/types/types/taggedUnion.d.ts.map +1 -0
  509. package/types/util/phantoms.d.ts +2 -0
  510. package/types/util/phantoms.d.ts.map +1 -0
  511. package/types/util/recombineTaggedTemplateArgs.d.ts +2 -0
  512. package/types/util/recombineTaggedTemplateArgs.d.ts.map +1 -0
  513. package/esm/F.d.ts +0 -13
  514. package/esm/F.d.ts.map +0 -1
  515. package/esm/F.js +0 -10
  516. package/esm/F.js.map +0 -1
  517. package/esm/ResponseFormat.d.ts +0 -14
  518. package/esm/ResponseFormat.d.ts.map +0 -1
  519. package/esm/_base.d.ts +0 -13
  520. package/esm/_base.d.ts.map +0 -1
  521. package/esm/_base.js +0 -40
  522. package/esm/_base.js.map +0 -1
  523. package/esm/array.d.ts +0 -4
  524. package/esm/array.d.ts.map +0 -1
  525. package/esm/array.js +0 -9
  526. package/esm/array.js.map +0 -1
  527. package/esm/common.d.ts +0 -6
  528. package/esm/common.d.ts.map +0 -1
  529. package/esm/common.js +0 -2
  530. package/esm/common.js.map +0 -1
  531. package/esm/literal.d.ts +0 -4
  532. package/esm/literal.d.ts.map +0 -1
  533. package/esm/literal.js +0 -8
  534. package/esm/literal.js.map +0 -1
  535. package/esm/mod.d.ts +0 -16
  536. package/esm/mod.d.ts.map +0 -1
  537. package/esm/number.d.ts +0 -4
  538. package/esm/number.d.ts.map +0 -1
  539. package/esm/number.js +0 -8
  540. package/esm/number.js.map +0 -1
  541. package/esm/object.d.ts +0 -7
  542. package/esm/object.d.ts.map +0 -1
  543. package/esm/object.js.map +0 -1
  544. package/esm/schema.d.ts +0 -4
  545. package/esm/schema.d.ts.map +0 -1
  546. package/esm/schema.js +0 -9
  547. package/esm/schema.js.map +0 -1
  548. package/esm/string.d.ts +0 -4
  549. package/esm/string.d.ts.map +0 -1
  550. package/esm/string.js +0 -8
  551. package/esm/string.js.map +0 -1
  552. package/esm/union.d.ts +0 -6
  553. package/esm/union.d.ts.map +0 -1
  554. package/esm/union.js +0 -8
  555. package/esm/union.js.map +0 -1
  556. package/src/F.ts +0 -27
  557. package/src/_base.ts +0 -25
  558. package/src/array.ts +0 -11
  559. package/src/common.ts +0 -6
  560. package/src/literal.ts +0 -10
  561. package/src/number.ts +0 -10
  562. package/src/object.ts +0 -17
  563. package/src/schema.ts +0 -10
  564. package/src/string.ts +0 -10
  565. package/src/union.ts +0 -12
@@ -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"}
@@ -0,0 +1,3 @@
1
+ import { Ty } from "./Ty.js";
2
+ export declare function array<E extends Ty>(element: E): Ty<Array<E[Ty.T]>, E[Ty.P]>;
3
+ //# sourceMappingURL=array.d.ts.map
@@ -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,3 @@
1
+ import { Ty } from "./Ty.js";
2
+ export declare function constant<V extends number | string>(value: V): Ty<V, never>;
3
+ //# sourceMappingURL=constant.d.ts.map
@@ -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,3 @@
1
+ import { Ty } from "./Ty.js";
2
+ export declare function constantUnion<M extends Array<number | string>>(...members: M): Ty<M[number], never>;
3
+ //# sourceMappingURL=constantUnion.d.ts.map
@@ -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"}
@@ -0,0 +1,6 @@
1
+ import { Ty } from "./Ty.js";
2
+ export declare const none: Ty<null, never>;
3
+ export declare const boolean: Ty<boolean, never>;
4
+ export declare const number: Ty<number, never>;
5
+ export declare const string: Ty<string, never>;
6
+ //# sourceMappingURL=leaves.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leaves.d.ts","sourceRoot":"","sources":["../../src/types/leaves.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,CAG9B,CAAA;AAEH,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,KAAK,CAGpC,CAAA;AAEH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,KAAK,CAGlC,CAAA;AAEH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,KAAK,CAGlC,CAAA"}
@@ -0,0 +1,11 @@
1
+ export * from "./array.js";
2
+ export * from "./leaves.js";
3
+ export * from "./constant.js";
4
+ export * from "./constantUnion.js";
5
+ export * from "./std/mod.js";
6
+ export * from "./object.js";
7
+ export * from "./Ref.js";
8
+ export * from "./taggedUnion.js";
9
+ export * from "./Ty.js";
10
+ export * from "./RootTy.js";
11
+ //# sourceMappingURL=mod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/types/mod.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { RootTy } from "./RootTy.js";
2
+ import type { Ty } from "./Ty.js";
3
+ export declare function object<F extends Record<string, Ty>>(fields: F): RootTy<{
4
+ [K in keyof F]: F[K][Ty.T];
5
+ }, F[keyof F][Ty.P]>;
6
+ //# sourceMappingURL=object.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../src/types/object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAEjC,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,CACrE;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAAE,EAC9B,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CACjB,CAQA"}
@@ -0,0 +1,7 @@
1
+ import { taggedUnion } from "../taggedUnion.js";
2
+ import type { Ty } from "../Ty.js";
3
+ export declare function option<S extends Ty>(Some: S): ReturnType<typeof taggedUnion<{
4
+ Some: S;
5
+ None: Ty<null, never>;
6
+ }>>;
7
+ //# sourceMappingURL=Option.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../../../src/types/std/Option.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,UAAU,CAAA;AAElC,wBAAgB,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,GAAG,UAAU,CACvD,OAAO,WAAW,CAAC;IACjB,IAAI,EAAE,CAAC,CAAA;IACP,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;CACtB,CAAC,CACH,CAKA"}
@@ -0,0 +1,7 @@
1
+ import type { Ty } from "../mod.js";
2
+ import { object } from "../object.js";
3
+ export type Wrapper<X extends Ty = Ty> = ReturnType<typeof Wrapper<X>>;
4
+ export declare function Wrapper<X extends Ty>(value: X): ReturnType<typeof object<{
5
+ value: X;
6
+ }>>;
7
+ //# sourceMappingURL=Wrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Wrapper.d.ts","sourceRoot":"","sources":["../../../src/types/std/Wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;AAEtE,wBAAgB,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,UAAU,CAAC,OAAO,MAAM,CAAC;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC,CAEvF"}
@@ -0,0 +1,3 @@
1
+ export * from "./Option.js";
2
+ export * from "./Wrapper.js";
3
+ //# sourceMappingURL=mod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/types/std/mod.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { Ty } from "./Ty.js";
2
+ export declare function taggedUnion<M extends Record<string, Ty>>(members: M): Ty<{
3
+ [K in keyof M]: {
4
+ type: K;
5
+ value: M[K][Ty.T];
6
+ };
7
+ }[keyof M], M[keyof M][Ty.P]>;
8
+ //# sourceMappingURL=taggedUnion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taggedUnion.d.ts","sourceRoot":"","sources":["../../src/types/taggedUnion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAA;AAE5B,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,CACvE;KACG,CAAC,IAAI,MAAM,CAAC,GAAG;QACd,IAAI,EAAE,CAAC,CAAA;QACP,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;KAClB;CACF,CAAC,MAAM,CAAC,CAAC,EACV,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CACjB,CAiBA"}
@@ -0,0 +1,2 @@
1
+ export declare function phantoms<T>(): T;
2
+ //# sourceMappingURL=phantoms.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phantoms.d.ts","sourceRoot":"","sources":["../../src/util/phantoms.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,KAAK,CAAC,CAE/B"}
@@ -0,0 +1,2 @@
1
+ export declare function recombineTaggedTemplateArgs(strings: TemplateStringsArray, values: Array<number | string>): string;
2
+ //# sourceMappingURL=recombineTaggedTemplateArgs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recombineTaggedTemplateArgs.d.ts","sourceRoot":"","sources":["../../src/util/recombineTaggedTemplateArgs.ts"],"names":[],"mappings":"AAAA,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,oBAAoB,EAC7B,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAC7B,MAAM,CAER"}
package/esm/F.d.ts DELETED
@@ -1,13 +0,0 @@
1
- import type { Ty } from "./_base.js";
2
- import type { ValidRootKey } from "./common.js";
3
- export type F = {
4
- type: "function";
5
- /** The name of the function. */
6
- name: string;
7
- /** The description of the function. */
8
- description: string;
9
- /** Parameters of the function in JSON Schema. */
10
- parameters: unknown;
11
- };
12
- export declare function F<M extends Record<string, Ty>>(name: string, description: string, models: M, rootKey: ValidRootKey<M>): F;
13
- //# sourceMappingURL=F.d.ts.map
package/esm/F.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"F.d.ts","sourceRoot":"","sources":["../src/F.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG/C,MAAM,MAAM,CAAC,GAAG;IACd,IAAI,EAAE,UAAU,CAAA;IAChB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAA;IACnB,iDAAiD;IACjD,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,wBAAgB,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,EAC5C,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,GACvB,CAAC,CAOH"}
package/esm/F.js DELETED
@@ -1,10 +0,0 @@
1
- import { schema } from "./schema.js";
2
- export function F(name, description, models, rootKey) {
3
- return {
4
- type: "function",
5
- name,
6
- description,
7
- parameters: schema(models, rootKey),
8
- };
9
- }
10
- //# sourceMappingURL=F.js.map
package/esm/F.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"F.js","sourceRoot":"","sources":["../src/F.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAYpC,MAAM,UAAU,CAAC,CACf,IAAY,EACZ,WAAmB,EACnB,MAAS,EACT,OAAwB;IAExB,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,IAAI;QACJ,WAAW;QACX,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;KACpC,CAAA;AACH,CAAC"}
@@ -1,14 +0,0 @@
1
- import type { Ty } from "./_base.js";
2
- import type { ValidRootKey } from "./common.js";
3
- export type ResponseFormat = {
4
- type: "json_schema";
5
- /** The desired return type in JSON Schema. */
6
- json_schema: {
7
- name: string;
8
- description: string;
9
- schema: Record<string, unknown>;
10
- strict: true;
11
- };
12
- };
13
- export declare function ResponseFormat<M extends Record<string, Ty>>(name: string, description: string, models: M, rootKey: ValidRootKey<M>): ResponseFormat;
14
- //# sourceMappingURL=ResponseFormat.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResponseFormat.d.ts","sourceRoot":"","sources":["../src/ResponseFormat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG/C,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,aAAa,CAAA;IACnB,8CAA8C;IAC9C,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAA;QACZ,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QAC/B,MAAM,EAAE,IAAI,CAAA;KACb,CAAA;CACF,CAAA;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,EACzD,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,GACvB,cAAc,CAUhB"}
package/esm/_base.d.ts DELETED
@@ -1,13 +0,0 @@
1
- export interface Ty<N = any> {
2
- new (): N;
3
- schema(ctx: Context): Record<string, unknown>;
4
- }
5
- export declare function make<Ty_ extends Ty>(schema: (ctx: Context) => unknown): Ty_;
6
- export declare class Context {
7
- readonly root: Ty;
8
- readonly models?: Record<string, Ty> | undefined;
9
- defs: Map<Ty, string>;
10
- constructor(root: Ty, models?: Record<string, Ty> | undefined);
11
- ref(value: Ty): Record<string, unknown>;
12
- }
13
- //# sourceMappingURL=_base.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_base.d.ts","sourceRoot":"","sources":["../src/_base.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,EAAE,CAAC,CAAC,GAAG,GAAG;IACzB,QAAO,CAAC,CAAA;IACR,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC9C;AAED,wBAAgB,IAAI,CAAC,GAAG,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,GAG/D,GAAG,CACT;AAED,qBAAa,OAAO;IAGhB,QAAQ,CAAC,IAAI,EAAE,EAAE;IACjB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;IAHtC,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;gBAEV,IAAI,EAAE,EAAE,EACR,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,YAAA;IAKtC,GAAG,CAAC,KAAK,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAIxC"}
package/esm/_base.js DELETED
@@ -1,40 +0,0 @@
1
- export function make(schema) {
2
- var _a;
3
- return _a = class Ty {
4
- },
5
- Object.defineProperty(_a, "schema", {
6
- enumerable: true,
7
- configurable: true,
8
- writable: true,
9
- value: schema
10
- }),
11
- _a;
12
- }
13
- export class Context {
14
- constructor(root, models) {
15
- Object.defineProperty(this, "root", {
16
- enumerable: true,
17
- configurable: true,
18
- writable: true,
19
- value: root
20
- });
21
- Object.defineProperty(this, "models", {
22
- enumerable: true,
23
- configurable: true,
24
- writable: true,
25
- value: models
26
- });
27
- Object.defineProperty(this, "defs", {
28
- enumerable: true,
29
- configurable: true,
30
- writable: true,
31
- value: void 0
32
- });
33
- this.defs = new Map(models ? Object.entries(models).map(([k, v]) => [v, k]) : []);
34
- }
35
- ref(value) {
36
- const key = this.defs.get(value);
37
- return key ? { $ref: `#/$defs/${key}` } : value.schema(this);
38
- }
39
- }
40
- //# sourceMappingURL=_base.js.map
package/esm/_base.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"_base.js","sourceRoot":"","sources":["../src/_base.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,IAAI,CAAiB,MAAiC;;IACpE,OAAO,KAAA,MAAM,EAAE;SAEd;QADQ;;;;mBAAS,MAAM;UAAA;UAChB,CAAA;AACV,CAAC;AAED,MAAM,OAAO,OAAO;IAElB,YACW,IAAQ,EACR,MAA2B;QADpC;;;;mBAAS,IAAI;WAAI;QACjB;;;;mBAAS,MAAM;WAAqB;QAHtC;;;;;WAAqB;QAKnB,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IACnF,CAAC;IAED,GAAG,CAAC,KAAS;QACX,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAChC,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC9D,CAAC;CACF"}
package/esm/array.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { type Ty } from "./_base.js";
2
- export declare function array<E extends Ty>(description: string | undefined, element: E): ArrayTy<E>;
3
- export type ArrayTy<E extends Ty = any> = Ty<Array<InstanceType<E>>>;
4
- //# sourceMappingURL=array.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../src/array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,YAAY,CAAA;AAE1C,wBAAgB,KAAK,CAAC,CAAC,SAAS,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAM3F;AAED,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,EAAE,GAAG,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA"}
package/esm/array.js DELETED
@@ -1,9 +0,0 @@
1
- import { make } from "./_base.js";
2
- export function array(description, element) {
3
- return make((ctx) => ({
4
- type: "array",
5
- description,
6
- items: ctx.ref(element),
7
- }));
8
- }
9
- //# sourceMappingURL=array.js.map
package/esm/array.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"array.js","sourceRoot":"","sources":["../src/array.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,YAAY,CAAA;AAE1C,MAAM,UAAU,KAAK,CAAe,WAA+B,EAAE,OAAU;IAC7E,OAAO,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,OAAO;QACb,WAAW;QACX,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC;KACxB,CAAC,CAAC,CAAA;AACL,CAAC"}
package/esm/common.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import type { Ty } from "./_base.js";
2
- import type { ObjectTy } from "./object.js";
3
- export type ValidRootKey<M extends Record<string, Ty>> = keyof {
4
- [K in keyof M as (M[K] extends ObjectTy<any> ? K : never)]: never;
5
- };
6
- //# sourceMappingURL=common.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM;KAC5D,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK;CAClE,CAAA"}
package/esm/common.js DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=common.js.map
package/esm/common.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":""}
package/esm/literal.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { type Ty } from "./_base.js";
2
- export declare function literal<V extends number | string>(description: string | undefined, value: V): LiteralTy<V>;
3
- export type LiteralTy<V extends number | string = any> = Ty<V>;
4
- //# sourceMappingURL=literal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"literal.d.ts","sourceRoot":"","sources":["../src/literal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,YAAY,CAAA;AAE1C,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAK1G;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA"}
package/esm/literal.js DELETED
@@ -1,8 +0,0 @@
1
- import { make } from "./_base.js";
2
- export function literal(description, value) {
3
- return make(() => ({
4
- const: value,
5
- description,
6
- }));
7
- }
8
- //# sourceMappingURL=literal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"literal.js","sourceRoot":"","sources":["../src/literal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,YAAY,CAAA;AAE1C,MAAM,UAAU,OAAO,CAA4B,WAA+B,EAAE,KAAQ;IAC1F,OAAO,IAAI,CAAe,GAAG,EAAE,CAAC,CAAC;QAC/B,KAAK,EAAE,KAAK;QACZ,WAAW;KACZ,CAAC,CAAC,CAAA;AACL,CAAC"}
package/esm/mod.d.ts DELETED
@@ -1,16 +0,0 @@
1
- import type { ArrayTy } from "./array.js";
2
- import type { NumberTy } from "./number.js";
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";
12
- export * from "./ResponseFormat.js";
13
- export * from "./schema.js";
14
- export * from "./string.js";
15
- export * from "./union.js";
16
- //# sourceMappingURL=mod.d.ts.map
package/esm/mod.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAA;AAI7D,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,qBAAqB,CAAA;AACnC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA"}
package/esm/number.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { type Ty } from "./_base.js";
2
- export declare function number(description?: string): NumberTy;
3
- export type NumberTy = Ty<number>;
4
- //# sourceMappingURL=number.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../src/number.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,YAAY,CAAA;AAE1C,wBAAgB,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,CAKrD;AAED,MAAM,MAAM,QAAQ,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA"}
package/esm/number.js DELETED
@@ -1,8 +0,0 @@
1
- import { make } from "./_base.js";
2
- export function number(description) {
3
- return make(() => ({
4
- type: "number",
5
- description,
6
- }));
7
- }
8
- //# sourceMappingURL=number.js.map
package/esm/number.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"number.js","sourceRoot":"","sources":["../src/number.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,YAAY,CAAA;AAE1C,MAAM,UAAU,MAAM,CAAC,WAAoB;IACzC,OAAO,IAAI,CAAW,GAAG,EAAE,CAAC,CAAC;QAC3B,IAAI,EAAE,QAAQ;QACd,WAAW;KACZ,CAAC,CAAC,CAAA;AACL,CAAC"}
package/esm/object.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import { type Ty } from "./_base.js";
2
- export declare function object<F extends ObjectTyFields>(description: string | undefined, fields: F): ObjectTy<F>;
3
- export type ObjectTyFields = Record<string, Ty>;
4
- export type ObjectTy<F extends ObjectTyFields = any> = Ty<{
5
- [K in keyof F]: F[K] extends Ty ? InstanceType<F[K]> : F[K];
6
- }>;
7
- //# sourceMappingURL=object.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../src/object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,YAAY,CAAA;AAE1C,wBAAgB,MAAM,CAAC,CAAC,SAAS,cAAc,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAQxG;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AAE/C,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,cAAc,GAAG,GAAG,IAAI,EAAE,CACvD;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAChE,CAAA"}
package/esm/object.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"object.js","sourceRoot":"","sources":["../src/object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,YAAY,CAAA;AAE1C,MAAM,UAAU,MAAM,CAA2B,WAA+B,EAAE,MAAS;IACzF,OAAO,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACpB,IAAI,EAAE,QAAQ;QACd,WAAW;QACX,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvF,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;KAC9B,CAAC,CAAC,CAAA;AACL,CAAC"}
package/esm/schema.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { type Ty } from "./_base.js";
2
- import type { ValidRootKey } from "./common.js";
3
- export declare function schema<M extends Record<string, Ty>>(models: M, rootKey: ValidRootKey<M>): Record<string, unknown>;
4
- //# sourceMappingURL=schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAMjH"}
package/esm/schema.js DELETED
@@ -1,9 +0,0 @@
1
- import { Context } from "./_base.js";
2
- export function schema(models, rootKey) {
3
- const root = models[rootKey];
4
- const ctx = new Context(root, models);
5
- return Object.assign(root.schema(ctx), {
6
- $defs: Object.fromEntries(Object.entries(models).map(([k, v]) => [k, v.schema(ctx)])),
7
- });
8
- }
9
- //# sourceMappingURL=schema.js.map
package/esm/schema.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAW,MAAM,YAAY,CAAA;AAG7C,MAAM,UAAU,MAAM,CAA+B,MAAS,EAAE,OAAwB;IACtF,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAE,CAAA;IAC7B,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IACrC,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;QACrC,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;KACtF,CAAC,CAAA;AACJ,CAAC"}
package/esm/string.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { type Ty } from "./_base.js";
2
- export declare function string(description?: string): StringTy;
3
- export type StringTy = Ty<string>;
4
- //# sourceMappingURL=string.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,YAAY,CAAA;AAE1C,wBAAgB,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,CAKrD;AAED,MAAM,MAAM,QAAQ,GAAG,EAAE,CAAC,MAAM,CAAC,CAAA"}
package/esm/string.js DELETED
@@ -1,8 +0,0 @@
1
- import { make } from "./_base.js";
2
- export function string(description) {
3
- return make(() => ({
4
- type: "string",
5
- description,
6
- }));
7
- }
8
- //# sourceMappingURL=string.js.map
package/esm/string.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"string.js","sourceRoot":"","sources":["../src/string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,YAAY,CAAA;AAE1C,MAAM,UAAU,MAAM,CAAC,WAAoB;IACzC,OAAO,IAAI,CAAW,GAAG,EAAE,CAAC,CAAC;QAC3B,IAAI,EAAE,QAAQ;QACd,WAAW;KACZ,CAAC,CAAC,CAAA;AACL,CAAC"}
package/esm/union.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import { type Ty } from "./_base.js";
2
- export declare function union<M extends Ty[]>(description: string | undefined, members: [...M]): UnionTy<M>;
3
- export type UnionTy<M extends Ty[]> = Ty<{
4
- [K in keyof M]: M[K] extends Ty ? InstanceType<M[K]> : M[K];
5
- }[number]>;
6
- //# sourceMappingURL=union.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"union.d.ts","sourceRoot":"","sources":["../src/union.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,EAAE,EAAE,MAAM,YAAY,CAAA;AAE1C,wBAAgB,KAAK,CAAC,CAAC,SAAS,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAKlG;AAED,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,CACtC;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,MAAM,CAAC,CACxE,CAAA"}
package/esm/union.js DELETED
@@ -1,8 +0,0 @@
1
- import { make } from "./_base.js";
2
- export function union(description, members) {
3
- return make((ctx) => ({
4
- description,
5
- oneOf: members.map((member) => ctx.ref(member)),
6
- }));
7
- }
8
- //# sourceMappingURL=union.js.map
package/esm/union.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"union.js","sourceRoot":"","sources":["../src/union.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAW,MAAM,YAAY,CAAA;AAE1C,MAAM,UAAU,KAAK,CAAiB,WAA+B,EAAE,OAAe;IACpF,OAAO,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACpB,WAAW;QACX,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;KAChD,CAAC,CAAC,CAAA;AACL,CAAC"}
package/src/F.ts DELETED
@@ -1,27 +0,0 @@
1
- import type { Ty } from "./_base.js"
2
- import type { ValidRootKey } from "./common.js"
3
- import { schema } from "./schema.js"
4
-
5
- export type F = {
6
- type: "function"
7
- /** The name of the function. */
8
- name: string
9
- /** The description of the function. */
10
- description: string
11
- /** Parameters of the function in JSON Schema. */
12
- parameters: unknown
13
- }
14
-
15
- export function F<M extends Record<string, Ty>>(
16
- name: string,
17
- description: string,
18
- models: M,
19
- rootKey: ValidRootKey<M>,
20
- ): F {
21
- return {
22
- type: "function",
23
- name,
24
- description,
25
- parameters: schema(models, rootKey),
26
- }
27
- }
package/src/_base.ts DELETED
@@ -1,25 +0,0 @@
1
- export interface Ty<N = any> {
2
- new(): N
3
- schema(ctx: Context): Record<string, unknown>
4
- }
5
-
6
- export function make<Ty_ extends Ty>(schema: (ctx: Context) => unknown) {
7
- return class Ty {
8
- static schema = schema
9
- } as Ty_
10
- }
11
-
12
- export class Context {
13
- defs: Map<Ty, string>
14
- constructor(
15
- readonly root: Ty,
16
- readonly models?: Record<string, Ty>,
17
- ) {
18
- this.defs = new Map(models ? Object.entries(models).map(([k, v]) => [v, k]) : [])
19
- }
20
-
21
- ref(value: Ty): Record<string, unknown> {
22
- const key = this.defs.get(value)
23
- return key ? { $ref: `#/$defs/${key}` } : value.schema(this)
24
- }
25
- }
package/src/array.ts DELETED
@@ -1,11 +0,0 @@
1
- import { make, type Ty } from "./_base.js"
2
-
3
- export function array<E extends Ty>(description: string | undefined, element: E): ArrayTy<E> {
4
- return make((ctx) => ({
5
- type: "array",
6
- description,
7
- items: ctx.ref(element),
8
- }))
9
- }
10
-
11
- export type ArrayTy<E extends Ty = any> = Ty<Array<InstanceType<E>>>
package/src/common.ts DELETED
@@ -1,6 +0,0 @@
1
- import type { Ty } from "./_base.js"
2
- import type { ObjectTy } from "./object.js"
3
-
4
- export type ValidRootKey<M extends Record<string, Ty>> = keyof {
5
- [K in keyof M as (M[K] extends ObjectTy<any> ? K : never)]: never
6
- }
package/src/literal.ts DELETED
@@ -1,10 +0,0 @@
1
- import { make, type Ty } from "./_base.js"
2
-
3
- export function literal<V extends number | string>(description: string | undefined, value: V): LiteralTy<V> {
4
- return make<LiteralTy<V>>(() => ({
5
- const: value,
6
- description,
7
- }))
8
- }
9
-
10
- export type LiteralTy<V extends number | string = any> = Ty<V>
package/src/number.ts DELETED
@@ -1,10 +0,0 @@
1
- import { make, type Ty } from "./_base.js"
2
-
3
- export function number(description?: string): NumberTy {
4
- return make<NumberTy>(() => ({
5
- type: "number",
6
- description,
7
- }))
8
- }
9
-
10
- export type NumberTy = Ty<number>
package/src/object.ts DELETED
@@ -1,17 +0,0 @@
1
- import { make, type Ty } from "./_base.js"
2
-
3
- export function object<F extends ObjectTyFields>(description: string | undefined, fields: F): ObjectTy<F> {
4
- return make((ctx) => ({
5
- type: "object",
6
- description,
7
- properties: Object.fromEntries(Object.entries(fields).map(([k, v]) => [k, ctx.ref(v)])),
8
- additionalProperties: false,
9
- required: Object.keys(fields),
10
- }))
11
- }
12
-
13
- export type ObjectTyFields = Record<string, Ty>
14
-
15
- export type ObjectTy<F extends ObjectTyFields = any> = Ty<
16
- { [K in keyof F]: F[K] extends Ty ? InstanceType<F[K]> : F[K] }
17
- >