@depup/sinclair__typebox 0.34.48-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1072) hide show
  1. package/README.md +25 -0
  2. package/build/cjs/compiler/compiler.d.ts +55 -0
  3. package/build/cjs/compiler/compiler.js +670 -0
  4. package/build/cjs/compiler/index.d.ts +2 -0
  5. package/build/cjs/compiler/index.js +22 -0
  6. package/build/cjs/errors/errors.d.ts +91 -0
  7. package/build/cjs/errors/errors.js +599 -0
  8. package/build/cjs/errors/function.d.ts +21 -0
  9. package/build/cjs/errors/function.js +153 -0
  10. package/build/cjs/errors/index.d.ts +2 -0
  11. package/build/cjs/errors/index.js +19 -0
  12. package/build/cjs/index.d.ts +71 -0
  13. package/build/cjs/index.js +97 -0
  14. package/build/cjs/parser/index.d.ts +2 -0
  15. package/build/cjs/parser/index.js +39 -0
  16. package/build/cjs/parser/runtime/guard.d.ts +23 -0
  17. package/build/cjs/parser/runtime/guard.js +86 -0
  18. package/build/cjs/parser/runtime/index.d.ts +5 -0
  19. package/build/cjs/parser/runtime/index.js +45 -0
  20. package/build/cjs/parser/runtime/module.d.ts +9 -0
  21. package/build/cjs/parser/runtime/module.js +22 -0
  22. package/build/cjs/parser/runtime/parse.d.ts +9 -0
  23. package/build/cjs/parser/runtime/parse.js +160 -0
  24. package/build/cjs/parser/runtime/token.d.ts +8 -0
  25. package/build/cjs/parser/runtime/token.js +230 -0
  26. package/build/cjs/parser/runtime/types.d.ts +98 -0
  27. package/build/cjs/parser/runtime/types.js +71 -0
  28. package/build/cjs/parser/static/index.d.ts +3 -0
  29. package/build/cjs/parser/static/index.js +43 -0
  30. package/build/cjs/parser/static/parse.d.ts +20 -0
  31. package/build/cjs/parser/static/parse.js +3 -0
  32. package/build/cjs/parser/static/token.d.ts +108 -0
  33. package/build/cjs/parser/static/token.js +3 -0
  34. package/build/cjs/parser/static/types.d.ts +69 -0
  35. package/build/cjs/parser/static/types.js +3 -0
  36. package/build/cjs/syntax/index.d.ts +1 -0
  37. package/build/cjs/syntax/index.js +18 -0
  38. package/build/cjs/syntax/mapping.d.ts +167 -0
  39. package/build/cjs/syntax/mapping.js +491 -0
  40. package/build/cjs/syntax/parser.d.ts +162 -0
  41. package/build/cjs/syntax/parser.js +191 -0
  42. package/build/cjs/syntax/syntax.d.ts +12 -0
  43. package/build/cjs/syntax/syntax.js +54 -0
  44. package/build/cjs/system/index.d.ts +2 -0
  45. package/build/cjs/system/index.js +19 -0
  46. package/build/cjs/system/policy.d.ts +29 -0
  47. package/build/cjs/system/policy.js +58 -0
  48. package/build/cjs/system/system.d.ts +16 -0
  49. package/build/cjs/system/system.js +43 -0
  50. package/build/cjs/type/any/any.d.ts +8 -0
  51. package/build/cjs/type/any/any.js +10 -0
  52. package/build/cjs/type/any/index.d.ts +1 -0
  53. package/build/cjs/type/any/index.js +18 -0
  54. package/build/cjs/type/argument/argument.d.ts +9 -0
  55. package/build/cjs/type/argument/argument.js +10 -0
  56. package/build/cjs/type/argument/index.d.ts +1 -0
  57. package/build/cjs/type/argument/index.js +18 -0
  58. package/build/cjs/type/array/array.d.ts +28 -0
  59. package/build/cjs/type/array/array.js +10 -0
  60. package/build/cjs/type/array/index.d.ts +1 -0
  61. package/build/cjs/type/array/index.js +18 -0
  62. package/build/cjs/type/async-iterator/async-iterator.d.ts +11 -0
  63. package/build/cjs/type/async-iterator/async-iterator.js +10 -0
  64. package/build/cjs/type/async-iterator/index.d.ts +1 -0
  65. package/build/cjs/type/async-iterator/index.js +18 -0
  66. package/build/cjs/type/awaited/awaited.d.ts +14 -0
  67. package/build/cjs/type/awaited/awaited.js +41 -0
  68. package/build/cjs/type/awaited/index.d.ts +1 -0
  69. package/build/cjs/type/awaited/index.js +18 -0
  70. package/build/cjs/type/bigint/bigint.d.ts +16 -0
  71. package/build/cjs/type/bigint/bigint.js +10 -0
  72. package/build/cjs/type/bigint/index.d.ts +1 -0
  73. package/build/cjs/type/bigint/index.js +18 -0
  74. package/build/cjs/type/boolean/boolean.d.ts +9 -0
  75. package/build/cjs/type/boolean/boolean.js +10 -0
  76. package/build/cjs/type/boolean/index.d.ts +1 -0
  77. package/build/cjs/type/boolean/index.js +18 -0
  78. package/build/cjs/type/clone/index.d.ts +2 -0
  79. package/build/cjs/type/clone/index.js +19 -0
  80. package/build/cjs/type/clone/type.d.ts +5 -0
  81. package/build/cjs/type/clone/type.js +14 -0
  82. package/build/cjs/type/clone/value.d.ts +2 -0
  83. package/build/cjs/type/clone/value.js +73 -0
  84. package/build/cjs/type/composite/composite.d.ts +18 -0
  85. package/build/cjs/type/composite/composite.js +46 -0
  86. package/build/cjs/type/composite/index.d.ts +1 -0
  87. package/build/cjs/type/composite/index.js +18 -0
  88. package/build/cjs/type/computed/computed.d.ts +9 -0
  89. package/build/cjs/type/computed/computed.js +10 -0
  90. package/build/cjs/type/computed/index.d.ts +1 -0
  91. package/build/cjs/type/computed/index.js +18 -0
  92. package/build/cjs/type/const/const.d.ts +27 -0
  93. package/build/cjs/type/const/const.js +58 -0
  94. package/build/cjs/type/const/index.d.ts +1 -0
  95. package/build/cjs/type/const/index.js +18 -0
  96. package/build/cjs/type/constructor/constructor.d.ts +23 -0
  97. package/build/cjs/type/constructor/constructor.js +10 -0
  98. package/build/cjs/type/constructor/index.d.ts +1 -0
  99. package/build/cjs/type/constructor/index.js +18 -0
  100. package/build/cjs/type/constructor-parameters/constructor-parameters.d.ts +7 -0
  101. package/build/cjs/type/constructor-parameters/constructor-parameters.js +44 -0
  102. package/build/cjs/type/constructor-parameters/index.d.ts +1 -0
  103. package/build/cjs/type/constructor-parameters/index.js +18 -0
  104. package/build/cjs/type/create/immutable.d.ts +2 -0
  105. package/build/cjs/type/create/immutable.js +70 -0
  106. package/build/cjs/type/create/index.d.ts +1 -0
  107. package/build/cjs/type/create/index.js +18 -0
  108. package/build/cjs/type/create/type.d.ts +3 -0
  109. package/build/cjs/type/create/type.js +19 -0
  110. package/build/cjs/type/date/date.d.ts +21 -0
  111. package/build/cjs/type/date/date.js +10 -0
  112. package/build/cjs/type/date/index.d.ts +1 -0
  113. package/build/cjs/type/date/index.js +18 -0
  114. package/build/cjs/type/discard/discard.d.ts +2 -0
  115. package/build/cjs/type/discard/discard.js +12 -0
  116. package/build/cjs/type/discard/index.d.ts +1 -0
  117. package/build/cjs/type/discard/index.js +18 -0
  118. package/build/cjs/type/enum/enum.d.ts +14 -0
  119. package/build/cjs/type/enum/enum.js +22 -0
  120. package/build/cjs/type/enum/index.d.ts +1 -0
  121. package/build/cjs/type/enum/index.js +18 -0
  122. package/build/cjs/type/error/error.d.ts +4 -0
  123. package/build/cjs/type/error/error.js +11 -0
  124. package/build/cjs/type/error/index.d.ts +1 -0
  125. package/build/cjs/type/error/index.js +18 -0
  126. package/build/cjs/type/exclude/exclude-from-mapped-result.d.ts +11 -0
  127. package/build/cjs/type/exclude/exclude-from-mapped-result.js +22 -0
  128. package/build/cjs/type/exclude/exclude-from-template-literal.d.ts +5 -0
  129. package/build/cjs/type/exclude/exclude-from-template-literal.js +9 -0
  130. package/build/cjs/type/exclude/exclude.d.ts +21 -0
  131. package/build/cjs/type/exclude/exclude.js +29 -0
  132. package/build/cjs/type/exclude/index.d.ts +3 -0
  133. package/build/cjs/type/exclude/index.js +20 -0
  134. package/build/cjs/type/extends/extends-check.d.ts +10 -0
  135. package/build/cjs/type/extends/extends-check.js +641 -0
  136. package/build/cjs/type/extends/extends-from-mapped-key.d.ts +14 -0
  137. package/build/cjs/type/extends/extends-from-mapped-key.js +29 -0
  138. package/build/cjs/type/extends/extends-from-mapped-result.d.ts +11 -0
  139. package/build/cjs/type/extends/extends-from-mapped-result.js +23 -0
  140. package/build/cjs/type/extends/extends-undefined.d.ts +3 -0
  141. package/build/cjs/type/extends/extends-undefined.js +24 -0
  142. package/build/cjs/type/extends/extends.d.ts +16 -0
  143. package/build/cjs/type/extends/extends.js +27 -0
  144. package/build/cjs/type/extends/index.d.ts +5 -0
  145. package/build/cjs/type/extends/index.js +22 -0
  146. package/build/cjs/type/extract/extract-from-mapped-result.d.ts +11 -0
  147. package/build/cjs/type/extract/extract-from-mapped-result.js +22 -0
  148. package/build/cjs/type/extract/extract-from-template-literal.d.ts +5 -0
  149. package/build/cjs/type/extract/extract-from-template-literal.js +9 -0
  150. package/build/cjs/type/extract/extract.d.ts +21 -0
  151. package/build/cjs/type/extract/extract.js +29 -0
  152. package/build/cjs/type/extract/index.d.ts +3 -0
  153. package/build/cjs/type/extract/index.js +20 -0
  154. package/build/cjs/type/function/function.d.ts +23 -0
  155. package/build/cjs/type/function/function.js +10 -0
  156. package/build/cjs/type/function/index.d.ts +1 -0
  157. package/build/cjs/type/function/index.js +18 -0
  158. package/build/cjs/type/guard/index.d.ts +3 -0
  159. package/build/cjs/type/guard/index.js +40 -0
  160. package/build/cjs/type/guard/kind.d.ts +147 -0
  161. package/build/cjs/type/guard/kind.js +320 -0
  162. package/build/cjs/type/guard/type.d.ts +152 -0
  163. package/build/cjs/type/guard/type.js +597 -0
  164. package/build/cjs/type/guard/value.d.ts +34 -0
  165. package/build/cjs/type/guard/value.js +89 -0
  166. package/build/cjs/type/helpers/helpers.d.ts +42 -0
  167. package/build/cjs/type/helpers/helpers.js +8 -0
  168. package/build/cjs/type/helpers/index.d.ts +1 -0
  169. package/build/cjs/type/helpers/index.js +18 -0
  170. package/build/cjs/type/index.d.ts +71 -0
  171. package/build/cjs/type/index.js +88 -0
  172. package/build/cjs/type/indexed/index.d.ts +4 -0
  173. package/build/cjs/type/indexed/index.js +21 -0
  174. package/build/cjs/type/indexed/indexed-from-mapped-key.d.ts +13 -0
  175. package/build/cjs/type/indexed/indexed-from-mapped-key.js +26 -0
  176. package/build/cjs/type/indexed/indexed-from-mapped-result.d.ts +12 -0
  177. package/build/cjs/type/indexed/indexed-from-mapped-result.js +24 -0
  178. package/build/cjs/type/indexed/indexed-property-keys.d.ts +14 -0
  179. package/build/cjs/type/indexed/indexed-property-keys.js +36 -0
  180. package/build/cjs/type/indexed/indexed.d.ts +52 -0
  181. package/build/cjs/type/indexed/indexed.js +98 -0
  182. package/build/cjs/type/instance-type/index.d.ts +1 -0
  183. package/build/cjs/type/instance-type/index.js +18 -0
  184. package/build/cjs/type/instance-type/instance-type.d.ts +6 -0
  185. package/build/cjs/type/instance-type/instance-type.js +44 -0
  186. package/build/cjs/type/instantiate/index.d.ts +1 -0
  187. package/build/cjs/type/instantiate/index.js +18 -0
  188. package/build/cjs/type/instantiate/instantiate.d.ts +50 -0
  189. package/build/cjs/type/instantiate/instantiate.js +153 -0
  190. package/build/cjs/type/integer/index.d.ts +1 -0
  191. package/build/cjs/type/integer/index.js +18 -0
  192. package/build/cjs/type/integer/integer.d.ts +16 -0
  193. package/build/cjs/type/integer/integer.js +10 -0
  194. package/build/cjs/type/intersect/index.d.ts +3 -0
  195. package/build/cjs/type/intersect/index.js +20 -0
  196. package/build/cjs/type/intersect/intersect-create.d.ts +3 -0
  197. package/build/cjs/type/intersect/intersect-create.js +23 -0
  198. package/build/cjs/type/intersect/intersect-evaluated.d.ts +13 -0
  199. package/build/cjs/type/intersect/intersect-evaluated.js +42 -0
  200. package/build/cjs/type/intersect/intersect-type.d.ts +15 -0
  201. package/build/cjs/type/intersect/intersect-type.js +4 -0
  202. package/build/cjs/type/intersect/intersect.d.ts +6 -0
  203. package/build/cjs/type/intersect/intersect.js +21 -0
  204. package/build/cjs/type/intrinsic/capitalize.d.ts +5 -0
  205. package/build/cjs/type/intrinsic/capitalize.js +9 -0
  206. package/build/cjs/type/intrinsic/index.d.ts +6 -0
  207. package/build/cjs/type/intrinsic/index.js +23 -0
  208. package/build/cjs/type/intrinsic/intrinsic-from-mapped-key.d.ts +14 -0
  209. package/build/cjs/type/intrinsic/intrinsic-from-mapped-key.js +30 -0
  210. package/build/cjs/type/intrinsic/intrinsic.d.ts +16 -0
  211. package/build/cjs/type/intrinsic/intrinsic.js +68 -0
  212. package/build/cjs/type/intrinsic/lowercase.d.ts +5 -0
  213. package/build/cjs/type/intrinsic/lowercase.js +9 -0
  214. package/build/cjs/type/intrinsic/uncapitalize.d.ts +5 -0
  215. package/build/cjs/type/intrinsic/uncapitalize.js +9 -0
  216. package/build/cjs/type/intrinsic/uppercase.d.ts +5 -0
  217. package/build/cjs/type/intrinsic/uppercase.js +9 -0
  218. package/build/cjs/type/iterator/index.d.ts +1 -0
  219. package/build/cjs/type/iterator/index.js +18 -0
  220. package/build/cjs/type/iterator/iterator.d.ts +11 -0
  221. package/build/cjs/type/iterator/iterator.js +10 -0
  222. package/build/cjs/type/keyof/index.d.ts +4 -0
  223. package/build/cjs/type/keyof/index.js +21 -0
  224. package/build/cjs/type/keyof/keyof-from-mapped-result.d.ts +12 -0
  225. package/build/cjs/type/keyof/keyof-from-mapped-result.js +23 -0
  226. package/build/cjs/type/keyof/keyof-property-entries.d.ts +7 -0
  227. package/build/cjs/type/keyof/keyof-property-entries.js +16 -0
  228. package/build/cjs/type/keyof/keyof-property-keys.d.ts +24 -0
  229. package/build/cjs/type/keyof/keyof-property-keys.js +78 -0
  230. package/build/cjs/type/keyof/keyof.d.ts +21 -0
  231. package/build/cjs/type/keyof/keyof.js +40 -0
  232. package/build/cjs/type/literal/index.d.ts +1 -0
  233. package/build/cjs/type/literal/index.js +18 -0
  234. package/build/cjs/type/literal/literal.d.ts +10 -0
  235. package/build/cjs/type/literal/literal.js +14 -0
  236. package/build/cjs/type/mapped/index.d.ts +3 -0
  237. package/build/cjs/type/mapped/index.js +20 -0
  238. package/build/cjs/type/mapped/mapped-key.d.ts +8 -0
  239. package/build/cjs/type/mapped/mapped-key.js +13 -0
  240. package/build/cjs/type/mapped/mapped-result.d.ts +9 -0
  241. package/build/cjs/type/mapped/mapped-result.js +13 -0
  242. package/build/cjs/type/mapped/mapped.d.ts +47 -0
  243. package/build/cjs/type/mapped/mapped.js +107 -0
  244. package/build/cjs/type/module/compute.d.ts +59 -0
  245. package/build/cjs/type/module/compute.js +205 -0
  246. package/build/cjs/type/module/index.d.ts +1 -0
  247. package/build/cjs/type/module/index.js +18 -0
  248. package/build/cjs/type/module/infer.d.ts +49 -0
  249. package/build/cjs/type/module/infer.js +3 -0
  250. package/build/cjs/type/module/module.d.ts +27 -0
  251. package/build/cjs/type/module/module.js +38 -0
  252. package/build/cjs/type/never/index.d.ts +1 -0
  253. package/build/cjs/type/never/index.js +18 -0
  254. package/build/cjs/type/never/never.d.ts +9 -0
  255. package/build/cjs/type/never/never.js +10 -0
  256. package/build/cjs/type/not/index.d.ts +1 -0
  257. package/build/cjs/type/not/index.js +18 -0
  258. package/build/cjs/type/not/not.d.ts +10 -0
  259. package/build/cjs/type/not/not.js +10 -0
  260. package/build/cjs/type/null/index.d.ts +1 -0
  261. package/build/cjs/type/null/index.js +18 -0
  262. package/build/cjs/type/null/null.d.ts +9 -0
  263. package/build/cjs/type/null/null.js +10 -0
  264. package/build/cjs/type/number/index.d.ts +1 -0
  265. package/build/cjs/type/number/index.js +18 -0
  266. package/build/cjs/type/number/number.d.ts +16 -0
  267. package/build/cjs/type/number/number.js +10 -0
  268. package/build/cjs/type/object/index.d.ts +1 -0
  269. package/build/cjs/type/object/index.js +18 -0
  270. package/build/cjs/type/object/object.d.ts +51 -0
  271. package/build/cjs/type/object/object.js +22 -0
  272. package/build/cjs/type/omit/index.d.ts +3 -0
  273. package/build/cjs/type/omit/index.js +20 -0
  274. package/build/cjs/type/omit/omit-from-mapped-key.d.ts +12 -0
  275. package/build/cjs/type/omit/omit-from-mapped-key.js +26 -0
  276. package/build/cjs/type/omit/omit-from-mapped-result.d.ts +12 -0
  277. package/build/cjs/type/omit/omit-from-mapped-result.js +23 -0
  278. package/build/cjs/type/omit/omit.d.ts +36 -0
  279. package/build/cjs/type/omit/omit.js +75 -0
  280. package/build/cjs/type/optional/index.d.ts +2 -0
  281. package/build/cjs/type/optional/index.js +19 -0
  282. package/build/cjs/type/optional/optional-from-mapped-result.d.ts +10 -0
  283. package/build/cjs/type/optional/optional-from-mapped-result.js +22 -0
  284. package/build/cjs/type/optional/optional.d.ts +20 -0
  285. package/build/cjs/type/optional/optional.js +26 -0
  286. package/build/cjs/type/parameters/index.d.ts +1 -0
  287. package/build/cjs/type/parameters/index.js +18 -0
  288. package/build/cjs/type/parameters/parameters.d.ts +7 -0
  289. package/build/cjs/type/parameters/parameters.js +44 -0
  290. package/build/cjs/type/partial/index.d.ts +2 -0
  291. package/build/cjs/type/partial/index.js +19 -0
  292. package/build/cjs/type/partial/partial-from-mapped-result.d.ts +12 -0
  293. package/build/cjs/type/partial/partial-from-mapped-result.js +23 -0
  294. package/build/cjs/type/partial/partial.d.ts +35 -0
  295. package/build/cjs/type/partial/partial.js +111 -0
  296. package/build/cjs/type/patterns/index.d.ts +1 -0
  297. package/build/cjs/type/patterns/index.js +18 -0
  298. package/build/cjs/type/patterns/patterns.d.ts +8 -0
  299. package/build/cjs/type/patterns/patterns.js +12 -0
  300. package/build/cjs/type/pick/index.d.ts +3 -0
  301. package/build/cjs/type/pick/index.js +20 -0
  302. package/build/cjs/type/pick/pick-from-mapped-key.d.ts +12 -0
  303. package/build/cjs/type/pick/pick-from-mapped-key.js +28 -0
  304. package/build/cjs/type/pick/pick-from-mapped-result.d.ts +12 -0
  305. package/build/cjs/type/pick/pick-from-mapped-result.js +23 -0
  306. package/build/cjs/type/pick/pick.d.ts +36 -0
  307. package/build/cjs/type/pick/pick.js +70 -0
  308. package/build/cjs/type/promise/index.d.ts +1 -0
  309. package/build/cjs/type/promise/index.js +18 -0
  310. package/build/cjs/type/promise/promise.d.ts +11 -0
  311. package/build/cjs/type/promise/promise.js +10 -0
  312. package/build/cjs/type/readonly/index.d.ts +2 -0
  313. package/build/cjs/type/readonly/index.js +19 -0
  314. package/build/cjs/type/readonly/readonly-from-mapped-result.d.ts +10 -0
  315. package/build/cjs/type/readonly/readonly-from-mapped-result.js +22 -0
  316. package/build/cjs/type/readonly/readonly.d.ts +20 -0
  317. package/build/cjs/type/readonly/readonly.js +26 -0
  318. package/build/cjs/type/readonly-optional/index.d.ts +1 -0
  319. package/build/cjs/type/readonly-optional/index.js +18 -0
  320. package/build/cjs/type/readonly-optional/readonly-optional.d.ts +6 -0
  321. package/build/cjs/type/readonly-optional/readonly-optional.js +10 -0
  322. package/build/cjs/type/record/index.d.ts +1 -0
  323. package/build/cjs/type/record/index.js +18 -0
  324. package/build/cjs/type/record/record.d.ts +71 -0
  325. package/build/cjs/type/record/record.js +123 -0
  326. package/build/cjs/type/recursive/index.d.ts +1 -0
  327. package/build/cjs/type/recursive/index.js +18 -0
  328. package/build/cjs/type/recursive/recursive.d.ts +16 -0
  329. package/build/cjs/type/recursive/recursive.js +19 -0
  330. package/build/cjs/type/ref/index.d.ts +1 -0
  331. package/build/cjs/type/ref/index.js +18 -0
  332. package/build/cjs/type/ref/ref.d.ts +41 -0
  333. package/build/cjs/type/ref/ref.js +14 -0
  334. package/build/cjs/type/regexp/index.d.ts +1 -0
  335. package/build/cjs/type/regexp/index.js +18 -0
  336. package/build/cjs/type/regexp/regexp.d.ts +20 -0
  337. package/build/cjs/type/regexp/regexp.js +12 -0
  338. package/build/cjs/type/registry/format.d.ts +13 -0
  339. package/build/cjs/type/registry/format.js +35 -0
  340. package/build/cjs/type/registry/index.d.ts +2 -0
  341. package/build/cjs/type/registry/index.js +39 -0
  342. package/build/cjs/type/registry/type.d.ts +13 -0
  343. package/build/cjs/type/registry/type.js +35 -0
  344. package/build/cjs/type/required/index.d.ts +2 -0
  345. package/build/cjs/type/required/index.js +19 -0
  346. package/build/cjs/type/required/required-from-mapped-result.d.ts +12 -0
  347. package/build/cjs/type/required/required-from-mapped-result.js +22 -0
  348. package/build/cjs/type/required/required.d.ts +35 -0
  349. package/build/cjs/type/required/required.js +110 -0
  350. package/build/cjs/type/rest/index.d.ts +1 -0
  351. package/build/cjs/type/rest/index.js +18 -0
  352. package/build/cjs/type/rest/rest.d.ts +10 -0
  353. package/build/cjs/type/rest/rest.js +19 -0
  354. package/build/cjs/type/return-type/index.d.ts +1 -0
  355. package/build/cjs/type/return-type/index.js +18 -0
  356. package/build/cjs/type/return-type/return-type.d.ts +6 -0
  357. package/build/cjs/type/return-type/return-type.js +44 -0
  358. package/build/cjs/type/schema/anyschema.d.ts +33 -0
  359. package/build/cjs/type/schema/anyschema.js +3 -0
  360. package/build/cjs/type/schema/index.d.ts +2 -0
  361. package/build/cjs/type/schema/index.js +19 -0
  362. package/build/cjs/type/schema/schema.d.ts +29 -0
  363. package/build/cjs/type/schema/schema.js +4 -0
  364. package/build/cjs/type/sets/index.d.ts +1 -0
  365. package/build/cjs/type/sets/index.js +18 -0
  366. package/build/cjs/type/sets/set.d.ts +28 -0
  367. package/build/cjs/type/sets/set.js +59 -0
  368. package/build/cjs/type/static/index.d.ts +1 -0
  369. package/build/cjs/type/static/index.js +18 -0
  370. package/build/cjs/type/static/static.d.ts +39 -0
  371. package/build/cjs/type/static/static.js +3 -0
  372. package/build/cjs/type/string/index.d.ts +1 -0
  373. package/build/cjs/type/string/index.js +18 -0
  374. package/build/cjs/type/string/string.d.ts +25 -0
  375. package/build/cjs/type/string/string.js +10 -0
  376. package/build/cjs/type/symbol/index.d.ts +1 -0
  377. package/build/cjs/type/symbol/index.js +18 -0
  378. package/build/cjs/type/symbol/symbol.d.ts +10 -0
  379. package/build/cjs/type/symbol/symbol.js +10 -0
  380. package/build/cjs/type/symbols/index.d.ts +1 -0
  381. package/build/cjs/type/symbols/index.js +18 -0
  382. package/build/cjs/type/symbols/symbols.d.ts +10 -0
  383. package/build/cjs/type/symbols/symbols.js +14 -0
  384. package/build/cjs/type/template-literal/finite.d.ts +19 -0
  385. package/build/cjs/type/template-literal/finite.js +56 -0
  386. package/build/cjs/type/template-literal/generate.d.ts +21 -0
  387. package/build/cjs/type/template-literal/generate.js +60 -0
  388. package/build/cjs/type/template-literal/index.d.ts +7 -0
  389. package/build/cjs/type/template-literal/index.js +24 -0
  390. package/build/cjs/type/template-literal/parse.d.ts +20 -0
  391. package/build/cjs/type/template-literal/parse.js +174 -0
  392. package/build/cjs/type/template-literal/pattern.d.ts +5 -0
  393. package/build/cjs/type/template-literal/pattern.js +39 -0
  394. package/build/cjs/type/template-literal/syntax.d.ts +20 -0
  395. package/build/cjs/type/template-literal/syntax.js +59 -0
  396. package/build/cjs/type/template-literal/template-literal.d.ts +30 -0
  397. package/build/cjs/type/template-literal/template-literal.js +17 -0
  398. package/build/cjs/type/template-literal/union.d.ts +9 -0
  399. package/build/cjs/type/template-literal/union.js +13 -0
  400. package/build/cjs/type/transform/index.d.ts +1 -0
  401. package/build/cjs/type/transform/index.js +18 -0
  402. package/build/cjs/type/transform/transform.d.ts +30 -0
  403. package/build/cjs/type/transform/transform.js +47 -0
  404. package/build/cjs/type/tuple/index.d.ts +1 -0
  405. package/build/cjs/type/tuple/index.js +18 -0
  406. package/build/cjs/type/tuple/tuple.d.ts +16 -0
  407. package/build/cjs/type/tuple/tuple.js +13 -0
  408. package/build/cjs/type/type/index.d.ts +6 -0
  409. package/build/cjs/type/type/index.js +51 -0
  410. package/build/cjs/type/type/javascript.d.ts +64 -0
  411. package/build/cjs/type/type/javascript.js +104 -0
  412. package/build/cjs/type/type/json.d.ts +208 -0
  413. package/build/cjs/type/type/json.js +226 -0
  414. package/build/cjs/type/type/type.d.ts +59 -0
  415. package/build/cjs/type/type/type.js +129 -0
  416. package/build/cjs/type/uint8array/index.d.ts +1 -0
  417. package/build/cjs/type/uint8array/index.js +18 -0
  418. package/build/cjs/type/uint8array/uint8array.d.ts +13 -0
  419. package/build/cjs/type/uint8array/uint8array.js +10 -0
  420. package/build/cjs/type/undefined/index.d.ts +1 -0
  421. package/build/cjs/type/undefined/index.js +18 -0
  422. package/build/cjs/type/undefined/undefined.d.ts +9 -0
  423. package/build/cjs/type/undefined/undefined.js +10 -0
  424. package/build/cjs/type/union/index.d.ts +3 -0
  425. package/build/cjs/type/union/index.js +20 -0
  426. package/build/cjs/type/union/union-create.d.ts +3 -0
  427. package/build/cjs/type/union/union-create.js +9 -0
  428. package/build/cjs/type/union/union-evaluated.d.ts +13 -0
  429. package/build/cjs/type/union/union-evaluated.js +40 -0
  430. package/build/cjs/type/union/union-type.d.ts +12 -0
  431. package/build/cjs/type/union/union-type.js +4 -0
  432. package/build/cjs/type/union/union.d.ts +6 -0
  433. package/build/cjs/type/union/union.js +14 -0
  434. package/build/cjs/type/unknown/index.d.ts +1 -0
  435. package/build/cjs/type/unknown/index.js +18 -0
  436. package/build/cjs/type/unknown/unknown.d.ts +8 -0
  437. package/build/cjs/type/unknown/unknown.js +10 -0
  438. package/build/cjs/type/unsafe/index.d.ts +1 -0
  439. package/build/cjs/type/unsafe/index.js +18 -0
  440. package/build/cjs/type/unsafe/unsafe.d.ts +11 -0
  441. package/build/cjs/type/unsafe/unsafe.js +10 -0
  442. package/build/cjs/type/void/index.d.ts +1 -0
  443. package/build/cjs/type/void/index.js +18 -0
  444. package/build/cjs/type/void/void.d.ts +9 -0
  445. package/build/cjs/type/void/void.js +10 -0
  446. package/build/cjs/value/assert/assert.d.ts +15 -0
  447. package/build/cjs/value/assert/assert.js +55 -0
  448. package/build/cjs/value/assert/index.d.ts +1 -0
  449. package/build/cjs/value/assert/index.js +18 -0
  450. package/build/cjs/value/cast/cast.d.ts +11 -0
  451. package/build/cjs/value/cast/cast.js +241 -0
  452. package/build/cjs/value/cast/index.d.ts +1 -0
  453. package/build/cjs/value/cast/index.js +18 -0
  454. package/build/cjs/value/check/check.d.ts +11 -0
  455. package/build/cjs/value/check/check.js +476 -0
  456. package/build/cjs/value/check/index.d.ts +1 -0
  457. package/build/cjs/value/check/index.js +18 -0
  458. package/build/cjs/value/clean/clean.d.ts +5 -0
  459. package/build/cjs/value/clean/clean.js +149 -0
  460. package/build/cjs/value/clean/index.d.ts +1 -0
  461. package/build/cjs/value/clean/index.js +18 -0
  462. package/build/cjs/value/clone/clone.d.ts +2 -0
  463. package/build/cjs/value/clone/clone.js +60 -0
  464. package/build/cjs/value/clone/index.d.ts +1 -0
  465. package/build/cjs/value/clone/index.js +18 -0
  466. package/build/cjs/value/convert/convert.d.ts +5 -0
  467. package/build/cjs/value/convert/convert.js +264 -0
  468. package/build/cjs/value/convert/index.d.ts +1 -0
  469. package/build/cjs/value/convert/index.js +18 -0
  470. package/build/cjs/value/create/create.d.ts +11 -0
  471. package/build/cjs/value/create/create.js +474 -0
  472. package/build/cjs/value/create/index.d.ts +1 -0
  473. package/build/cjs/value/create/index.js +18 -0
  474. package/build/cjs/value/decode/decode.d.ts +6 -0
  475. package/build/cjs/value/decode/decode.js +14 -0
  476. package/build/cjs/value/decode/index.d.ts +1 -0
  477. package/build/cjs/value/decode/index.js +18 -0
  478. package/build/cjs/value/default/default.d.ts +5 -0
  479. package/build/cjs/value/default/default.js +176 -0
  480. package/build/cjs/value/default/index.d.ts +1 -0
  481. package/build/cjs/value/default/index.js +18 -0
  482. package/build/cjs/value/delta/delta.d.ts +32 -0
  483. package/build/cjs/value/delta/delta.js +178 -0
  484. package/build/cjs/value/delta/index.d.ts +1 -0
  485. package/build/cjs/value/delta/index.js +18 -0
  486. package/build/cjs/value/deref/deref.d.ts +12 -0
  487. package/build/cjs/value/deref/deref.js +36 -0
  488. package/build/cjs/value/deref/index.d.ts +1 -0
  489. package/build/cjs/value/deref/index.js +18 -0
  490. package/build/cjs/value/encode/encode.d.ts +6 -0
  491. package/build/cjs/value/encode/encode.js +15 -0
  492. package/build/cjs/value/encode/index.d.ts +1 -0
  493. package/build/cjs/value/encode/index.js +18 -0
  494. package/build/cjs/value/equal/equal.d.ts +2 -0
  495. package/build/cjs/value/equal/equal.js +50 -0
  496. package/build/cjs/value/equal/index.d.ts +1 -0
  497. package/build/cjs/value/equal/index.js +18 -0
  498. package/build/cjs/value/guard/guard.d.ts +74 -0
  499. package/build/cjs/value/guard/guard.js +195 -0
  500. package/build/cjs/value/guard/index.d.ts +1 -0
  501. package/build/cjs/value/guard/index.js +18 -0
  502. package/build/cjs/value/hash/hash.d.ts +7 -0
  503. package/build/cjs/value/hash/hash.js +152 -0
  504. package/build/cjs/value/hash/index.d.ts +1 -0
  505. package/build/cjs/value/hash/index.js +18 -0
  506. package/build/cjs/value/index.d.ts +20 -0
  507. package/build/cjs/value/index.js +53 -0
  508. package/build/cjs/value/mutate/index.d.ts +1 -0
  509. package/build/cjs/value/mutate/index.js +18 -0
  510. package/build/cjs/value/mutate/mutate.d.ts +9 -0
  511. package/build/cjs/value/mutate/mutate.js +104 -0
  512. package/build/cjs/value/parse/index.d.ts +1 -0
  513. package/build/cjs/value/parse/index.js +18 -0
  514. package/build/cjs/value/parse/parse.d.ts +22 -0
  515. package/build/cjs/value/parse/parse.js +87 -0
  516. package/build/cjs/value/pointer/index.d.ts +1 -0
  517. package/build/cjs/value/pointer/index.js +38 -0
  518. package/build/cjs/value/pointer/pointer.d.ts +22 -0
  519. package/build/cjs/value/pointer/pointer.js +126 -0
  520. package/build/cjs/value/transform/decode.d.ts +22 -0
  521. package/build/cjs/value/transform/decode.js +214 -0
  522. package/build/cjs/value/transform/encode.d.ts +23 -0
  523. package/build/cjs/value/transform/encode.js +225 -0
  524. package/build/cjs/value/transform/has.d.ts +3 -0
  525. package/build/cjs/value/transform/has.js +133 -0
  526. package/build/cjs/value/transform/index.d.ts +3 -0
  527. package/build/cjs/value/transform/index.js +20 -0
  528. package/build/cjs/value/value/index.d.ts +1 -0
  529. package/build/cjs/value/value/index.js +38 -0
  530. package/build/cjs/value/value/value.d.ts +16 -0
  531. package/build/cjs/value/value/value.js +39 -0
  532. package/build/esm/compiler/compiler.d.mts +55 -0
  533. package/build/esm/compiler/compiler.mjs +663 -0
  534. package/build/esm/compiler/index.d.mts +2 -0
  535. package/build/esm/compiler/index.mjs +2 -0
  536. package/build/esm/errors/errors.d.mts +91 -0
  537. package/build/esm/errors/errors.mjs +592 -0
  538. package/build/esm/errors/function.d.mts +21 -0
  539. package/build/esm/errors/function.mjs +147 -0
  540. package/build/esm/errors/index.d.mts +2 -0
  541. package/build/esm/errors/index.mjs +2 -0
  542. package/build/esm/index.d.mts +71 -0
  543. package/build/esm/index.mjs +80 -0
  544. package/build/esm/parser/index.d.mts +2 -0
  545. package/build/esm/parser/index.mjs +2 -0
  546. package/build/esm/parser/runtime/guard.d.mts +23 -0
  547. package/build/esm/parser/runtime/guard.mjs +72 -0
  548. package/build/esm/parser/runtime/index.d.mts +5 -0
  549. package/build/esm/parser/runtime/index.mjs +5 -0
  550. package/build/esm/parser/runtime/module.d.mts +9 -0
  551. package/build/esm/parser/runtime/module.mjs +17 -0
  552. package/build/esm/parser/runtime/parse.d.mts +9 -0
  553. package/build/esm/parser/runtime/parse.mjs +123 -0
  554. package/build/esm/parser/runtime/token.d.mts +8 -0
  555. package/build/esm/parser/runtime/token.mjs +223 -0
  556. package/build/esm/parser/runtime/types.d.mts +98 -0
  557. package/build/esm/parser/runtime/types.mjs +55 -0
  558. package/build/esm/parser/static/index.d.mts +3 -0
  559. package/build/esm/parser/static/index.mjs +3 -0
  560. package/build/esm/parser/static/parse.d.mts +20 -0
  561. package/build/esm/parser/static/parse.mjs +1 -0
  562. package/build/esm/parser/static/token.d.mts +108 -0
  563. package/build/esm/parser/static/token.mjs +1 -0
  564. package/build/esm/parser/static/types.d.mts +69 -0
  565. package/build/esm/parser/static/types.mjs +1 -0
  566. package/build/esm/syntax/index.d.mts +1 -0
  567. package/build/esm/syntax/index.mjs +1 -0
  568. package/build/esm/syntax/mapping.d.mts +167 -0
  569. package/build/esm/syntax/mapping.mjs +386 -0
  570. package/build/esm/syntax/parser.d.mts +162 -0
  571. package/build/esm/syntax/parser.mjs +78 -0
  572. package/build/esm/syntax/syntax.d.mts +12 -0
  573. package/build/esm/syntax/syntax.mjs +16 -0
  574. package/build/esm/system/index.d.mts +2 -0
  575. package/build/esm/system/index.mjs +2 -0
  576. package/build/esm/system/policy.d.mts +29 -0
  577. package/build/esm/system/policy.mjs +54 -0
  578. package/build/esm/system/system.d.mts +16 -0
  579. package/build/esm/system/system.mjs +37 -0
  580. package/build/esm/type/any/any.d.mts +8 -0
  581. package/build/esm/type/any/any.mjs +6 -0
  582. package/build/esm/type/any/index.d.mts +1 -0
  583. package/build/esm/type/any/index.mjs +1 -0
  584. package/build/esm/type/argument/argument.d.mts +9 -0
  585. package/build/esm/type/argument/argument.mjs +6 -0
  586. package/build/esm/type/argument/index.d.mts +1 -0
  587. package/build/esm/type/argument/index.mjs +1 -0
  588. package/build/esm/type/array/array.d.mts +28 -0
  589. package/build/esm/type/array/array.mjs +6 -0
  590. package/build/esm/type/array/index.d.mts +1 -0
  591. package/build/esm/type/array/index.mjs +1 -0
  592. package/build/esm/type/async-iterator/async-iterator.d.mts +11 -0
  593. package/build/esm/type/async-iterator/async-iterator.mjs +6 -0
  594. package/build/esm/type/async-iterator/index.d.mts +1 -0
  595. package/build/esm/type/async-iterator/index.mjs +1 -0
  596. package/build/esm/type/awaited/awaited.d.mts +14 -0
  597. package/build/esm/type/awaited/awaited.mjs +37 -0
  598. package/build/esm/type/awaited/index.d.mts +1 -0
  599. package/build/esm/type/awaited/index.mjs +1 -0
  600. package/build/esm/type/bigint/bigint.d.mts +16 -0
  601. package/build/esm/type/bigint/bigint.mjs +6 -0
  602. package/build/esm/type/bigint/index.d.mts +1 -0
  603. package/build/esm/type/bigint/index.mjs +1 -0
  604. package/build/esm/type/boolean/boolean.d.mts +9 -0
  605. package/build/esm/type/boolean/boolean.mjs +6 -0
  606. package/build/esm/type/boolean/index.d.mts +1 -0
  607. package/build/esm/type/boolean/index.mjs +1 -0
  608. package/build/esm/type/clone/index.d.mts +2 -0
  609. package/build/esm/type/clone/index.mjs +2 -0
  610. package/build/esm/type/clone/type.d.mts +5 -0
  611. package/build/esm/type/clone/type.mjs +9 -0
  612. package/build/esm/type/clone/value.d.mts +2 -0
  613. package/build/esm/type/clone/value.mjs +36 -0
  614. package/build/esm/type/composite/composite.d.mts +18 -0
  615. package/build/esm/type/composite/composite.mjs +42 -0
  616. package/build/esm/type/composite/index.d.mts +1 -0
  617. package/build/esm/type/composite/index.mjs +1 -0
  618. package/build/esm/type/computed/computed.d.mts +9 -0
  619. package/build/esm/type/computed/computed.mjs +6 -0
  620. package/build/esm/type/computed/index.d.mts +1 -0
  621. package/build/esm/type/computed/index.mjs +1 -0
  622. package/build/esm/type/const/const.d.mts +27 -0
  623. package/build/esm/type/const/const.mjs +54 -0
  624. package/build/esm/type/const/index.d.mts +1 -0
  625. package/build/esm/type/const/index.mjs +1 -0
  626. package/build/esm/type/constructor/constructor.d.mts +23 -0
  627. package/build/esm/type/constructor/constructor.mjs +6 -0
  628. package/build/esm/type/constructor/index.d.mts +1 -0
  629. package/build/esm/type/constructor/index.mjs +1 -0
  630. package/build/esm/type/constructor-parameters/constructor-parameters.d.mts +7 -0
  631. package/build/esm/type/constructor-parameters/constructor-parameters.mjs +7 -0
  632. package/build/esm/type/constructor-parameters/index.d.mts +1 -0
  633. package/build/esm/type/constructor-parameters/index.mjs +1 -0
  634. package/build/esm/type/create/immutable.d.mts +2 -0
  635. package/build/esm/type/create/immutable.mjs +33 -0
  636. package/build/esm/type/create/index.d.mts +1 -0
  637. package/build/esm/type/create/index.mjs +1 -0
  638. package/build/esm/type/create/type.d.mts +3 -0
  639. package/build/esm/type/create/type.mjs +15 -0
  640. package/build/esm/type/date/date.d.mts +21 -0
  641. package/build/esm/type/date/date.mjs +6 -0
  642. package/build/esm/type/date/index.d.mts +1 -0
  643. package/build/esm/type/date/index.mjs +1 -0
  644. package/build/esm/type/discard/discard.d.mts +2 -0
  645. package/build/esm/type/discard/discard.mjs +8 -0
  646. package/build/esm/type/discard/index.d.mts +1 -0
  647. package/build/esm/type/discard/index.mjs +1 -0
  648. package/build/esm/type/enum/enum.d.mts +14 -0
  649. package/build/esm/type/enum/enum.mjs +18 -0
  650. package/build/esm/type/enum/index.d.mts +1 -0
  651. package/build/esm/type/enum/index.mjs +1 -0
  652. package/build/esm/type/error/error.d.mts +4 -0
  653. package/build/esm/type/error/error.mjs +6 -0
  654. package/build/esm/type/error/index.d.mts +1 -0
  655. package/build/esm/type/error/index.mjs +1 -0
  656. package/build/esm/type/exclude/exclude-from-mapped-result.d.mts +11 -0
  657. package/build/esm/type/exclude/exclude-from-mapped-result.mjs +18 -0
  658. package/build/esm/type/exclude/exclude-from-template-literal.d.mts +5 -0
  659. package/build/esm/type/exclude/exclude-from-template-literal.mjs +5 -0
  660. package/build/esm/type/exclude/exclude.d.mts +21 -0
  661. package/build/esm/type/exclude/exclude.mjs +25 -0
  662. package/build/esm/type/exclude/index.d.mts +3 -0
  663. package/build/esm/type/exclude/index.mjs +3 -0
  664. package/build/esm/type/extends/extends-check.d.mts +10 -0
  665. package/build/esm/type/extends/extends-check.mjs +635 -0
  666. package/build/esm/type/extends/extends-from-mapped-key.d.mts +14 -0
  667. package/build/esm/type/extends/extends-from-mapped-key.mjs +25 -0
  668. package/build/esm/type/extends/extends-from-mapped-result.d.mts +11 -0
  669. package/build/esm/type/extends/extends-from-mapped-result.mjs +19 -0
  670. package/build/esm/type/extends/extends-undefined.d.mts +3 -0
  671. package/build/esm/type/extends/extends-undefined.mjs +20 -0
  672. package/build/esm/type/extends/extends.d.mts +16 -0
  673. package/build/esm/type/extends/extends.mjs +23 -0
  674. package/build/esm/type/extends/index.d.mts +5 -0
  675. package/build/esm/type/extends/index.mjs +5 -0
  676. package/build/esm/type/extract/extract-from-mapped-result.d.mts +11 -0
  677. package/build/esm/type/extract/extract-from-mapped-result.mjs +18 -0
  678. package/build/esm/type/extract/extract-from-template-literal.d.mts +5 -0
  679. package/build/esm/type/extract/extract-from-template-literal.mjs +5 -0
  680. package/build/esm/type/extract/extract.d.mts +21 -0
  681. package/build/esm/type/extract/extract.mjs +25 -0
  682. package/build/esm/type/extract/index.d.mts +3 -0
  683. package/build/esm/type/extract/index.mjs +3 -0
  684. package/build/esm/type/function/function.d.mts +23 -0
  685. package/build/esm/type/function/function.mjs +6 -0
  686. package/build/esm/type/function/index.d.mts +1 -0
  687. package/build/esm/type/function/index.mjs +1 -0
  688. package/build/esm/type/guard/index.d.mts +3 -0
  689. package/build/esm/type/guard/index.mjs +3 -0
  690. package/build/esm/type/guard/kind.d.mts +147 -0
  691. package/build/esm/type/guard/kind.mjs +235 -0
  692. package/build/esm/type/guard/type.d.mts +152 -0
  693. package/build/esm/type/guard/type.mjs +509 -0
  694. package/build/esm/type/guard/value.d.mts +34 -0
  695. package/build/esm/type/guard/value.mjs +70 -0
  696. package/build/esm/type/helpers/helpers.d.mts +42 -0
  697. package/build/esm/type/helpers/helpers.mjs +4 -0
  698. package/build/esm/type/helpers/index.d.mts +1 -0
  699. package/build/esm/type/helpers/index.mjs +1 -0
  700. package/build/esm/type/index.d.mts +71 -0
  701. package/build/esm/type/index.mjs +71 -0
  702. package/build/esm/type/indexed/index.d.mts +4 -0
  703. package/build/esm/type/indexed/index.mjs +4 -0
  704. package/build/esm/type/indexed/indexed-from-mapped-key.d.mts +13 -0
  705. package/build/esm/type/indexed/indexed-from-mapped-key.mjs +22 -0
  706. package/build/esm/type/indexed/indexed-from-mapped-result.d.mts +12 -0
  707. package/build/esm/type/indexed/indexed-from-mapped-result.mjs +20 -0
  708. package/build/esm/type/indexed/indexed-property-keys.d.mts +14 -0
  709. package/build/esm/type/indexed/indexed-property-keys.mjs +32 -0
  710. package/build/esm/type/indexed/indexed.d.mts +52 -0
  711. package/build/esm/type/indexed/indexed.mjs +91 -0
  712. package/build/esm/type/instance-type/index.d.mts +1 -0
  713. package/build/esm/type/instance-type/index.mjs +1 -0
  714. package/build/esm/type/instance-type/instance-type.d.mts +6 -0
  715. package/build/esm/type/instance-type/instance-type.mjs +7 -0
  716. package/build/esm/type/instantiate/index.d.mts +1 -0
  717. package/build/esm/type/instantiate/index.mjs +1 -0
  718. package/build/esm/type/instantiate/instantiate.d.mts +50 -0
  719. package/build/esm/type/instantiate/instantiate.mjs +115 -0
  720. package/build/esm/type/integer/index.d.mts +1 -0
  721. package/build/esm/type/integer/index.mjs +1 -0
  722. package/build/esm/type/integer/integer.d.mts +16 -0
  723. package/build/esm/type/integer/integer.mjs +6 -0
  724. package/build/esm/type/intersect/index.d.mts +3 -0
  725. package/build/esm/type/intersect/index.mjs +3 -0
  726. package/build/esm/type/intersect/intersect-create.d.mts +3 -0
  727. package/build/esm/type/intersect/intersect-create.mjs +19 -0
  728. package/build/esm/type/intersect/intersect-evaluated.d.mts +13 -0
  729. package/build/esm/type/intersect/intersect-evaluated.mjs +38 -0
  730. package/build/esm/type/intersect/intersect-type.d.mts +15 -0
  731. package/build/esm/type/intersect/intersect-type.mjs +1 -0
  732. package/build/esm/type/intersect/intersect.d.mts +6 -0
  733. package/build/esm/type/intersect/intersect.mjs +17 -0
  734. package/build/esm/type/intrinsic/capitalize.d.mts +5 -0
  735. package/build/esm/type/intrinsic/capitalize.mjs +5 -0
  736. package/build/esm/type/intrinsic/index.d.mts +6 -0
  737. package/build/esm/type/intrinsic/index.mjs +6 -0
  738. package/build/esm/type/intrinsic/intrinsic-from-mapped-key.d.mts +14 -0
  739. package/build/esm/type/intrinsic/intrinsic-from-mapped-key.mjs +26 -0
  740. package/build/esm/type/intrinsic/intrinsic.d.mts +16 -0
  741. package/build/esm/type/intrinsic/intrinsic.mjs +64 -0
  742. package/build/esm/type/intrinsic/lowercase.d.mts +5 -0
  743. package/build/esm/type/intrinsic/lowercase.mjs +5 -0
  744. package/build/esm/type/intrinsic/uncapitalize.d.mts +5 -0
  745. package/build/esm/type/intrinsic/uncapitalize.mjs +5 -0
  746. package/build/esm/type/intrinsic/uppercase.d.mts +5 -0
  747. package/build/esm/type/intrinsic/uppercase.mjs +5 -0
  748. package/build/esm/type/iterator/index.d.mts +1 -0
  749. package/build/esm/type/iterator/index.mjs +1 -0
  750. package/build/esm/type/iterator/iterator.d.mts +11 -0
  751. package/build/esm/type/iterator/iterator.mjs +6 -0
  752. package/build/esm/type/keyof/index.d.mts +4 -0
  753. package/build/esm/type/keyof/index.mjs +4 -0
  754. package/build/esm/type/keyof/keyof-from-mapped-result.d.mts +12 -0
  755. package/build/esm/type/keyof/keyof-from-mapped-result.mjs +19 -0
  756. package/build/esm/type/keyof/keyof-property-entries.d.mts +7 -0
  757. package/build/esm/type/keyof/keyof-property-entries.mjs +12 -0
  758. package/build/esm/type/keyof/keyof-property-keys.d.mts +24 -0
  759. package/build/esm/type/keyof/keyof-property-keys.mjs +73 -0
  760. package/build/esm/type/keyof/keyof.d.mts +21 -0
  761. package/build/esm/type/keyof/keyof.mjs +35 -0
  762. package/build/esm/type/literal/index.d.mts +1 -0
  763. package/build/esm/type/literal/index.mjs +1 -0
  764. package/build/esm/type/literal/literal.d.mts +10 -0
  765. package/build/esm/type/literal/literal.mjs +10 -0
  766. package/build/esm/type/mapped/index.d.mts +3 -0
  767. package/build/esm/type/mapped/index.mjs +3 -0
  768. package/build/esm/type/mapped/mapped-key.d.mts +8 -0
  769. package/build/esm/type/mapped/mapped-key.mjs +9 -0
  770. package/build/esm/type/mapped/mapped-result.d.mts +9 -0
  771. package/build/esm/type/mapped/mapped-result.mjs +9 -0
  772. package/build/esm/type/mapped/mapped.d.mts +47 -0
  773. package/build/esm/type/mapped/mapped.mjs +102 -0
  774. package/build/esm/type/module/compute.d.mts +59 -0
  775. package/build/esm/type/module/compute.mjs +166 -0
  776. package/build/esm/type/module/index.d.mts +1 -0
  777. package/build/esm/type/module/index.mjs +1 -0
  778. package/build/esm/type/module/infer.d.mts +49 -0
  779. package/build/esm/type/module/infer.mjs +1 -0
  780. package/build/esm/type/module/module.d.mts +27 -0
  781. package/build/esm/type/module/module.mjs +32 -0
  782. package/build/esm/type/never/index.d.mts +1 -0
  783. package/build/esm/type/never/index.mjs +1 -0
  784. package/build/esm/type/never/never.d.mts +9 -0
  785. package/build/esm/type/never/never.mjs +6 -0
  786. package/build/esm/type/not/index.d.mts +1 -0
  787. package/build/esm/type/not/index.mjs +1 -0
  788. package/build/esm/type/not/not.d.mts +10 -0
  789. package/build/esm/type/not/not.mjs +6 -0
  790. package/build/esm/type/null/index.d.mts +1 -0
  791. package/build/esm/type/null/index.mjs +1 -0
  792. package/build/esm/type/null/null.d.mts +9 -0
  793. package/build/esm/type/null/null.mjs +6 -0
  794. package/build/esm/type/number/index.d.mts +1 -0
  795. package/build/esm/type/number/index.mjs +1 -0
  796. package/build/esm/type/number/number.d.mts +16 -0
  797. package/build/esm/type/number/number.mjs +6 -0
  798. package/build/esm/type/object/index.d.mts +1 -0
  799. package/build/esm/type/object/index.mjs +1 -0
  800. package/build/esm/type/object/object.d.mts +51 -0
  801. package/build/esm/type/object/object.mjs +18 -0
  802. package/build/esm/type/omit/index.d.mts +3 -0
  803. package/build/esm/type/omit/index.mjs +3 -0
  804. package/build/esm/type/omit/omit-from-mapped-key.d.mts +12 -0
  805. package/build/esm/type/omit/omit-from-mapped-key.mjs +22 -0
  806. package/build/esm/type/omit/omit-from-mapped-result.d.mts +12 -0
  807. package/build/esm/type/omit/omit-from-mapped-result.mjs +19 -0
  808. package/build/esm/type/omit/omit.d.mts +36 -0
  809. package/build/esm/type/omit/omit.mjs +71 -0
  810. package/build/esm/type/optional/index.d.mts +2 -0
  811. package/build/esm/type/optional/index.mjs +2 -0
  812. package/build/esm/type/optional/optional-from-mapped-result.d.mts +10 -0
  813. package/build/esm/type/optional/optional-from-mapped-result.mjs +18 -0
  814. package/build/esm/type/optional/optional.d.mts +20 -0
  815. package/build/esm/type/optional/optional.mjs +22 -0
  816. package/build/esm/type/parameters/index.d.mts +1 -0
  817. package/build/esm/type/parameters/index.mjs +1 -0
  818. package/build/esm/type/parameters/parameters.d.mts +7 -0
  819. package/build/esm/type/parameters/parameters.mjs +7 -0
  820. package/build/esm/type/partial/index.d.mts +2 -0
  821. package/build/esm/type/partial/index.mjs +2 -0
  822. package/build/esm/type/partial/partial-from-mapped-result.d.mts +12 -0
  823. package/build/esm/type/partial/partial-from-mapped-result.mjs +19 -0
  824. package/build/esm/type/partial/partial.d.mts +35 -0
  825. package/build/esm/type/partial/partial.mjs +74 -0
  826. package/build/esm/type/patterns/index.d.mts +1 -0
  827. package/build/esm/type/patterns/index.mjs +1 -0
  828. package/build/esm/type/patterns/patterns.d.mts +8 -0
  829. package/build/esm/type/patterns/patterns.mjs +8 -0
  830. package/build/esm/type/pick/index.d.mts +3 -0
  831. package/build/esm/type/pick/index.mjs +3 -0
  832. package/build/esm/type/pick/pick-from-mapped-key.d.mts +12 -0
  833. package/build/esm/type/pick/pick-from-mapped-key.mjs +24 -0
  834. package/build/esm/type/pick/pick-from-mapped-result.d.mts +12 -0
  835. package/build/esm/type/pick/pick-from-mapped-result.mjs +19 -0
  836. package/build/esm/type/pick/pick.d.mts +36 -0
  837. package/build/esm/type/pick/pick.mjs +66 -0
  838. package/build/esm/type/promise/index.d.mts +1 -0
  839. package/build/esm/type/promise/index.mjs +1 -0
  840. package/build/esm/type/promise/promise.d.mts +11 -0
  841. package/build/esm/type/promise/promise.mjs +6 -0
  842. package/build/esm/type/readonly/index.d.mts +2 -0
  843. package/build/esm/type/readonly/index.mjs +2 -0
  844. package/build/esm/type/readonly/readonly-from-mapped-result.d.mts +10 -0
  845. package/build/esm/type/readonly/readonly-from-mapped-result.mjs +18 -0
  846. package/build/esm/type/readonly/readonly.d.mts +20 -0
  847. package/build/esm/type/readonly/readonly.mjs +22 -0
  848. package/build/esm/type/readonly-optional/index.d.mts +1 -0
  849. package/build/esm/type/readonly-optional/index.mjs +1 -0
  850. package/build/esm/type/readonly-optional/readonly-optional.d.mts +6 -0
  851. package/build/esm/type/readonly-optional/readonly-optional.mjs +6 -0
  852. package/build/esm/type/record/index.d.mts +1 -0
  853. package/build/esm/type/record/index.mjs +1 -0
  854. package/build/esm/type/record/record.d.mts +71 -0
  855. package/build/esm/type/record/record.mjs +116 -0
  856. package/build/esm/type/recursive/index.d.mts +1 -0
  857. package/build/esm/type/recursive/index.mjs +1 -0
  858. package/build/esm/type/recursive/recursive.d.mts +16 -0
  859. package/build/esm/type/recursive/recursive.mjs +15 -0
  860. package/build/esm/type/ref/index.d.mts +1 -0
  861. package/build/esm/type/ref/index.mjs +1 -0
  862. package/build/esm/type/ref/ref.d.mts +41 -0
  863. package/build/esm/type/ref/ref.mjs +10 -0
  864. package/build/esm/type/regexp/index.d.mts +1 -0
  865. package/build/esm/type/regexp/index.mjs +1 -0
  866. package/build/esm/type/regexp/regexp.d.mts +20 -0
  867. package/build/esm/type/regexp/regexp.mjs +8 -0
  868. package/build/esm/type/registry/format.d.mts +13 -0
  869. package/build/esm/type/registry/format.mjs +26 -0
  870. package/build/esm/type/registry/index.d.mts +2 -0
  871. package/build/esm/type/registry/index.mjs +2 -0
  872. package/build/esm/type/registry/type.d.mts +13 -0
  873. package/build/esm/type/registry/type.mjs +26 -0
  874. package/build/esm/type/required/index.d.mts +2 -0
  875. package/build/esm/type/required/index.mjs +2 -0
  876. package/build/esm/type/required/required-from-mapped-result.d.mts +12 -0
  877. package/build/esm/type/required/required-from-mapped-result.mjs +18 -0
  878. package/build/esm/type/required/required.d.mts +35 -0
  879. package/build/esm/type/required/required.mjs +73 -0
  880. package/build/esm/type/rest/index.d.mts +1 -0
  881. package/build/esm/type/rest/index.mjs +1 -0
  882. package/build/esm/type/rest/rest.d.mts +10 -0
  883. package/build/esm/type/rest/rest.mjs +15 -0
  884. package/build/esm/type/return-type/index.d.mts +1 -0
  885. package/build/esm/type/return-type/index.mjs +1 -0
  886. package/build/esm/type/return-type/return-type.d.mts +6 -0
  887. package/build/esm/type/return-type/return-type.mjs +7 -0
  888. package/build/esm/type/schema/anyschema.d.mts +33 -0
  889. package/build/esm/type/schema/anyschema.mjs +1 -0
  890. package/build/esm/type/schema/index.d.mts +2 -0
  891. package/build/esm/type/schema/index.mjs +2 -0
  892. package/build/esm/type/schema/schema.d.mts +29 -0
  893. package/build/esm/type/schema/schema.mjs +1 -0
  894. package/build/esm/type/sets/index.d.mts +1 -0
  895. package/build/esm/type/sets/index.mjs +1 -0
  896. package/build/esm/type/sets/set.d.mts +28 -0
  897. package/build/esm/type/sets/set.mjs +48 -0
  898. package/build/esm/type/static/index.d.mts +1 -0
  899. package/build/esm/type/static/index.mjs +1 -0
  900. package/build/esm/type/static/static.d.mts +39 -0
  901. package/build/esm/type/static/static.mjs +1 -0
  902. package/build/esm/type/string/index.d.mts +1 -0
  903. package/build/esm/type/string/index.mjs +1 -0
  904. package/build/esm/type/string/string.d.mts +25 -0
  905. package/build/esm/type/string/string.mjs +6 -0
  906. package/build/esm/type/symbol/index.d.mts +1 -0
  907. package/build/esm/type/symbol/index.mjs +1 -0
  908. package/build/esm/type/symbol/symbol.d.mts +10 -0
  909. package/build/esm/type/symbol/symbol.mjs +6 -0
  910. package/build/esm/type/symbols/index.d.mts +1 -0
  911. package/build/esm/type/symbols/index.mjs +1 -0
  912. package/build/esm/type/symbols/symbols.d.mts +10 -0
  913. package/build/esm/type/symbols/symbols.mjs +10 -0
  914. package/build/esm/type/template-literal/finite.d.mts +19 -0
  915. package/build/esm/type/template-literal/finite.mjs +49 -0
  916. package/build/esm/type/template-literal/generate.d.mts +21 -0
  917. package/build/esm/type/template-literal/generate.mjs +53 -0
  918. package/build/esm/type/template-literal/index.d.mts +7 -0
  919. package/build/esm/type/template-literal/index.mjs +7 -0
  920. package/build/esm/type/template-literal/parse.d.mts +20 -0
  921. package/build/esm/type/template-literal/parse.mjs +167 -0
  922. package/build/esm/type/template-literal/pattern.d.mts +5 -0
  923. package/build/esm/type/template-literal/pattern.mjs +33 -0
  924. package/build/esm/type/template-literal/syntax.d.mts +20 -0
  925. package/build/esm/type/template-literal/syntax.mjs +55 -0
  926. package/build/esm/type/template-literal/template-literal.d.mts +30 -0
  927. package/build/esm/type/template-literal/template-literal.mjs +13 -0
  928. package/build/esm/type/template-literal/union.d.mts +9 -0
  929. package/build/esm/type/template-literal/union.mjs +9 -0
  930. package/build/esm/type/transform/index.d.mts +1 -0
  931. package/build/esm/type/transform/index.mjs +1 -0
  932. package/build/esm/type/transform/transform.d.mts +30 -0
  933. package/build/esm/type/transform/transform.mjs +40 -0
  934. package/build/esm/type/tuple/index.d.mts +1 -0
  935. package/build/esm/type/tuple/index.mjs +1 -0
  936. package/build/esm/type/tuple/tuple.d.mts +16 -0
  937. package/build/esm/type/tuple/tuple.mjs +9 -0
  938. package/build/esm/type/type/index.d.mts +6 -0
  939. package/build/esm/type/type/index.mjs +13 -0
  940. package/build/esm/type/type/javascript.d.mts +64 -0
  941. package/build/esm/type/type/javascript.mjs +99 -0
  942. package/build/esm/type/type/json.d.mts +208 -0
  943. package/build/esm/type/type/json.mjs +221 -0
  944. package/build/esm/type/type/type.d.mts +59 -0
  945. package/build/esm/type/type/type.mjs +62 -0
  946. package/build/esm/type/uint8array/index.d.mts +1 -0
  947. package/build/esm/type/uint8array/index.mjs +1 -0
  948. package/build/esm/type/uint8array/uint8array.d.mts +13 -0
  949. package/build/esm/type/uint8array/uint8array.mjs +6 -0
  950. package/build/esm/type/undefined/index.d.mts +1 -0
  951. package/build/esm/type/undefined/index.mjs +1 -0
  952. package/build/esm/type/undefined/undefined.d.mts +9 -0
  953. package/build/esm/type/undefined/undefined.mjs +6 -0
  954. package/build/esm/type/union/index.d.mts +3 -0
  955. package/build/esm/type/union/index.mjs +3 -0
  956. package/build/esm/type/union/union-create.d.mts +3 -0
  957. package/build/esm/type/union/union-create.mjs +5 -0
  958. package/build/esm/type/union/union-evaluated.d.mts +13 -0
  959. package/build/esm/type/union/union-evaluated.mjs +36 -0
  960. package/build/esm/type/union/union-type.d.mts +12 -0
  961. package/build/esm/type/union/union-type.mjs +1 -0
  962. package/build/esm/type/union/union.d.mts +6 -0
  963. package/build/esm/type/union/union.mjs +10 -0
  964. package/build/esm/type/unknown/index.d.mts +1 -0
  965. package/build/esm/type/unknown/index.mjs +1 -0
  966. package/build/esm/type/unknown/unknown.d.mts +8 -0
  967. package/build/esm/type/unknown/unknown.mjs +6 -0
  968. package/build/esm/type/unsafe/index.d.mts +1 -0
  969. package/build/esm/type/unsafe/index.mjs +1 -0
  970. package/build/esm/type/unsafe/unsafe.d.mts +11 -0
  971. package/build/esm/type/unsafe/unsafe.mjs +6 -0
  972. package/build/esm/type/void/index.d.mts +1 -0
  973. package/build/esm/type/void/index.mjs +1 -0
  974. package/build/esm/type/void/void.d.mts +9 -0
  975. package/build/esm/type/void/void.mjs +6 -0
  976. package/build/esm/value/assert/assert.d.mts +15 -0
  977. package/build/esm/value/assert/assert.mjs +49 -0
  978. package/build/esm/value/assert/index.d.mts +1 -0
  979. package/build/esm/value/assert/index.mjs +1 -0
  980. package/build/esm/value/cast/cast.d.mts +11 -0
  981. package/build/esm/value/cast/cast.mjs +235 -0
  982. package/build/esm/value/cast/index.d.mts +1 -0
  983. package/build/esm/value/cast/index.mjs +1 -0
  984. package/build/esm/value/check/check.d.mts +11 -0
  985. package/build/esm/value/check/check.mjs +470 -0
  986. package/build/esm/value/check/index.d.mts +1 -0
  987. package/build/esm/value/check/index.mjs +1 -0
  988. package/build/esm/value/clean/clean.d.mts +5 -0
  989. package/build/esm/value/clean/clean.mjs +145 -0
  990. package/build/esm/value/clean/index.d.mts +1 -0
  991. package/build/esm/value/clean/index.mjs +1 -0
  992. package/build/esm/value/clone/clone.d.mts +2 -0
  993. package/build/esm/value/clone/clone.mjs +56 -0
  994. package/build/esm/value/clone/index.d.mts +1 -0
  995. package/build/esm/value/clone/index.mjs +1 -0
  996. package/build/esm/value/convert/convert.d.mts +5 -0
  997. package/build/esm/value/convert/convert.mjs +260 -0
  998. package/build/esm/value/convert/index.d.mts +1 -0
  999. package/build/esm/value/convert/index.mjs +1 -0
  1000. package/build/esm/value/create/create.d.mts +11 -0
  1001. package/build/esm/value/create/create.mjs +468 -0
  1002. package/build/esm/value/create/index.d.mts +1 -0
  1003. package/build/esm/value/create/index.mjs +1 -0
  1004. package/build/esm/value/decode/decode.d.mts +6 -0
  1005. package/build/esm/value/decode/decode.mjs +10 -0
  1006. package/build/esm/value/decode/index.d.mts +1 -0
  1007. package/build/esm/value/decode/index.mjs +1 -0
  1008. package/build/esm/value/default/default.d.mts +5 -0
  1009. package/build/esm/value/default/default.mjs +172 -0
  1010. package/build/esm/value/default/index.d.mts +1 -0
  1011. package/build/esm/value/default/index.mjs +1 -0
  1012. package/build/esm/value/delta/delta.d.mts +32 -0
  1013. package/build/esm/value/delta/delta.mjs +171 -0
  1014. package/build/esm/value/delta/index.d.mts +1 -0
  1015. package/build/esm/value/delta/index.mjs +1 -0
  1016. package/build/esm/value/deref/deref.d.mts +12 -0
  1017. package/build/esm/value/deref/deref.mjs +29 -0
  1018. package/build/esm/value/deref/index.d.mts +1 -0
  1019. package/build/esm/value/deref/index.mjs +1 -0
  1020. package/build/esm/value/encode/encode.d.mts +6 -0
  1021. package/build/esm/value/encode/encode.mjs +11 -0
  1022. package/build/esm/value/encode/index.d.mts +1 -0
  1023. package/build/esm/value/encode/index.mjs +1 -0
  1024. package/build/esm/value/equal/equal.d.mts +2 -0
  1025. package/build/esm/value/equal/equal.mjs +46 -0
  1026. package/build/esm/value/equal/index.d.mts +1 -0
  1027. package/build/esm/value/equal/index.mjs +1 -0
  1028. package/build/esm/value/guard/guard.d.mts +74 -0
  1029. package/build/esm/value/guard/guard.mjs +158 -0
  1030. package/build/esm/value/guard/index.d.mts +1 -0
  1031. package/build/esm/value/guard/index.mjs +1 -0
  1032. package/build/esm/value/hash/hash.d.mts +7 -0
  1033. package/build/esm/value/hash/hash.mjs +146 -0
  1034. package/build/esm/value/hash/index.d.mts +1 -0
  1035. package/build/esm/value/hash/index.mjs +1 -0
  1036. package/build/esm/value/index.d.mts +20 -0
  1037. package/build/esm/value/index.mjs +32 -0
  1038. package/build/esm/value/mutate/index.d.mts +1 -0
  1039. package/build/esm/value/mutate/index.mjs +1 -0
  1040. package/build/esm/value/mutate/mutate.d.mts +9 -0
  1041. package/build/esm/value/mutate/mutate.mjs +98 -0
  1042. package/build/esm/value/parse/index.d.mts +1 -0
  1043. package/build/esm/value/parse/index.mjs +1 -0
  1044. package/build/esm/value/parse/parse.d.mts +22 -0
  1045. package/build/esm/value/parse/parse.mjs +81 -0
  1046. package/build/esm/value/pointer/index.d.mts +1 -0
  1047. package/build/esm/value/pointer/index.mjs +1 -0
  1048. package/build/esm/value/pointer/pointer.d.mts +22 -0
  1049. package/build/esm/value/pointer/pointer.mjs +115 -0
  1050. package/build/esm/value/transform/decode.d.mts +22 -0
  1051. package/build/esm/value/transform/decode.mjs +207 -0
  1052. package/build/esm/value/transform/encode.d.mts +23 -0
  1053. package/build/esm/value/transform/encode.mjs +218 -0
  1054. package/build/esm/value/transform/has.d.mts +3 -0
  1055. package/build/esm/value/transform/has.mjs +129 -0
  1056. package/build/esm/value/transform/index.d.mts +3 -0
  1057. package/build/esm/value/transform/index.mjs +3 -0
  1058. package/build/esm/value/value/index.d.mts +1 -0
  1059. package/build/esm/value/value/index.mjs +1 -0
  1060. package/build/esm/value/value/value.d.mts +16 -0
  1061. package/build/esm/value/value/value.mjs +16 -0
  1062. package/changes.json +5 -0
  1063. package/compiler/package.json +4 -0
  1064. package/errors/package.json +4 -0
  1065. package/license +25 -0
  1066. package/package.json +128 -0
  1067. package/parser/package.json +4 -0
  1068. package/readme.md +1865 -0
  1069. package/syntax/package.json +4 -0
  1070. package/system/package.json +4 -0
  1071. package/type/package.json +4 -0
  1072. package/value/package.json +4 -0
@@ -0,0 +1,16 @@
1
+ import type { TSchema, SchemaOptions } from '../schema/index.mjs';
2
+ import { Kind } from '../symbols/index.mjs';
3
+ export interface IntegerOptions extends SchemaOptions {
4
+ exclusiveMaximum?: number;
5
+ exclusiveMinimum?: number;
6
+ maximum?: number;
7
+ minimum?: number;
8
+ multipleOf?: number;
9
+ }
10
+ export interface TInteger extends TSchema, IntegerOptions {
11
+ [Kind]: 'Integer';
12
+ static: number;
13
+ type: 'integer';
14
+ }
15
+ /** `[Json]` Creates an Integer type */
16
+ export declare function Integer(options?: IntegerOptions): TInteger;
@@ -0,0 +1,6 @@
1
+ import { CreateType } from '../create/type.mjs';
2
+ import { Kind } from '../symbols/index.mjs';
3
+ /** `[Json]` Creates an Integer type */
4
+ export function Integer(options) {
5
+ return CreateType({ [Kind]: 'Integer', type: 'integer' }, options);
6
+ }
@@ -0,0 +1,3 @@
1
+ export * from './intersect-evaluated.mjs';
2
+ export * from './intersect-type.mjs';
3
+ export * from './intersect.mjs';
@@ -0,0 +1,3 @@
1
+ export * from './intersect-evaluated.mjs';
2
+ export * from './intersect-type.mjs';
3
+ export * from './intersect.mjs';
@@ -0,0 +1,3 @@
1
+ import type { TSchema } from '../schema/index.mjs';
2
+ import type { TIntersect, IntersectOptions } from './intersect-type.mjs';
3
+ export declare function IntersectCreate<T extends TSchema[]>(T: [...T], options?: IntersectOptions): TIntersect<T>;
@@ -0,0 +1,19 @@
1
+ import { CreateType } from '../create/type.mjs';
2
+ import { Kind } from '../symbols/index.mjs';
3
+ // ------------------------------------------------------------------
4
+ // TypeGuard
5
+ // ------------------------------------------------------------------
6
+ import { IsObject, IsSchema } from '../guard/kind.mjs';
7
+ // ------------------------------------------------------------------
8
+ // IntersectCreate
9
+ // ------------------------------------------------------------------
10
+ // prettier-ignore
11
+ export function IntersectCreate(T, options = {}) {
12
+ const allObjects = T.every((schema) => IsObject(schema));
13
+ const clonedUnevaluatedProperties = IsSchema(options.unevaluatedProperties)
14
+ ? { unevaluatedProperties: options.unevaluatedProperties }
15
+ : {};
16
+ return CreateType((options.unevaluatedProperties === false || IsSchema(options.unevaluatedProperties) || allObjects
17
+ ? { ...clonedUnevaluatedProperties, [Kind]: 'Intersect', type: 'object', allOf: T }
18
+ : { ...clonedUnevaluatedProperties, [Kind]: 'Intersect', allOf: T }), options);
19
+ }
@@ -0,0 +1,13 @@
1
+ import type { TSchema } from '../schema/index.mjs';
2
+ import { type TNever } from '../never/index.mjs';
3
+ import { type TOptional } from '../optional/index.mjs';
4
+ import type { TReadonly } from '../readonly/index.mjs';
5
+ import { TIntersect, IntersectOptions } from './intersect-type.mjs';
6
+ type TIsIntersectOptional<Types extends TSchema[]> = (Types extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? Left extends TOptional<TSchema> ? TIsIntersectOptional<Right> : false : true);
7
+ type TRemoveOptionalFromType<Type extends TSchema> = (Type extends TReadonly<infer Type extends TSchema> ? TReadonly<TRemoveOptionalFromType<Type>> : Type extends TOptional<infer Type extends TSchema> ? TRemoveOptionalFromType<Type> : Type);
8
+ type TRemoveOptionalFromRest<Types extends TSchema[], Result extends TSchema[] = []> = (Types extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? Left extends TOptional<infer Type extends TSchema> ? TRemoveOptionalFromRest<Right, [...Result, TRemoveOptionalFromType<Type>]> : TRemoveOptionalFromRest<Right, [...Result, Left]> : Result);
9
+ type TResolveIntersect<Types extends TSchema[]> = (TIsIntersectOptional<Types> extends true ? TOptional<TIntersect<TRemoveOptionalFromRest<Types>>> : TIntersect<TRemoveOptionalFromRest<Types>>);
10
+ export type TIntersectEvaluated<Types extends TSchema[]> = (Types extends [TSchema] ? Types[0] : Types extends [] ? TNever : TResolveIntersect<Types>);
11
+ /** `[Json]` Creates an evaluated Intersect type */
12
+ export declare function IntersectEvaluated<Types extends TSchema[], Result extends TSchema = TIntersectEvaluated<Types>>(types: [...Types], options?: IntersectOptions): Result;
13
+ export {};
@@ -0,0 +1,38 @@
1
+ import { OptionalKind } from '../symbols/index.mjs';
2
+ import { CreateType } from '../create/type.mjs';
3
+ import { Discard } from '../discard/index.mjs';
4
+ import { Never } from '../never/index.mjs';
5
+ import { Optional } from '../optional/index.mjs';
6
+ import { IntersectCreate } from './intersect-create.mjs';
7
+ // ------------------------------------------------------------------
8
+ // TypeGuard
9
+ // ------------------------------------------------------------------
10
+ import { IsOptional, IsTransform } from '../guard/kind.mjs';
11
+ // prettier-ignore
12
+ function IsIntersectOptional(types) {
13
+ return types.every(left => IsOptional(left));
14
+ }
15
+ // prettier-ignore
16
+ function RemoveOptionalFromType(type) {
17
+ return (Discard(type, [OptionalKind]));
18
+ }
19
+ // prettier-ignore
20
+ function RemoveOptionalFromRest(types) {
21
+ return types.map(left => IsOptional(left) ? RemoveOptionalFromType(left) : left);
22
+ }
23
+ // prettier-ignore
24
+ function ResolveIntersect(types, options) {
25
+ return (IsIntersectOptional(types)
26
+ ? Optional(IntersectCreate(RemoveOptionalFromRest(types), options))
27
+ : IntersectCreate(RemoveOptionalFromRest(types), options));
28
+ }
29
+ /** `[Json]` Creates an evaluated Intersect type */
30
+ export function IntersectEvaluated(types, options = {}) {
31
+ if (types.length === 1)
32
+ return CreateType(types[0], options);
33
+ if (types.length === 0)
34
+ return Never(options);
35
+ if (types.some((schema) => IsTransform(schema)))
36
+ throw new Error('Cannot intersect transform types');
37
+ return ResolveIntersect(types, options);
38
+ }
@@ -0,0 +1,15 @@
1
+ import type { TSchema, SchemaOptions } from '../schema/index.mjs';
2
+ import type { Static } from '../static/index.mjs';
3
+ import { Kind } from '../symbols/index.mjs';
4
+ type TIntersectStatic<T extends TSchema[], P extends unknown[], Acc extends unknown = unknown> = T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? TIntersectStatic<R, P, Acc & Static<L, P>> : Acc;
5
+ export type TUnevaluatedProperties = undefined | TSchema | boolean;
6
+ export interface IntersectOptions extends SchemaOptions {
7
+ unevaluatedProperties?: TUnevaluatedProperties;
8
+ }
9
+ export interface TIntersect<T extends TSchema[] = TSchema[]> extends TSchema, IntersectOptions {
10
+ [Kind]: 'Intersect';
11
+ static: TIntersectStatic<T, this['params']>;
12
+ type?: 'object';
13
+ allOf: [...T];
14
+ }
15
+ export {};
@@ -0,0 +1 @@
1
+ import { Kind } from '../symbols/index.mjs';
@@ -0,0 +1,6 @@
1
+ import type { TSchema } from '../schema/index.mjs';
2
+ import { type TNever } from '../never/index.mjs';
3
+ import { TIntersect, IntersectOptions } from './intersect-type.mjs';
4
+ export type Intersect<Types extends TSchema[]> = (Types extends [TSchema] ? Types[0] : Types extends [] ? TNever : TIntersect<Types>);
5
+ /** `[Json]` Creates an evaluated Intersect type */
6
+ export declare function Intersect<Types extends TSchema[]>(types: [...Types], options?: IntersectOptions): Intersect<Types>;
@@ -0,0 +1,17 @@
1
+ import { CreateType } from '../create/type.mjs';
2
+ import { Never } from '../never/index.mjs';
3
+ import { IntersectCreate } from './intersect-create.mjs';
4
+ // ------------------------------------------------------------------
5
+ // TypeGuard
6
+ // ------------------------------------------------------------------
7
+ import { IsTransform } from '../guard/kind.mjs';
8
+ /** `[Json]` Creates an evaluated Intersect type */
9
+ export function Intersect(types, options) {
10
+ if (types.length === 1)
11
+ return CreateType(types[0], options);
12
+ if (types.length === 0)
13
+ return Never(options);
14
+ if (types.some((schema) => IsTransform(schema)))
15
+ throw new Error('Cannot intersect transform types');
16
+ return IntersectCreate(types, options);
17
+ }
@@ -0,0 +1,5 @@
1
+ import type { TSchema, SchemaOptions } from '../schema/index.mjs';
2
+ import { type TIntrinsic } from './intrinsic.mjs';
3
+ export type TCapitalize<T extends TSchema> = TIntrinsic<T, 'Capitalize'>;
4
+ /** `[Json]` Intrinsic function to Capitalize LiteralString types */
5
+ export declare function Capitalize<T extends TSchema>(T: T, options?: SchemaOptions): TCapitalize<T>;
@@ -0,0 +1,5 @@
1
+ import { Intrinsic } from './intrinsic.mjs';
2
+ /** `[Json]` Intrinsic function to Capitalize LiteralString types */
3
+ export function Capitalize(T, options = {}) {
4
+ return Intrinsic(T, 'Capitalize', options);
5
+ }
@@ -0,0 +1,6 @@
1
+ export * from './capitalize.mjs';
2
+ export * from './intrinsic-from-mapped-key.mjs';
3
+ export * from './intrinsic.mjs';
4
+ export * from './lowercase.mjs';
5
+ export * from './uncapitalize.mjs';
6
+ export * from './uppercase.mjs';
@@ -0,0 +1,6 @@
1
+ export * from './capitalize.mjs';
2
+ export * from './intrinsic-from-mapped-key.mjs';
3
+ export * from './intrinsic.mjs';
4
+ export * from './lowercase.mjs';
5
+ export * from './uncapitalize.mjs';
6
+ export * from './uppercase.mjs';
@@ -0,0 +1,14 @@
1
+ import type { SchemaOptions } from '../schema/index.mjs';
2
+ import type { TProperties } from '../object/index.mjs';
3
+ import { Assert } from '../helpers/index.mjs';
4
+ import { type TMappedResult, type TMappedKey } from '../mapped/index.mjs';
5
+ import { type TIntrinsic, type IntrinsicMode } from './intrinsic.mjs';
6
+ import { type TLiteral, type TLiteralValue } from '../literal/index.mjs';
7
+ type TMappedIntrinsicPropertyKey<K extends PropertyKey, M extends IntrinsicMode> = {
8
+ [_ in K]: TIntrinsic<TLiteral<Assert<K, TLiteralValue>>, M>;
9
+ };
10
+ type TMappedIntrinsicPropertyKeys<K extends PropertyKey[], M extends IntrinsicMode, Acc extends TProperties = {}> = (K extends [infer L extends PropertyKey, ...infer R extends PropertyKey[]] ? TMappedIntrinsicPropertyKeys<R, M, Acc & TMappedIntrinsicPropertyKey<L, M>> : Acc);
11
+ type TMappedIntrinsicProperties<K extends TMappedKey, M extends IntrinsicMode> = (TMappedIntrinsicPropertyKeys<K['keys'], M>);
12
+ export type TIntrinsicFromMappedKey<K extends TMappedKey, M extends IntrinsicMode, P extends TProperties = TMappedIntrinsicProperties<K, M>> = (TMappedResult<P>);
13
+ export declare function IntrinsicFromMappedKey<K extends TMappedKey, M extends IntrinsicMode, P extends TProperties = TMappedIntrinsicProperties<K, M>>(T: K, M: M, options: SchemaOptions): TMappedResult<P>;
14
+ export {};
@@ -0,0 +1,26 @@
1
+ import { MappedResult } from '../mapped/index.mjs';
2
+ import { Intrinsic } from './intrinsic.mjs';
3
+ import { Literal } from '../literal/index.mjs';
4
+ import { Clone } from '../clone/value.mjs';
5
+ // prettier-ignore
6
+ function MappedIntrinsicPropertyKey(K, M, options) {
7
+ return {
8
+ [K]: Intrinsic(Literal(K), M, Clone(options))
9
+ };
10
+ }
11
+ // prettier-ignore
12
+ function MappedIntrinsicPropertyKeys(K, M, options) {
13
+ const result = K.reduce((Acc, L) => {
14
+ return { ...Acc, ...MappedIntrinsicPropertyKey(L, M, options) };
15
+ }, {});
16
+ return result;
17
+ }
18
+ // prettier-ignore
19
+ function MappedIntrinsicProperties(T, M, options) {
20
+ return MappedIntrinsicPropertyKeys(T['keys'], M, options);
21
+ }
22
+ // prettier-ignore
23
+ export function IntrinsicFromMappedKey(T, M, options) {
24
+ const P = MappedIntrinsicProperties(T, M, options);
25
+ return MappedResult(P);
26
+ }
@@ -0,0 +1,16 @@
1
+ import type { TSchema, SchemaOptions } from '../schema/index.mjs';
2
+ import { type TTemplateLiteral, type TTemplateLiteralKind } from '../template-literal/index.mjs';
3
+ import { type TIntrinsicFromMappedKey } from './intrinsic-from-mapped-key.mjs';
4
+ import { type TLiteral } from '../literal/index.mjs';
5
+ import { type TUnion } from '../union/index.mjs';
6
+ import { type TMappedKey } from '../mapped/index.mjs';
7
+ export type IntrinsicMode = 'Uppercase' | 'Lowercase' | 'Capitalize' | 'Uncapitalize';
8
+ type TFromTemplateLiteral<T extends TTemplateLiteralKind[], M extends IntrinsicMode> = M extends IntrinsicMode ? T extends [infer L extends TTemplateLiteralKind, ...infer R extends TTemplateLiteralKind[]] ? [TIntrinsic<L, M>, ...TFromTemplateLiteral<R, M>] : T : T;
9
+ type TFromLiteralValue<T, M extends IntrinsicMode> = (T extends string ? M extends 'Uncapitalize' ? Uncapitalize<T> : M extends 'Capitalize' ? Capitalize<T> : M extends 'Uppercase' ? Uppercase<T> : M extends 'Lowercase' ? Lowercase<T> : string : T);
10
+ type TFromRest<T extends TSchema[], M extends IntrinsicMode, Acc extends TSchema[] = []> = T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? TFromRest<R, M, [...Acc, TIntrinsic<L, M>]> : Acc;
11
+ export type TIntrinsic<T extends TSchema, M extends IntrinsicMode> = T extends TMappedKey ? TIntrinsicFromMappedKey<T, M> : T extends TTemplateLiteral<infer S> ? TTemplateLiteral<TFromTemplateLiteral<S, M>> : T extends TUnion<infer S> ? TUnion<TFromRest<S, M>> : T extends TLiteral<infer S> ? TLiteral<TFromLiteralValue<S, M>> : T;
12
+ /** Applies an intrinsic string manipulation to the given type. */
13
+ export declare function Intrinsic<T extends TMappedKey, M extends IntrinsicMode>(schema: T, mode: M, options?: SchemaOptions): TIntrinsicFromMappedKey<T, M>;
14
+ /** Applies an intrinsic string manipulation to the given type. */
15
+ export declare function Intrinsic<T extends TSchema, M extends IntrinsicMode>(schema: T, mode: M, options?: SchemaOptions): TIntrinsic<T, M>;
16
+ export {};
@@ -0,0 +1,64 @@
1
+ import { CreateType } from '../create/type.mjs';
2
+ import { TemplateLiteral, TemplateLiteralParseExact, IsTemplateLiteralExpressionFinite, TemplateLiteralExpressionGenerate } from '../template-literal/index.mjs';
3
+ import { IntrinsicFromMappedKey } from './intrinsic-from-mapped-key.mjs';
4
+ import { Literal } from '../literal/index.mjs';
5
+ import { Union } from '../union/index.mjs';
6
+ // ------------------------------------------------------------------
7
+ // TypeGuard
8
+ // ------------------------------------------------------------------
9
+ import { IsMappedKey, IsTemplateLiteral, IsUnion, IsLiteral } from '../guard/kind.mjs';
10
+ // ------------------------------------------------------------------
11
+ // Apply
12
+ // ------------------------------------------------------------------
13
+ function ApplyUncapitalize(value) {
14
+ const [first, rest] = [value.slice(0, 1), value.slice(1)];
15
+ return [first.toLowerCase(), rest].join('');
16
+ }
17
+ function ApplyCapitalize(value) {
18
+ const [first, rest] = [value.slice(0, 1), value.slice(1)];
19
+ return [first.toUpperCase(), rest].join('');
20
+ }
21
+ function ApplyUppercase(value) {
22
+ return value.toUpperCase();
23
+ }
24
+ function ApplyLowercase(value) {
25
+ return value.toLowerCase();
26
+ }
27
+ function FromTemplateLiteral(schema, mode, options) {
28
+ // note: template literals require special runtime handling as they are encoded in string patterns.
29
+ // This diverges from the mapped type which would otherwise map on the template literal kind.
30
+ const expression = TemplateLiteralParseExact(schema.pattern);
31
+ const finite = IsTemplateLiteralExpressionFinite(expression);
32
+ if (!finite)
33
+ return { ...schema, pattern: FromLiteralValue(schema.pattern, mode) };
34
+ const strings = [...TemplateLiteralExpressionGenerate(expression)];
35
+ const literals = strings.map((value) => Literal(value));
36
+ const mapped = FromRest(literals, mode);
37
+ const union = Union(mapped);
38
+ return TemplateLiteral([union], options);
39
+ }
40
+ // prettier-ignore
41
+ function FromLiteralValue(value, mode) {
42
+ return (typeof value === 'string' ? (mode === 'Uncapitalize' ? ApplyUncapitalize(value) :
43
+ mode === 'Capitalize' ? ApplyCapitalize(value) :
44
+ mode === 'Uppercase' ? ApplyUppercase(value) :
45
+ mode === 'Lowercase' ? ApplyLowercase(value) :
46
+ value) : value.toString());
47
+ }
48
+ // prettier-ignore
49
+ function FromRest(T, M) {
50
+ return T.map(L => Intrinsic(L, M));
51
+ }
52
+ /** Applies an intrinsic string manipulation to the given type. */
53
+ export function Intrinsic(schema, mode, options = {}) {
54
+ // prettier-ignore
55
+ return (
56
+ // Intrinsic-Mapped-Inference
57
+ IsMappedKey(schema) ? IntrinsicFromMappedKey(schema, mode, options) :
58
+ // Standard-Inference
59
+ IsTemplateLiteral(schema) ? FromTemplateLiteral(schema, mode, options) :
60
+ IsUnion(schema) ? Union(FromRest(schema.anyOf, mode), options) :
61
+ IsLiteral(schema) ? Literal(FromLiteralValue(schema.const, mode), options) :
62
+ // Default Type
63
+ CreateType(schema, options));
64
+ }
@@ -0,0 +1,5 @@
1
+ import type { TSchema, SchemaOptions } from '../schema/index.mjs';
2
+ import { type TIntrinsic } from './intrinsic.mjs';
3
+ export type TLowercase<T extends TSchema> = TIntrinsic<T, 'Lowercase'>;
4
+ /** `[Json]` Intrinsic function to Lowercase LiteralString types */
5
+ export declare function Lowercase<T extends TSchema>(T: T, options?: SchemaOptions): TLowercase<T>;
@@ -0,0 +1,5 @@
1
+ import { Intrinsic } from './intrinsic.mjs';
2
+ /** `[Json]` Intrinsic function to Lowercase LiteralString types */
3
+ export function Lowercase(T, options = {}) {
4
+ return Intrinsic(T, 'Lowercase', options);
5
+ }
@@ -0,0 +1,5 @@
1
+ import type { TSchema, SchemaOptions } from '../schema/index.mjs';
2
+ import { type TIntrinsic } from './intrinsic.mjs';
3
+ export type TUncapitalize<T extends TSchema> = TIntrinsic<T, 'Uncapitalize'>;
4
+ /** `[Json]` Intrinsic function to Uncapitalize LiteralString types */
5
+ export declare function Uncapitalize<T extends TSchema>(T: T, options?: SchemaOptions): TUncapitalize<T>;
@@ -0,0 +1,5 @@
1
+ import { Intrinsic } from './intrinsic.mjs';
2
+ /** `[Json]` Intrinsic function to Uncapitalize LiteralString types */
3
+ export function Uncapitalize(T, options = {}) {
4
+ return Intrinsic(T, 'Uncapitalize', options);
5
+ }
@@ -0,0 +1,5 @@
1
+ import type { TSchema, SchemaOptions } from '../schema/index.mjs';
2
+ import { type TIntrinsic } from './intrinsic.mjs';
3
+ export type TUppercase<T extends TSchema> = TIntrinsic<T, 'Uppercase'>;
4
+ /** `[Json]` Intrinsic function to Uppercase LiteralString types */
5
+ export declare function Uppercase<T extends TSchema>(T: T, options?: SchemaOptions): TUppercase<T>;
@@ -0,0 +1,5 @@
1
+ import { Intrinsic } from './intrinsic.mjs';
2
+ /** `[Json]` Intrinsic function to Uppercase LiteralString types */
3
+ export function Uppercase(T, options = {}) {
4
+ return Intrinsic(T, 'Uppercase', options);
5
+ }
@@ -0,0 +1 @@
1
+ export * from './iterator.mjs';
@@ -0,0 +1 @@
1
+ export * from './iterator.mjs';
@@ -0,0 +1,11 @@
1
+ import type { TSchema, SchemaOptions } from '../schema/index.mjs';
2
+ import type { Static } from '../static/index.mjs';
3
+ import { Kind } from '../symbols/index.mjs';
4
+ export interface TIterator<T extends TSchema = TSchema> extends TSchema {
5
+ [Kind]: 'Iterator';
6
+ static: IterableIterator<Static<T, this['params']>>;
7
+ type: 'Iterator';
8
+ items: T;
9
+ }
10
+ /** `[JavaScript]` Creates an Iterator type */
11
+ export declare function Iterator<T extends TSchema>(items: T, options?: SchemaOptions): TIterator<T>;
@@ -0,0 +1,6 @@
1
+ import { CreateType } from '../create/type.mjs';
2
+ import { Kind } from '../symbols/index.mjs';
3
+ /** `[JavaScript]` Creates an Iterator type */
4
+ export function Iterator(items, options) {
5
+ return CreateType({ [Kind]: 'Iterator', type: 'Iterator', items }, options);
6
+ }
@@ -0,0 +1,4 @@
1
+ export * from './keyof-from-mapped-result.mjs';
2
+ export * from './keyof-property-entries.mjs';
3
+ export * from './keyof-property-keys.mjs';
4
+ export * from './keyof.mjs';
@@ -0,0 +1,4 @@
1
+ export * from './keyof-from-mapped-result.mjs';
2
+ export * from './keyof-property-entries.mjs';
3
+ export * from './keyof-property-keys.mjs';
4
+ export * from './keyof.mjs';
@@ -0,0 +1,12 @@
1
+ import type { SchemaOptions } from '../schema/index.mjs';
2
+ import type { Ensure, Evaluate } from '../helpers/index.mjs';
3
+ import type { TProperties } from '../object/index.mjs';
4
+ import { type TMappedResult } from '../mapped/index.mjs';
5
+ import { type TKeyOfFromType } from './keyof.mjs';
6
+ type TFromProperties<Properties extends TProperties> = ({
7
+ [K2 in keyof Properties]: TKeyOfFromType<Properties[K2]>;
8
+ });
9
+ type TFromMappedResult<MappedResult extends TMappedResult> = (Evaluate<TFromProperties<MappedResult['properties']>>);
10
+ export type TKeyOfFromMappedResult<MappedResult extends TMappedResult, Properties extends TProperties = TFromMappedResult<MappedResult>> = (Ensure<TMappedResult<Properties>>);
11
+ export declare function KeyOfFromMappedResult<MappedResult extends TMappedResult, Properties extends TProperties = TFromMappedResult<MappedResult>>(mappedResult: MappedResult, options?: SchemaOptions): TMappedResult<Properties>;
12
+ export {};
@@ -0,0 +1,19 @@
1
+ import { MappedResult } from '../mapped/index.mjs';
2
+ import { KeyOf } from './keyof.mjs';
3
+ import { Clone } from '../clone/value.mjs';
4
+ // prettier-ignore
5
+ function FromProperties(properties, options) {
6
+ const result = {};
7
+ for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
8
+ result[K2] = KeyOf(properties[K2], Clone(options));
9
+ return result;
10
+ }
11
+ // prettier-ignore
12
+ function FromMappedResult(mappedResult, options) {
13
+ return FromProperties(mappedResult.properties, options);
14
+ }
15
+ // prettier-ignore
16
+ export function KeyOfFromMappedResult(mappedResult, options) {
17
+ const properties = FromMappedResult(mappedResult, options);
18
+ return MappedResult(properties);
19
+ }
@@ -0,0 +1,7 @@
1
+ import { TSchema } from '../schema/index.mjs';
2
+ /**
3
+ * `[Utility]` Resolves an array of keys and schemas from the given schema. This method is faster
4
+ * than obtaining the keys and resolving each individually via indexing. This method was written
5
+ * accellerate Intersect and Union encoding.
6
+ */
7
+ export declare function KeyOfPropertyEntries(schema: TSchema): [key: string, schema: TSchema][];
@@ -0,0 +1,12 @@
1
+ import { IndexFromPropertyKeys } from '../indexed/indexed.mjs';
2
+ import { KeyOfPropertyKeys } from './keyof-property-keys.mjs';
3
+ /**
4
+ * `[Utility]` Resolves an array of keys and schemas from the given schema. This method is faster
5
+ * than obtaining the keys and resolving each individually via indexing. This method was written
6
+ * accellerate Intersect and Union encoding.
7
+ */
8
+ export function KeyOfPropertyEntries(schema) {
9
+ const keys = KeyOfPropertyKeys(schema);
10
+ const schemas = IndexFromPropertyKeys(schema, keys);
11
+ return keys.map((_, index) => [keys[index], schemas[index]]);
12
+ }
@@ -0,0 +1,24 @@
1
+ import type { TSchema } from '../schema/index.mjs';
2
+ import { type ZeroString, type UnionToTuple, type TIncrement } from '../helpers/index.mjs';
3
+ import type { TRecursive } from '../recursive/index.mjs';
4
+ import type { TIntersect } from '../intersect/index.mjs';
5
+ import type { TUnion } from '../union/index.mjs';
6
+ import type { TTuple } from '../tuple/index.mjs';
7
+ import type { TArray } from '../array/index.mjs';
8
+ import type { TObject, TProperties } from '../object/index.mjs';
9
+ import { type TSetUnionMany, type TSetIntersectMany } from '../sets/index.mjs';
10
+ type TFromRest<Types extends TSchema[], Result extends PropertyKey[][] = []> = (Types extends [infer L extends TSchema, ...infer R extends TSchema[]] ? TFromRest<R, [...Result, TKeyOfPropertyKeys<L>]> : Result);
11
+ type TFromIntersect<Types extends TSchema[], PropertyKeysArray extends PropertyKey[][] = TFromRest<Types>, PropertyKeys extends PropertyKey[] = TSetUnionMany<PropertyKeysArray>> = PropertyKeys;
12
+ type TFromUnion<Types extends TSchema[], PropertyKeysArray extends PropertyKey[][] = TFromRest<Types>, PropertyKeys extends PropertyKey[] = TSetIntersectMany<PropertyKeysArray>> = PropertyKeys;
13
+ type TFromTuple<Types extends TSchema[], Indexer extends string = ZeroString, Acc extends PropertyKey[] = []> = Types extends [infer _ extends TSchema, ...infer R extends TSchema[]] ? TFromTuple<R, TIncrement<Indexer>, [...Acc, Indexer]> : Acc;
14
+ type TFromArray<_ extends TSchema> = ([
15
+ '[number]'
16
+ ]);
17
+ type TFromProperties<Properties extends TProperties> = (UnionToTuple<keyof Properties>);
18
+ export type TKeyOfPropertyKeys<Type extends TSchema> = (Type extends TRecursive<infer Type extends TSchema> ? TKeyOfPropertyKeys<Type> : Type extends TIntersect<infer Types extends TSchema[]> ? TFromIntersect<Types> : Type extends TUnion<infer Types extends TSchema[]> ? TFromUnion<Types> : Type extends TTuple<infer Types extends TSchema[]> ? TFromTuple<Types> : Type extends TArray<infer Type extends TSchema> ? TFromArray<Type> : Type extends TObject<infer Properties extends TProperties> ? TFromProperties<Properties> : [
19
+ ]);
20
+ /** Returns a tuple of PropertyKeys derived from the given TSchema. */
21
+ export declare function KeyOfPropertyKeys<Type extends TSchema>(type: Type): TKeyOfPropertyKeys<Type>;
22
+ /** Returns a regular expression pattern derived from the given TSchema */
23
+ export declare function KeyOfPattern(schema: TSchema): string;
24
+ export {};
@@ -0,0 +1,73 @@
1
+ import { SetUnionMany, SetIntersectMany } from '../sets/index.mjs';
2
+ // ------------------------------------------------------------------
3
+ // TypeGuard
4
+ // ------------------------------------------------------------------
5
+ import { IsIntersect, IsUnion, IsTuple, IsArray, IsObject, IsRecord } from '../guard/kind.mjs';
6
+ // prettier-ignore
7
+ function FromRest(types) {
8
+ const result = [];
9
+ for (const L of types)
10
+ result.push(KeyOfPropertyKeys(L));
11
+ return result;
12
+ }
13
+ // prettier-ignore
14
+ function FromIntersect(types) {
15
+ const propertyKeysArray = FromRest(types);
16
+ const propertyKeys = SetUnionMany(propertyKeysArray);
17
+ return propertyKeys;
18
+ }
19
+ // prettier-ignore
20
+ function FromUnion(types) {
21
+ const propertyKeysArray = FromRest(types);
22
+ const propertyKeys = SetIntersectMany(propertyKeysArray);
23
+ return propertyKeys;
24
+ }
25
+ // prettier-ignore
26
+ function FromTuple(types) {
27
+ return types.map((_, indexer) => indexer.toString());
28
+ }
29
+ // prettier-ignore
30
+ function FromArray(_) {
31
+ return (['[number]']);
32
+ }
33
+ // prettier-ignore
34
+ function FromProperties(T) {
35
+ return (globalThis.Object.getOwnPropertyNames(T));
36
+ }
37
+ // ------------------------------------------------------------------
38
+ // FromPatternProperties
39
+ // ------------------------------------------------------------------
40
+ // prettier-ignore
41
+ function FromPatternProperties(patternProperties) {
42
+ if (!includePatternProperties)
43
+ return [];
44
+ const patternPropertyKeys = globalThis.Object.getOwnPropertyNames(patternProperties);
45
+ return patternPropertyKeys.map(key => {
46
+ return (key[0] === '^' && key[key.length - 1] === '$')
47
+ ? key.slice(1, key.length - 1)
48
+ : key;
49
+ });
50
+ }
51
+ /** Returns a tuple of PropertyKeys derived from the given TSchema. */
52
+ // prettier-ignore
53
+ export function KeyOfPropertyKeys(type) {
54
+ return (IsIntersect(type) ? FromIntersect(type.allOf) :
55
+ IsUnion(type) ? FromUnion(type.anyOf) :
56
+ IsTuple(type) ? FromTuple(type.items ?? []) :
57
+ IsArray(type) ? FromArray(type.items) :
58
+ IsObject(type) ? FromProperties(type.properties) :
59
+ IsRecord(type) ? FromPatternProperties(type.patternProperties) :
60
+ []);
61
+ }
62
+ // ----------------------------------------------------------------
63
+ // KeyOfPattern
64
+ // ----------------------------------------------------------------
65
+ let includePatternProperties = false;
66
+ /** Returns a regular expression pattern derived from the given TSchema */
67
+ export function KeyOfPattern(schema) {
68
+ includePatternProperties = true;
69
+ const keys = KeyOfPropertyKeys(schema);
70
+ includePatternProperties = false;
71
+ const pattern = keys.map((key) => `(${key})`);
72
+ return `^(${pattern.join('|')})$`;
73
+ }
@@ -0,0 +1,21 @@
1
+ import type { TSchema } from '../schema/index.mjs';
2
+ import type { Assert, Ensure } from '../helpers/index.mjs';
3
+ import type { TMappedResult } from '../mapped/index.mjs';
4
+ import type { SchemaOptions } from '../schema/index.mjs';
5
+ import { type TLiteral, type TLiteralValue } from '../literal/index.mjs';
6
+ import { type TNumber } from '../number/index.mjs';
7
+ import { TComputed } from '../computed/index.mjs';
8
+ import { type TRef } from '../ref/index.mjs';
9
+ import { type TKeyOfPropertyKeys } from './keyof-property-keys.mjs';
10
+ import { type TUnionEvaluated } from '../union/index.mjs';
11
+ import { type TKeyOfFromMappedResult } from './keyof-from-mapped-result.mjs';
12
+ type TFromComputed<Target extends string, Parameters extends TSchema[]> = Ensure<TComputed<'KeyOf', [TComputed<Target, Parameters>]>>;
13
+ type TFromRef<Ref extends string> = Ensure<TComputed<'KeyOf', [TRef<Ref>]>>;
14
+ /** `[Internal]` Used by KeyOfFromMappedResult */
15
+ export type TKeyOfFromType<Type extends TSchema, PropertyKeys extends PropertyKey[] = TKeyOfPropertyKeys<Type>, PropertyKeyTypes extends TSchema[] = TKeyOfPropertyKeysToRest<PropertyKeys>, Result = TUnionEvaluated<PropertyKeyTypes>> = Ensure<Result>;
16
+ export type TKeyOfPropertyKeysToRest<PropertyKeys extends PropertyKey[], Result extends TSchema[] = []> = (PropertyKeys extends [infer L extends PropertyKey, ...infer R extends PropertyKey[]] ? L extends '[number]' ? TKeyOfPropertyKeysToRest<R, [...Result, TNumber]> : TKeyOfPropertyKeysToRest<R, [...Result, TLiteral<Assert<L, TLiteralValue>>]> : Result);
17
+ export declare function KeyOfPropertyKeysToRest<PropertyKeys extends PropertyKey[]>(propertyKeys: [...PropertyKeys]): TKeyOfPropertyKeysToRest<PropertyKeys>;
18
+ export type TKeyOf<Type extends TSchema> = (Type extends TComputed<infer Target extends string, infer Parameters extends TSchema[]> ? TFromComputed<Target, Parameters> : Type extends TRef<infer Ref extends string> ? TFromRef<Ref> : Type extends TMappedResult ? TKeyOfFromMappedResult<Type> : TKeyOfFromType<Type>);
19
+ /** `[Json]` Creates a KeyOf type */
20
+ export declare function KeyOf<Type extends TSchema>(type: Type, options?: SchemaOptions): TKeyOf<Type>;
21
+ export {};
@@ -0,0 +1,35 @@
1
+ import { CreateType } from '../create/type.mjs';
2
+ import { Literal } from '../literal/index.mjs';
3
+ import { Number } from '../number/index.mjs';
4
+ import { Computed } from '../computed/index.mjs';
5
+ import { Ref } from '../ref/index.mjs';
6
+ import { KeyOfPropertyKeys } from './keyof-property-keys.mjs';
7
+ import { UnionEvaluated } from '../union/index.mjs';
8
+ import { KeyOfFromMappedResult } from './keyof-from-mapped-result.mjs';
9
+ // ------------------------------------------------------------------
10
+ // TypeGuard
11
+ // ------------------------------------------------------------------
12
+ import { IsMappedResult, IsRef, IsComputed } from '../guard/kind.mjs';
13
+ // prettier-ignore
14
+ function FromComputed(target, parameters) {
15
+ return Computed('KeyOf', [Computed(target, parameters)]);
16
+ }
17
+ // prettier-ignore
18
+ function FromRef($ref) {
19
+ return Computed('KeyOf', [Ref($ref)]);
20
+ }
21
+ // prettier-ignore
22
+ function KeyOfFromType(type, options) {
23
+ const propertyKeys = KeyOfPropertyKeys(type);
24
+ const propertyKeyTypes = KeyOfPropertyKeysToRest(propertyKeys);
25
+ const result = UnionEvaluated(propertyKeyTypes);
26
+ return CreateType(result, options);
27
+ }
28
+ // prettier-ignore
29
+ export function KeyOfPropertyKeysToRest(propertyKeys) {
30
+ return propertyKeys.map(L => L === '[number]' ? Number() : Literal(L));
31
+ }
32
+ /** `[Json]` Creates a KeyOf type */
33
+ export function KeyOf(type, options) {
34
+ return (IsComputed(type) ? FromComputed(type.target, type.parameters) : IsRef(type) ? FromRef(type.$ref) : IsMappedResult(type) ? KeyOfFromMappedResult(type, options) : KeyOfFromType(type, options));
35
+ }
@@ -0,0 +1 @@
1
+ export * from './literal.mjs';
@@ -0,0 +1 @@
1
+ export * from './literal.mjs';