@sinclair/typebox 0.32.0-dev-3 → 0.32.0-dev-5

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 (1135) hide show
  1. package/build/default/compiler/compiler.js +570 -0
  2. package/build/default/compiler/index.js +21 -0
  3. package/build/default/errors/errors.js +536 -0
  4. package/build/default/errors/index.js +17 -0
  5. package/build/default/index.js +170 -0
  6. package/build/default/system/errors.js +154 -0
  7. package/build/default/system/index.js +14 -0
  8. package/build/default/system/policy.js +34 -0
  9. package/build/default/system/system.js +35 -0
  10. package/build/default/type/any/any.js +8 -0
  11. package/build/default/type/any/index.js +17 -0
  12. package/build/default/type/array/array.js +14 -0
  13. package/build/default/type/array/index.js +17 -0
  14. package/build/default/type/async-iterator/async-iterator.js +14 -0
  15. package/build/default/type/async-iterator/index.js +17 -0
  16. package/build/default/type/awaited/awaited.js +33 -0
  17. package/build/default/type/awaited/index.js +17 -0
  18. package/build/default/type/bigint/bigint.js +12 -0
  19. package/build/default/type/bigint/index.js +17 -0
  20. package/build/default/type/boolean/boolean.js +12 -0
  21. package/build/default/type/boolean/index.js +17 -0
  22. package/build/default/type/clone/index.js +5 -0
  23. package/build/default/type/clone/type.js +12 -0
  24. package/build/default/type/clone/value.js +29 -0
  25. package/build/default/type/composite/composite.js +19 -0
  26. package/build/default/type/composite/index.js +17 -0
  27. package/build/default/type/const/const.js +53 -0
  28. package/build/default/type/const/index.js +17 -0
  29. package/build/default/type/constructor/constructor.js +15 -0
  30. package/build/default/type/constructor/index.js +17 -0
  31. package/build/default/type/constructor-parameters/constructor-parameters.js +9 -0
  32. package/build/default/type/constructor-parameters/index.js +17 -0
  33. package/build/default/type/date/date.js +12 -0
  34. package/build/default/type/date/index.js +17 -0
  35. package/build/default/type/deref/deref.js +95 -0
  36. package/build/default/type/deref/index.js +17 -0
  37. package/build/default/type/discard/discard.js +11 -0
  38. package/build/default/type/discard/index.js +17 -0
  39. package/build/default/type/enum/enum.js +18 -0
  40. package/build/default/type/enum/index.js +17 -0
  41. package/build/default/type/exclude/exclude.js +25 -0
  42. package/build/default/type/exclude/index.js +17 -0
  43. package/build/default/type/extends/extends-check.js +455 -0
  44. package/build/default/type/extends/extends-undefined.js +21 -0
  45. package/build/default/type/extends/extends.js +18 -0
  46. package/build/default/type/extends/index.js +19 -0
  47. package/build/default/type/extract/extract.js +25 -0
  48. package/build/default/type/extract/index.js +17 -0
  49. package/build/default/type/function/function.js +15 -0
  50. package/build/default/type/function/index.js +17 -0
  51. package/build/default/type/guard/index.js +5 -0
  52. package/build/default/type/guard/type.js +412 -0
  53. package/build/default/type/guard/value.js +59 -0
  54. package/build/default/type/helpers/helpers.js +7 -0
  55. package/build/default/type/helpers/index.js +17 -0
  56. package/build/default/type/index.js +86 -0
  57. package/build/default/type/indexed/index.js +19 -0
  58. package/build/default/type/indexed/indexed-key.js +33 -0
  59. package/build/default/type/indexed/indexed-type.js +68 -0
  60. package/build/default/type/indexed/indexed.js +13 -0
  61. package/build/default/type/instance-type/index.js +17 -0
  62. package/build/default/type/instance-type/instance-type.js +8 -0
  63. package/build/default/type/integer/index.js +17 -0
  64. package/build/default/type/integer/integer.js +12 -0
  65. package/build/default/type/intersect/index.js +17 -0
  66. package/build/default/type/intersect/intersect.js +30 -0
  67. package/build/default/type/intrinsic/index.js +17 -0
  68. package/build/default/type/intrinsic/intrinsic.js +67 -0
  69. package/build/default/type/iterator/index.js +17 -0
  70. package/build/default/type/iterator/iterator.js +14 -0
  71. package/build/default/type/keyof/index.js +19 -0
  72. package/build/default/type/keyof/keyof-string.js +60 -0
  73. package/build/default/type/keyof/keyof-type.js +19 -0
  74. package/build/default/type/keyof/keyof.js +10 -0
  75. package/build/default/type/literal/index.js +17 -0
  76. package/build/default/type/literal/literal.js +13 -0
  77. package/build/default/type/mapped/index.js +17 -0
  78. package/build/default/type/mapped/mapped.js +18 -0
  79. package/build/default/type/modifiers/index.js +17 -0
  80. package/build/default/type/modifiers/modifiers.js +45 -0
  81. package/build/default/type/never/index.js +17 -0
  82. package/build/default/type/never/never.js +12 -0
  83. package/build/default/type/not/index.js +17 -0
  84. package/build/default/type/not/not.js +13 -0
  85. package/build/default/type/null/index.js +17 -0
  86. package/build/default/type/null/null.js +12 -0
  87. package/build/default/type/number/index.js +17 -0
  88. package/build/default/type/number/number.js +12 -0
  89. package/build/default/type/object/index.js +17 -0
  90. package/build/default/type/object/object.js +18 -0
  91. package/build/default/type/omit/index.js +17 -0
  92. package/build/default/type/omit/omit.js +40 -0
  93. package/build/default/type/operators/index.js +17 -0
  94. package/build/default/type/operators/operators.js +77 -0
  95. package/build/default/type/optional/index.js +17 -0
  96. package/build/default/type/optional/optional.js +9 -0
  97. package/build/default/type/parameters/index.js +17 -0
  98. package/build/default/type/parameters/parameters.js +9 -0
  99. package/build/default/type/partial/index.js +17 -0
  100. package/build/default/type/partial/partial.js +41 -0
  101. package/build/default/type/patterns/index.js +17 -0
  102. package/build/default/type/patterns/patterns.js +9 -0
  103. package/build/default/type/pick/index.js +17 -0
  104. package/build/default/type/pick/pick.js +36 -0
  105. package/build/default/type/promise/index.js +17 -0
  106. package/build/default/type/promise/promise.js +14 -0
  107. package/build/default/type/readonly/index.js +17 -0
  108. package/build/default/type/readonly/readonly.js +9 -0
  109. package/build/default/type/readonly-optional/index.js +17 -0
  110. package/build/default/type/readonly-optional/readonly-optional.js +9 -0
  111. package/build/default/type/record/index.js +17 -0
  112. package/build/default/type/record/record.js +56 -0
  113. package/build/default/type/recursive/index.js +17 -0
  114. package/build/default/type/recursive/recursive.js +19 -0
  115. package/build/default/type/ref/index.js +17 -0
  116. package/build/default/type/ref/ref.js +17 -0
  117. package/build/default/type/regexp/index.js +17 -0
  118. package/build/default/type/regexp/regexp.js +10 -0
  119. package/build/default/type/registry/format.js +28 -0
  120. package/build/default/type/registry/index.js +5 -0
  121. package/build/default/type/registry/type.js +28 -0
  122. package/build/default/type/required/index.js +17 -0
  123. package/build/default/type/required/required.js +40 -0
  124. package/build/default/type/rest/index.js +17 -0
  125. package/build/default/type/rest/rest.js +13 -0
  126. package/build/default/type/return-type/index.js +17 -0
  127. package/build/default/type/return-type/return-type.js +8 -0
  128. package/build/default/type/schema/anyschema.js +2 -0
  129. package/build/default/type/schema/index.js +18 -0
  130. package/build/default/type/schema/schema.js +3 -0
  131. package/build/default/type/static/index.js +17 -0
  132. package/build/default/type/static/static.js +2 -0
  133. package/build/default/type/strict/index.js +17 -0
  134. package/build/default/type/strict/strict.js +7 -0
  135. package/build/default/type/string/index.js +17 -0
  136. package/build/default/type/string/string.js +8 -0
  137. package/build/default/type/symbol/index.js +17 -0
  138. package/build/default/type/symbol/symbol.js +8 -0
  139. package/build/default/type/symbols/index.js +17 -0
  140. package/build/default/type/symbols/symbols.js +8 -0
  141. package/build/default/type/template-literal/finite.js +34 -0
  142. package/build/default/type/template-literal/generate.js +37 -0
  143. package/build/default/type/template-literal/index.js +23 -0
  144. package/build/default/type/template-literal/parser.js +131 -0
  145. package/build/default/type/template-literal/pattern.js +27 -0
  146. package/build/default/type/template-literal/syntax.js +52 -0
  147. package/build/default/type/template-literal/template-literal.js +14 -0
  148. package/build/default/type/template-literal/union.js +17 -0
  149. package/build/default/type/transform/index.js +17 -0
  150. package/build/default/type/transform/transform.js +40 -0
  151. package/build/default/type/tuple/index.js +17 -0
  152. package/build/default/type/tuple/tuple.js +12 -0
  153. package/build/default/type/type/index.js +10 -0
  154. package/build/default/type/type/javascript.js +75 -0
  155. package/build/default/type/type/json.js +175 -0
  156. package/build/default/type/type/type.js +123 -0
  157. package/build/default/type/uint8array/index.js +17 -0
  158. package/build/default/type/uint8array/uint8array.js +8 -0
  159. package/build/default/type/undefined/index.js +17 -0
  160. package/build/default/type/undefined/undefined.js +8 -0
  161. package/build/default/type/union/index.js +17 -0
  162. package/build/default/type/union/union.js +20 -0
  163. package/build/default/type/unknown/index.js +17 -0
  164. package/build/default/type/unknown/unknown.js +11 -0
  165. package/build/default/type/unsafe/index.js +17 -0
  166. package/build/default/type/unsafe/unsafe.js +11 -0
  167. package/build/default/type/void/index.js +17 -0
  168. package/build/default/type/void/void.js +12 -0
  169. package/build/default/value/cast/cast.js +208 -0
  170. package/build/default/value/cast/index.js +17 -0
  171. package/build/default/value/check/check.js +423 -0
  172. package/build/default/value/check/index.js +17 -0
  173. package/build/default/value/clean/clean.js +129 -0
  174. package/build/default/value/clean/index.js +17 -0
  175. package/build/default/value/clone/clone.js +34 -0
  176. package/build/default/value/clone/index.js +17 -0
  177. package/build/default/value/convert/convert.js +235 -0
  178. package/build/default/value/convert/index.js +17 -0
  179. package/build/default/value/create/create.js +463 -0
  180. package/build/default/value/create/index.js +17 -0
  181. package/build/default/value/default/default.js +129 -0
  182. package/build/default/value/default/index.js +17 -0
  183. package/build/default/value/delta/delta.js +157 -0
  184. package/build/default/value/delta/index.js +17 -0
  185. package/build/default/value/deref/deref.js +17 -0
  186. package/build/default/value/deref/index.js +17 -0
  187. package/build/default/value/equal/equal.js +43 -0
  188. package/build/default/value/equal/index.js +17 -0
  189. package/build/default/value/guard/guard.js +89 -0
  190. package/build/default/value/guard/index.js +17 -0
  191. package/build/default/value/hash/hash.js +131 -0
  192. package/build/default/value/hash/index.js +17 -0
  193. package/build/default/value/index.js +84 -0
  194. package/build/default/value/mutate/index.js +17 -0
  195. package/build/default/value/mutate/mutate.js +91 -0
  196. package/build/default/value/pointer/index.js +4 -0
  197. package/build/default/value/pointer/pointer.js +106 -0
  198. package/build/default/value/transform/decode.js +161 -0
  199. package/build/default/value/transform/encode.js +167 -0
  200. package/build/default/value/transform/has.js +103 -0
  201. package/build/default/value/transform/index.js +19 -0
  202. package/build/default/value/value/index.js +4 -0
  203. package/build/default/value/value/value.js +83 -0
  204. package/build/import/compiler/compiler.mjs +571 -0
  205. package/build/import/compiler/index.mjs +2 -0
  206. package/build/import/errors/errors.mjs +531 -0
  207. package/build/import/index.mjs +69 -0
  208. package/build/import/system/errors.mjs +150 -0
  209. package/build/import/system/index.mjs +4 -0
  210. package/build/import/system/policy.mjs +31 -0
  211. package/build/import/system/system.mjs +30 -0
  212. package/build/import/type/any/any.mjs +4 -0
  213. package/build/import/type/array/array.mjs +10 -0
  214. package/build/import/type/async-iterator/async-iterator.mjs +10 -0
  215. package/build/import/type/awaited/awaited.mjs +28 -0
  216. package/build/import/type/bigint/bigint.mjs +8 -0
  217. package/build/import/type/boolean/boolean.mjs +8 -0
  218. package/build/import/type/clone/type.mjs +7 -0
  219. package/build/import/type/clone/value.mjs +25 -0
  220. package/build/import/type/composite/composite.mjs +14 -0
  221. package/build/import/type/const/const.mjs +49 -0
  222. package/build/import/type/constructor/constructor.mjs +11 -0
  223. package/build/import/type/constructor-parameters/constructor-parameters.mjs +5 -0
  224. package/build/import/type/date/date.mjs +8 -0
  225. package/build/import/type/deref/deref.mjs +90 -0
  226. package/build/import/type/discard/discard.mjs +7 -0
  227. package/build/import/type/enum/enum.mjs +14 -0
  228. package/build/import/type/exclude/exclude.mjs +20 -0
  229. package/build/import/type/extends/extends-check.mjs +450 -0
  230. package/build/import/type/extends/extends-undefined.mjs +17 -0
  231. package/build/import/type/extends/extends.mjs +13 -0
  232. package/build/import/type/extract/extract.mjs +20 -0
  233. package/build/import/type/function/function.mjs +11 -0
  234. package/build/import/type/guard/type.mjs +366 -0
  235. package/build/import/type/guard/value.mjs +42 -0
  236. package/build/import/type/helpers/helpers.mjs +3 -0
  237. package/build/import/type/indexed/indexed-key.mjs +29 -0
  238. package/build/import/type/indexed/indexed-type.mjs +64 -0
  239. package/build/import/type/indexed/indexed.mjs +9 -0
  240. package/build/import/type/instance-type/instance-type.mjs +4 -0
  241. package/build/import/type/integer/integer.mjs +8 -0
  242. package/build/import/type/intersect/intersect.mjs +25 -0
  243. package/build/import/type/intrinsic/intrinsic.mjs +59 -0
  244. package/build/import/type/iterator/iterator.mjs +10 -0
  245. package/build/import/type/keyof/keyof-string.mjs +55 -0
  246. package/build/import/type/keyof/keyof-type.mjs +15 -0
  247. package/build/import/type/keyof/keyof.mjs +6 -0
  248. package/build/import/type/literal/literal.mjs +9 -0
  249. package/build/import/type/mapped/mapped.mjs +14 -0
  250. package/build/import/type/modifiers/modifiers.mjs +40 -0
  251. package/build/import/type/never/never.mjs +8 -0
  252. package/build/import/type/not/not.mjs +9 -0
  253. package/build/import/type/null/null.mjs +8 -0
  254. package/build/import/type/number/number.mjs +8 -0
  255. package/build/import/type/object/object.mjs +14 -0
  256. package/build/import/type/omit/omit.mjs +35 -0
  257. package/build/import/type/operators/operators.mjs +66 -0
  258. package/build/import/type/optional/optional.mjs +5 -0
  259. package/build/import/type/parameters/parameters.mjs +5 -0
  260. package/build/import/type/partial/partial.mjs +36 -0
  261. package/build/import/type/patterns/patterns.mjs +6 -0
  262. package/build/import/type/pick/pick.mjs +31 -0
  263. package/build/import/type/promise/promise.mjs +10 -0
  264. package/build/import/type/readonly/readonly.mjs +5 -0
  265. package/build/import/type/readonly-optional/readonly-optional.mjs +5 -0
  266. package/build/import/type/record/record.mjs +51 -0
  267. package/build/import/type/recursive/recursive.mjs +15 -0
  268. package/build/import/type/ref/ref.mjs +13 -0
  269. package/build/import/type/regexp/regexp.mjs +6 -0
  270. package/build/import/type/registry/format.mjs +19 -0
  271. package/build/import/type/registry/type.mjs +19 -0
  272. package/build/import/type/required/required.mjs +35 -0
  273. package/build/import/type/rest/rest.mjs +8 -0
  274. package/build/import/type/return-type/return-type.mjs +4 -0
  275. package/build/import/type/schema/anyschema.mjs +1 -0
  276. package/build/import/type/schema/schema.mjs +1 -0
  277. package/build/import/type/static/static.mjs +1 -0
  278. package/build/import/type/strict/strict.mjs +3 -0
  279. package/build/import/type/string/string.mjs +4 -0
  280. package/build/import/type/symbol/symbol.mjs +4 -0
  281. package/build/import/type/symbols/symbols.mjs +5 -0
  282. package/build/import/type/template-literal/finite.mjs +29 -0
  283. package/build/import/type/template-literal/generate.mjs +32 -0
  284. package/build/import/type/template-literal/parser.mjs +125 -0
  285. package/build/import/type/template-literal/pattern.mjs +22 -0
  286. package/build/import/type/template-literal/syntax.mjs +48 -0
  287. package/build/import/type/template-literal/template-literal.mjs +10 -0
  288. package/build/import/type/template-literal/union.mjs +13 -0
  289. package/build/import/type/transform/transform.mjs +37 -0
  290. package/build/import/type/tuple/tuple.mjs +8 -0
  291. package/build/import/type/type/index.mjs +6 -0
  292. package/build/import/type/type/javascript.mjs +71 -0
  293. package/build/import/type/type/json.mjs +171 -0
  294. package/build/import/type/uint8array/uint8array.mjs +4 -0
  295. package/build/import/type/undefined/undefined.mjs +4 -0
  296. package/build/import/type/union/union.mjs +15 -0
  297. package/build/import/type/unknown/unknown.mjs +7 -0
  298. package/build/import/type/unsafe/unsafe.mjs +7 -0
  299. package/build/import/type/void/void.mjs +8 -0
  300. package/build/import/value/cast/cast.mjs +205 -0
  301. package/build/import/value/check/check.mjs +419 -0
  302. package/build/import/value/clean/clean.mjs +125 -0
  303. package/build/import/value/clone/clone.mjs +30 -0
  304. package/build/import/value/convert/convert.mjs +231 -0
  305. package/build/import/value/create/create.mjs +460 -0
  306. package/build/import/value/default/default.mjs +125 -0
  307. package/build/import/value/delta/delta.mjs +152 -0
  308. package/build/import/value/deref/deref.mjs +13 -0
  309. package/build/import/value/equal/equal.mjs +39 -0
  310. package/build/import/value/guard/guard.mjs +66 -0
  311. package/build/import/value/hash/hash.mjs +127 -0
  312. package/build/import/value/index.mjs +18 -0
  313. package/build/import/value/mutate/mutate.mjs +85 -0
  314. package/build/import/value/pointer/pointer.mjs +101 -0
  315. package/build/import/value/transform/decode.mjs +160 -0
  316. package/build/import/value/transform/encode.mjs +166 -0
  317. package/build/import/value/transform/has.mjs +99 -0
  318. package/build/import/value/value/value.mjs +65 -0
  319. package/build/types/compiler/compiler.d.ts +41 -0
  320. package/build/types/compiler/index.d.ts +2 -0
  321. package/build/types/errors/errors.d.ts +86 -0
  322. package/build/types/errors/index.d.ts +1 -0
  323. package/build/types/index.d.ts +71 -0
  324. package/build/types/system/errors.d.ts +9 -0
  325. package/build/types/system/index.d.ts +4 -0
  326. package/build/types/system/policy.d.ts +11 -0
  327. package/build/types/system/system.d.ts +10 -0
  328. package/build/types/type/any/any.d.ts +7 -0
  329. package/build/types/type/any/index.d.ts +1 -0
  330. package/build/types/type/array/array.d.ts +18 -0
  331. package/build/types/type/array/index.d.ts +1 -0
  332. package/build/types/type/async-iterator/async-iterator.d.ts +10 -0
  333. package/build/types/type/async-iterator/index.d.ts +1 -0
  334. package/build/types/type/awaited/awaited.d.ts +11 -0
  335. package/build/types/type/awaited/index.d.ts +1 -0
  336. package/build/types/type/bigint/bigint.d.ts +15 -0
  337. package/build/types/type/bigint/index.d.ts +1 -0
  338. package/build/types/type/boolean/boolean.d.ts +8 -0
  339. package/build/types/type/boolean/index.d.ts +1 -0
  340. package/build/types/type/clone/index.d.ts +2 -0
  341. package/build/types/type/clone/type.d.ts +3 -0
  342. package/build/types/type/clone/value.d.ts +1 -0
  343. package/build/types/type/composite/composite.d.ts +14 -0
  344. package/build/types/type/composite/index.d.ts +1 -0
  345. package/build/types/type/const/const.d.ts +29 -0
  346. package/build/types/type/const/index.d.ts +1 -0
  347. package/build/types/type/constructor/constructor.d.ts +16 -0
  348. package/build/types/type/constructor/index.d.ts +1 -0
  349. package/build/types/type/constructor-parameters/constructor-parameters.d.ts +6 -0
  350. package/build/types/type/constructor-parameters/index.d.ts +1 -0
  351. package/build/types/type/date/date.d.ts +15 -0
  352. package/build/types/type/date/index.d.ts +1 -0
  353. package/build/types/type/deref/deref.d.ts +23 -0
  354. package/build/types/type/deref/index.d.ts +1 -0
  355. package/build/types/type/discard/index.d.ts +1 -0
  356. package/build/types/type/enum/enum.d.ts +13 -0
  357. package/build/types/type/enum/index.d.ts +1 -0
  358. package/build/types/type/exclude/exclude.d.ts +20 -0
  359. package/build/types/type/exclude/index.d.ts +1 -0
  360. package/build/types/type/extends/extends-check.d.ts +9 -0
  361. package/build/types/type/extends/extends-undefined.d.ts +2 -0
  362. package/build/types/type/extends/extends.d.ts +8 -0
  363. package/build/types/type/extends/index.d.ts +3 -0
  364. package/build/types/type/extract/extract.d.ts +19 -0
  365. package/build/types/type/extract/index.d.ts +1 -0
  366. package/build/types/type/function/function.d.ts +16 -0
  367. package/build/types/type/function/index.d.ts +1 -0
  368. package/build/types/type/guard/index.d.ts +2 -0
  369. package/build/types/type/guard/type.d.ts +88 -0
  370. package/build/types/type/guard/value.d.ts +14 -0
  371. package/build/types/type/helpers/helpers.d.ts +41 -0
  372. package/build/types/type/helpers/index.d.ts +1 -0
  373. package/build/types/type/index.d.ts +70 -0
  374. package/build/types/type/indexed/index.d.ts +3 -0
  375. package/build/types/type/indexed/indexed-key.d.ts +16 -0
  376. package/build/types/type/indexed/indexed-type.d.ts +33 -0
  377. package/build/types/type/indexed/indexed.d.ts +6 -0
  378. package/build/types/type/instance-type/index.d.ts +1 -0
  379. package/build/types/type/instance-type/instance-type.d.ts +4 -0
  380. package/build/types/type/integer/index.d.ts +1 -0
  381. package/build/types/type/integer/integer.d.ts +15 -0
  382. package/build/types/type/intersect/index.d.ts +1 -0
  383. package/build/types/type/intersect/intersect.d.ts +21 -0
  384. package/build/types/type/intrinsic/index.d.ts +1 -0
  385. package/build/types/type/intrinsic/intrinsic.d.ts +22 -0
  386. package/build/types/type/iterator/index.d.ts +1 -0
  387. package/build/types/type/iterator/iterator.d.ts +10 -0
  388. package/build/types/type/keyof/index.d.ts +3 -0
  389. package/build/types/type/keyof/keyof-string.d.ts +28 -0
  390. package/build/types/type/keyof/keyof-type.d.ts +11 -0
  391. package/build/types/type/keyof/keyof.d.ts +4 -0
  392. package/build/types/type/literal/index.d.ts +1 -0
  393. package/build/types/type/literal/literal.d.ts +9 -0
  394. package/build/types/type/mapped/index.d.ts +1 -0
  395. package/build/types/type/mapped/mapped.d.ts +24 -0
  396. package/build/types/type/modifiers/index.d.ts +1 -0
  397. package/build/types/type/modifiers/modifiers.d.ts +18 -0
  398. package/build/types/type/never/index.d.ts +1 -0
  399. package/build/types/type/never/never.d.ts +8 -0
  400. package/build/types/type/not/index.d.ts +1 -0
  401. package/build/types/type/not/not.d.ts +9 -0
  402. package/build/types/type/null/index.d.ts +1 -0
  403. package/build/types/type/null/null.d.ts +8 -0
  404. package/build/types/type/number/index.d.ts +1 -0
  405. package/build/types/type/number/number.d.ts +15 -0
  406. package/build/types/type/object/index.d.ts +1 -0
  407. package/build/types/type/object/object.d.ts +39 -0
  408. package/build/types/type/omit/index.d.ts +1 -0
  409. package/build/types/type/omit/omit.d.ts +19 -0
  410. package/build/types/type/operators/index.d.ts +1 -0
  411. package/build/types/type/operators/operators.d.ts +16 -0
  412. package/build/types/type/optional/index.d.ts +1 -0
  413. package/build/types/type/optional/optional.d.ts +6 -0
  414. package/build/types/type/parameters/index.d.ts +1 -0
  415. package/build/types/type/parameters/parameters.d.ts +6 -0
  416. package/build/types/type/partial/index.d.ts +1 -0
  417. package/build/types/type/partial/partial.d.ts +22 -0
  418. package/build/types/type/patterns/index.d.ts +1 -0
  419. package/build/types/type/pick/index.d.ts +1 -0
  420. package/build/types/type/pick/pick.d.ts +19 -0
  421. package/build/types/type/promise/index.d.ts +1 -0
  422. package/build/types/type/promise/promise.d.ts +10 -0
  423. package/build/types/type/readonly/index.d.ts +1 -0
  424. package/build/types/type/readonly/readonly.d.ts +6 -0
  425. package/build/types/type/readonly-optional/index.d.ts +1 -0
  426. package/build/types/type/readonly-optional/readonly-optional.d.ts +5 -0
  427. package/build/types/type/record/index.d.ts +1 -0
  428. package/build/types/type/record/record.d.ts +54 -0
  429. package/build/types/type/recursive/index.d.ts +1 -0
  430. package/build/types/type/recursive/recursive.d.ts +14 -0
  431. package/build/types/type/ref/index.d.ts +1 -0
  432. package/build/types/type/ref/ref.d.ts +10 -0
  433. package/build/types/type/regexp/index.d.ts +1 -0
  434. package/build/types/type/regexp/regexp.d.ts +5 -0
  435. package/build/types/type/registry/format.d.ts +7 -0
  436. package/build/types/type/registry/index.d.ts +2 -0
  437. package/build/types/type/registry/type.d.ts +7 -0
  438. package/build/types/type/required/index.d.ts +1 -0
  439. package/build/types/type/required/required.d.ts +22 -0
  440. package/build/types/type/rest/index.d.ts +1 -0
  441. package/build/types/type/rest/rest.d.ts +9 -0
  442. package/build/types/type/return-type/index.d.ts +1 -0
  443. package/build/types/type/return-type/return-type.d.ts +4 -0
  444. package/build/types/type/schema/anyschema.d.ts +32 -0
  445. package/build/types/type/schema/index.d.ts +2 -0
  446. package/build/types/type/schema/schema.d.ts +22 -0
  447. package/build/types/type/static/index.d.ts +1 -0
  448. package/build/types/type/static/static.d.ts +31 -0
  449. package/build/types/type/strict/index.d.ts +1 -0
  450. package/build/types/type/strict/strict.d.ts +2 -0
  451. package/build/types/type/string/index.d.ts +1 -0
  452. package/build/types/type/string/string.d.ts +18 -0
  453. package/build/types/type/symbol/index.d.ts +1 -0
  454. package/build/types/type/symbol/symbol.d.ts +9 -0
  455. package/build/types/type/symbols/index.d.ts +1 -0
  456. package/build/types/type/symbols/symbols.d.ts +5 -0
  457. package/build/types/type/template-literal/finite.d.ts +16 -0
  458. package/build/types/type/template-literal/generate.d.ts +15 -0
  459. package/build/types/type/template-literal/index.d.ts +7 -0
  460. package/build/types/type/template-literal/parser.d.ts +17 -0
  461. package/build/types/type/template-literal/pattern.d.ts +4 -0
  462. package/build/types/type/template-literal/syntax.d.ts +19 -0
  463. package/build/types/type/template-literal/template-literal.d.ts +28 -0
  464. package/build/types/type/template-literal/union.d.ts +6 -0
  465. package/build/types/type/transform/index.d.ts +1 -0
  466. package/build/types/type/transform/transform.d.ts +28 -0
  467. package/build/types/type/tuple/index.d.ts +1 -0
  468. package/build/types/type/tuple/tuple.d.ts +14 -0
  469. package/build/types/type/type/index.d.ts +5 -0
  470. package/build/types/type/type/javascript.d.ts +39 -0
  471. package/build/types/type/type/json.d.ts +90 -0
  472. package/build/types/type/type/type.d.ts +58 -0
  473. package/build/types/type/uint8array/index.d.ts +1 -0
  474. package/build/types/type/uint8array/uint8array.d.ts +12 -0
  475. package/build/types/type/undefined/index.d.ts +1 -0
  476. package/build/types/type/undefined/undefined.d.ts +8 -0
  477. package/build/types/type/union/index.d.ts +1 -0
  478. package/build/types/type/union/union.d.ts +15 -0
  479. package/build/types/type/unknown/index.d.ts +1 -0
  480. package/build/types/type/unknown/unknown.d.ts +7 -0
  481. package/build/types/type/unsafe/index.d.ts +1 -0
  482. package/build/types/type/unsafe/unsafe.d.ts +10 -0
  483. package/build/types/type/void/index.d.ts +1 -0
  484. package/build/types/type/void/void.d.ts +8 -0
  485. package/build/types/value/cast/cast.d.ts +21 -0
  486. package/build/types/value/cast/index.d.ts +1 -0
  487. package/build/types/value/check/check.d.ts +8 -0
  488. package/build/types/value/check/index.d.ts +1 -0
  489. package/build/types/value/clean/clean.d.ts +3 -0
  490. package/build/types/value/clean/index.d.ts +1 -0
  491. package/build/types/value/clone/clone.d.ts +1 -0
  492. package/build/types/value/clone/index.d.ts +1 -0
  493. package/build/types/value/convert/convert.d.ts +7 -0
  494. package/build/types/value/convert/index.d.ts +1 -0
  495. package/build/types/value/create/create.d.ts +29 -0
  496. package/build/types/value/create/index.d.ts +1 -0
  497. package/build/types/value/default/default.d.ts +3 -0
  498. package/build/types/value/default/index.d.ts +1 -0
  499. package/build/types/value/delta/delta.d.ts +41 -0
  500. package/build/types/value/delta/index.d.ts +1 -0
  501. package/build/types/value/deref/deref.d.ts +8 -0
  502. package/build/types/value/deref/index.d.ts +1 -0
  503. package/build/types/value/equal/equal.d.ts +1 -0
  504. package/build/types/value/equal/index.d.ts +1 -0
  505. package/build/types/value/guard/guard.d.ts +24 -0
  506. package/build/types/value/guard/index.d.ts +1 -0
  507. package/build/types/value/hash/hash.d.ts +5 -0
  508. package/build/types/value/hash/index.d.ts +1 -0
  509. package/build/types/value/index.d.ts +18 -0
  510. package/build/types/value/mutate/index.d.ts +1 -0
  511. package/build/types/value/mutate/mutate.d.ts +10 -0
  512. package/build/types/value/pointer/index.d.ts +1 -0
  513. package/build/types/value/pointer/pointer.d.ts +16 -0
  514. package/build/types/value/transform/decode.d.ts +14 -0
  515. package/build/types/value/transform/encode.d.ts +14 -0
  516. package/build/types/value/transform/has.d.ts +2 -0
  517. package/build/types/value/transform/index.d.ts +3 -0
  518. package/build/types/value/value/index.d.ts +1 -0
  519. package/build/types/value/value/value.d.ts +29 -0
  520. package/compiler/package.json +4 -0
  521. package/errors/package.json +4 -0
  522. package/package.json +52 -80
  523. package/readme.md +8 -7
  524. package/system/package.json +4 -0
  525. package/type/package.json +4 -0
  526. package/value/package.json +4 -0
  527. package/cjs/compiler/compiler.js +0 -657
  528. package/cjs/compiler/index.js +0 -48
  529. package/cjs/errors/errors.js +0 -588
  530. package/cjs/errors/index.js +0 -44
  531. package/cjs/index.js +0 -205
  532. package/cjs/system/errors.js +0 -192
  533. package/cjs/system/index.js +0 -41
  534. package/cjs/system/policy.js +0 -74
  535. package/cjs/system/system.js +0 -71
  536. package/cjs/type/any/any.js +0 -36
  537. package/cjs/type/any/index.js +0 -44
  538. package/cjs/type/array/array.js +0 -42
  539. package/cjs/type/array/index.js +0 -44
  540. package/cjs/type/async-iterator/async-iterator.js +0 -42
  541. package/cjs/type/async-iterator/index.js +0 -44
  542. package/cjs/type/awaited/awaited.js +0 -66
  543. package/cjs/type/awaited/index.js +0 -44
  544. package/cjs/type/bigint/bigint.js +0 -40
  545. package/cjs/type/bigint/index.js +0 -44
  546. package/cjs/type/boolean/boolean.js +0 -40
  547. package/cjs/type/boolean/index.js +0 -44
  548. package/cjs/type/clone/index.js +0 -32
  549. package/cjs/type/clone/type.js +0 -41
  550. package/cjs/type/clone/value.js +0 -58
  551. package/cjs/type/composite/composite.js +0 -47
  552. package/cjs/type/composite/index.js +0 -44
  553. package/cjs/type/const/const.js +0 -84
  554. package/cjs/type/const/index.js +0 -44
  555. package/cjs/type/constructor/constructor.js +0 -43
  556. package/cjs/type/constructor/index.js +0 -44
  557. package/cjs/type/constructor-parameters/constructor-parameters.js +0 -37
  558. package/cjs/type/constructor-parameters/index.js +0 -44
  559. package/cjs/type/date/date.js +0 -40
  560. package/cjs/type/date/index.js +0 -44
  561. package/cjs/type/deref/deref.js +0 -136
  562. package/cjs/type/deref/index.js +0 -44
  563. package/cjs/type/discard/discard.js +0 -38
  564. package/cjs/type/discard/index.js +0 -44
  565. package/cjs/type/enum/enum.js +0 -46
  566. package/cjs/type/enum/index.js +0 -44
  567. package/cjs/type/exclude/exclude.js +0 -54
  568. package/cjs/type/exclude/index.js +0 -44
  569. package/cjs/type/extends/extends-check.js +0 -654
  570. package/cjs/type/extends/extends-undefined.js +0 -51
  571. package/cjs/type/extends/extends.js +0 -47
  572. package/cjs/type/extends/index.js +0 -46
  573. package/cjs/type/extract/extract.js +0 -54
  574. package/cjs/type/extract/index.js +0 -44
  575. package/cjs/type/function/function.js +0 -43
  576. package/cjs/type/function/index.js +0 -44
  577. package/cjs/type/guard/index.js +0 -32
  578. package/cjs/type/guard/type.js +0 -515
  579. package/cjs/type/guard/value.js +0 -100
  580. package/cjs/type/helpers/helpers.js +0 -35
  581. package/cjs/type/helpers/index.js +0 -44
  582. package/cjs/type/index.js +0 -113
  583. package/cjs/type/indexed/index.js +0 -46
  584. package/cjs/type/indexed/indexed-key.js +0 -65
  585. package/cjs/type/indexed/indexed-type.js +0 -106
  586. package/cjs/type/indexed/indexed.js +0 -41
  587. package/cjs/type/instance-type/index.js +0 -44
  588. package/cjs/type/instance-type/instance-type.js +0 -36
  589. package/cjs/type/integer/index.js +0 -44
  590. package/cjs/type/integer/integer.js +0 -40
  591. package/cjs/type/intersect/index.js +0 -44
  592. package/cjs/type/intersect/intersect.js +0 -59
  593. package/cjs/type/intrinsic/index.js +0 -44
  594. package/cjs/type/intrinsic/intrinsic.js +0 -106
  595. package/cjs/type/iterator/index.js +0 -44
  596. package/cjs/type/iterator/iterator.js +0 -42
  597. package/cjs/type/keyof/index.js +0 -46
  598. package/cjs/type/keyof/keyof-string.js +0 -103
  599. package/cjs/type/keyof/keyof-type.js +0 -48
  600. package/cjs/type/keyof/keyof.js +0 -38
  601. package/cjs/type/literal/index.js +0 -44
  602. package/cjs/type/literal/literal.js +0 -41
  603. package/cjs/type/mapped/index.js +0 -44
  604. package/cjs/type/mapped/mapped.js +0 -47
  605. package/cjs/type/modifiers/index.js +0 -44
  606. package/cjs/type/modifiers/modifiers.js +0 -78
  607. package/cjs/type/never/index.js +0 -44
  608. package/cjs/type/never/never.js +0 -40
  609. package/cjs/type/not/index.js +0 -44
  610. package/cjs/type/not/not.js +0 -41
  611. package/cjs/type/null/index.js +0 -44
  612. package/cjs/type/null/null.js +0 -40
  613. package/cjs/type/number/index.js +0 -44
  614. package/cjs/type/number/number.js +0 -40
  615. package/cjs/type/object/index.js +0 -44
  616. package/cjs/type/object/object.js +0 -47
  617. package/cjs/type/omit/index.js +0 -44
  618. package/cjs/type/omit/omit.js +0 -75
  619. package/cjs/type/operators/index.js +0 -44
  620. package/cjs/type/operators/operators.js +0 -119
  621. package/cjs/type/optional/index.js +0 -44
  622. package/cjs/type/optional/optional.js +0 -37
  623. package/cjs/type/parameters/index.js +0 -44
  624. package/cjs/type/parameters/parameters.js +0 -37
  625. package/cjs/type/partial/index.js +0 -44
  626. package/cjs/type/partial/partial.js +0 -73
  627. package/cjs/type/patterns/index.js +0 -44
  628. package/cjs/type/patterns/patterns.js +0 -36
  629. package/cjs/type/pick/index.js +0 -44
  630. package/cjs/type/pick/pick.js +0 -66
  631. package/cjs/type/promise/index.js +0 -44
  632. package/cjs/type/promise/promise.js +0 -42
  633. package/cjs/type/readonly/index.js +0 -44
  634. package/cjs/type/readonly/readonly.js +0 -37
  635. package/cjs/type/readonly-optional/index.js +0 -44
  636. package/cjs/type/readonly-optional/readonly-optional.js +0 -37
  637. package/cjs/type/record/index.js +0 -44
  638. package/cjs/type/record/record.js +0 -97
  639. package/cjs/type/recursive/index.js +0 -44
  640. package/cjs/type/recursive/recursive.js +0 -48
  641. package/cjs/type/ref/index.js +0 -44
  642. package/cjs/type/ref/ref.js +0 -45
  643. package/cjs/type/regexp/index.js +0 -44
  644. package/cjs/type/regexp/regexp.js +0 -38
  645. package/cjs/type/registry/format.js +0 -62
  646. package/cjs/type/registry/index.js +0 -32
  647. package/cjs/type/registry/type.js +0 -62
  648. package/cjs/type/required/index.js +0 -44
  649. package/cjs/type/required/required.js +0 -72
  650. package/cjs/type/rest/index.js +0 -44
  651. package/cjs/type/rest/rest.js +0 -41
  652. package/cjs/type/return-type/index.js +0 -44
  653. package/cjs/type/return-type/return-type.js +0 -36
  654. package/cjs/type/schema/anyschema.js +0 -29
  655. package/cjs/type/schema/index.js +0 -45
  656. package/cjs/type/schema/schema.js +0 -30
  657. package/cjs/type/static/index.js +0 -44
  658. package/cjs/type/static/static.js +0 -29
  659. package/cjs/type/strict/index.js +0 -44
  660. package/cjs/type/strict/strict.js +0 -35
  661. package/cjs/type/string/index.js +0 -44
  662. package/cjs/type/string/string.js +0 -36
  663. package/cjs/type/symbol/index.js +0 -44
  664. package/cjs/type/symbol/symbol.js +0 -36
  665. package/cjs/type/symbols/index.js +0 -44
  666. package/cjs/type/symbols/symbols.js +0 -40
  667. package/cjs/type/template-literal/finite.js +0 -71
  668. package/cjs/type/template-literal/generate.js +0 -74
  669. package/cjs/type/template-literal/index.js +0 -50
  670. package/cjs/type/template-literal/parser.js +0 -175
  671. package/cjs/type/template-literal/pattern.js +0 -61
  672. package/cjs/type/template-literal/syntax.js +0 -87
  673. package/cjs/type/template-literal/template-literal.js +0 -43
  674. package/cjs/type/template-literal/union.js +0 -48
  675. package/cjs/type/transform/index.js +0 -44
  676. package/cjs/type/transform/transform.js +0 -72
  677. package/cjs/type/tuple/index.js +0 -44
  678. package/cjs/type/tuple/tuple.js +0 -42
  679. package/cjs/type/type/index.js +0 -44
  680. package/cjs/type/type/javascript.js +0 -120
  681. package/cjs/type/type/json.js +0 -255
  682. package/cjs/type/type/type.js +0 -153
  683. package/cjs/type/uint8array/index.js +0 -44
  684. package/cjs/type/uint8array/uint8array.js +0 -36
  685. package/cjs/type/undefined/index.js +0 -44
  686. package/cjs/type/undefined/undefined.js +0 -36
  687. package/cjs/type/union/index.js +0 -44
  688. package/cjs/type/union/union.js +0 -50
  689. package/cjs/type/unknown/index.js +0 -44
  690. package/cjs/type/unknown/unknown.js +0 -39
  691. package/cjs/type/unsafe/index.js +0 -44
  692. package/cjs/type/unsafe/unsafe.js +0 -39
  693. package/cjs/type/void/index.js +0 -44
  694. package/cjs/type/void/void.js +0 -40
  695. package/cjs/value/cast/cast.js +0 -263
  696. package/cjs/value/cast/index.js +0 -44
  697. package/cjs/value/check/check.js +0 -468
  698. package/cjs/value/check/index.js +0 -44
  699. package/cjs/value/clean/clean.js +0 -167
  700. package/cjs/value/clean/index.js +0 -44
  701. package/cjs/value/clone/clone.js +0 -68
  702. package/cjs/value/clone/index.js +0 -44
  703. package/cjs/value/convert/convert.js +0 -291
  704. package/cjs/value/convert/index.js +0 -44
  705. package/cjs/value/create/create.js +0 -507
  706. package/cjs/value/create/index.js +0 -44
  707. package/cjs/value/default/default.js +0 -175
  708. package/cjs/value/default/index.js +0 -44
  709. package/cjs/value/delta/delta.js +0 -199
  710. package/cjs/value/delta/index.js +0 -44
  711. package/cjs/value/deref/deref.js +0 -45
  712. package/cjs/value/deref/index.js +0 -44
  713. package/cjs/value/equal/equal.js +0 -77
  714. package/cjs/value/equal/index.js +0 -44
  715. package/cjs/value/guard/guard.js +0 -146
  716. package/cjs/value/guard/index.js +0 -44
  717. package/cjs/value/hash/hash.js +0 -177
  718. package/cjs/value/hash/index.js +0 -44
  719. package/cjs/value/index.js +0 -123
  720. package/cjs/value/mutate/index.js +0 -44
  721. package/cjs/value/mutate/mutate.js +0 -129
  722. package/cjs/value/pointer/index.js +0 -31
  723. package/cjs/value/pointer/pointer.js +0 -151
  724. package/cjs/value/transform/decode.js +0 -211
  725. package/cjs/value/transform/encode.js +0 -219
  726. package/cjs/value/transform/has.js +0 -146
  727. package/cjs/value/transform/index.js +0 -46
  728. package/cjs/value/value/index.js +0 -31
  729. package/cjs/value/value/value.js +0 -125
  730. package/esm/compiler/compiler.d.mts +0 -56
  731. package/esm/compiler/compiler.mjs +0 -658
  732. package/esm/compiler/index.d.mts +0 -2
  733. package/esm/compiler/index.mjs +0 -29
  734. package/esm/errors/errors.d.mts +0 -89
  735. package/esm/errors/errors.mjs +0 -583
  736. package/esm/errors/index.mjs +0 -28
  737. package/esm/index.d.mts +0 -71
  738. package/esm/index.mjs +0 -105
  739. package/esm/system/errors.d.mts +0 -14
  740. package/esm/system/errors.mjs +0 -188
  741. package/esm/system/index.d.mts +0 -4
  742. package/esm/system/index.mjs +0 -31
  743. package/esm/system/policy.d.mts +0 -21
  744. package/esm/system/policy.mjs +0 -71
  745. package/esm/system/system.d.mts +0 -13
  746. package/esm/system/system.mjs +0 -66
  747. package/esm/type/any/any.d.mts +0 -8
  748. package/esm/type/any/any.mjs +0 -32
  749. package/esm/type/any/index.mjs +0 -28
  750. package/esm/type/array/array.d.mts +0 -25
  751. package/esm/type/array/array.mjs +0 -38
  752. package/esm/type/array/index.mjs +0 -28
  753. package/esm/type/async-iterator/async-iterator.d.mts +0 -11
  754. package/esm/type/async-iterator/async-iterator.mjs +0 -38
  755. package/esm/type/async-iterator/index.mjs +0 -28
  756. package/esm/type/awaited/awaited.d.mts +0 -12
  757. package/esm/type/awaited/awaited.mjs +0 -61
  758. package/esm/type/awaited/index.mjs +0 -28
  759. package/esm/type/bigint/bigint.d.mts +0 -16
  760. package/esm/type/bigint/bigint.mjs +0 -36
  761. package/esm/type/bigint/index.mjs +0 -28
  762. package/esm/type/boolean/boolean.d.mts +0 -9
  763. package/esm/type/boolean/boolean.mjs +0 -36
  764. package/esm/type/boolean/index.mjs +0 -28
  765. package/esm/type/clone/index.mjs +0 -29
  766. package/esm/type/clone/type.d.mts +0 -5
  767. package/esm/type/clone/type.mjs +0 -36
  768. package/esm/type/clone/value.d.mts +0 -2
  769. package/esm/type/clone/value.mjs +0 -54
  770. package/esm/type/composite/composite.d.mts +0 -15
  771. package/esm/type/composite/composite.mjs +0 -42
  772. package/esm/type/composite/index.mjs +0 -28
  773. package/esm/type/const/const.d.mts +0 -30
  774. package/esm/type/const/const.mjs +0 -80
  775. package/esm/type/const/index.mjs +0 -28
  776. package/esm/type/constructor/constructor.d.mts +0 -17
  777. package/esm/type/constructor/constructor.mjs +0 -39
  778. package/esm/type/constructor/index.mjs +0 -28
  779. package/esm/type/constructor-parameters/constructor-parameters.d.mts +0 -7
  780. package/esm/type/constructor-parameters/constructor-parameters.mjs +0 -33
  781. package/esm/type/constructor-parameters/index.mjs +0 -28
  782. package/esm/type/date/date.d.mts +0 -21
  783. package/esm/type/date/date.mjs +0 -36
  784. package/esm/type/date/index.mjs +0 -28
  785. package/esm/type/deref/deref.d.mts +0 -24
  786. package/esm/type/deref/deref.mjs +0 -131
  787. package/esm/type/deref/index.mjs +0 -28
  788. package/esm/type/discard/discard.mjs +0 -34
  789. package/esm/type/discard/index.mjs +0 -28
  790. package/esm/type/enum/enum.d.mts +0 -14
  791. package/esm/type/enum/enum.mjs +0 -42
  792. package/esm/type/enum/index.mjs +0 -28
  793. package/esm/type/exclude/exclude.d.mts +0 -21
  794. package/esm/type/exclude/exclude.mjs +0 -49
  795. package/esm/type/exclude/index.mjs +0 -28
  796. package/esm/type/extends/extends-check.d.mts +0 -9
  797. package/esm/type/extends/extends-check.mjs +0 -649
  798. package/esm/type/extends/extends-undefined.d.mts +0 -3
  799. package/esm/type/extends/extends-undefined.mjs +0 -47
  800. package/esm/type/extends/extends.d.mts +0 -9
  801. package/esm/type/extends/extends.mjs +0 -42
  802. package/esm/type/extends/index.mjs +0 -30
  803. package/esm/type/extract/extract.d.mts +0 -20
  804. package/esm/type/extract/extract.mjs +0 -49
  805. package/esm/type/extract/index.mjs +0 -28
  806. package/esm/type/function/function.d.mts +0 -17
  807. package/esm/type/function/function.mjs +0 -39
  808. package/esm/type/function/index.mjs +0 -28
  809. package/esm/type/guard/index.mjs +0 -29
  810. package/esm/type/guard/type.d.mts +0 -130
  811. package/esm/type/guard/type.mjs +0 -469
  812. package/esm/type/guard/value.d.mts +0 -28
  813. package/esm/type/guard/value.mjs +0 -83
  814. package/esm/type/helpers/helpers.d.mts +0 -42
  815. package/esm/type/helpers/helpers.mjs +0 -31
  816. package/esm/type/helpers/index.mjs +0 -28
  817. package/esm/type/index.mjs +0 -97
  818. package/esm/type/indexed/index.mjs +0 -30
  819. package/esm/type/indexed/indexed-key.d.mts +0 -17
  820. package/esm/type/indexed/indexed-key.mjs +0 -61
  821. package/esm/type/indexed/indexed-type.d.mts +0 -33
  822. package/esm/type/indexed/indexed-type.mjs +0 -102
  823. package/esm/type/indexed/indexed.d.mts +0 -8
  824. package/esm/type/indexed/indexed.mjs +0 -37
  825. package/esm/type/instance-type/index.mjs +0 -28
  826. package/esm/type/instance-type/instance-type.d.mts +0 -5
  827. package/esm/type/instance-type/instance-type.mjs +0 -32
  828. package/esm/type/integer/index.mjs +0 -28
  829. package/esm/type/integer/integer.d.mts +0 -16
  830. package/esm/type/integer/integer.mjs +0 -36
  831. package/esm/type/intersect/index.mjs +0 -28
  832. package/esm/type/intersect/intersect.d.mts +0 -22
  833. package/esm/type/intersect/intersect.mjs +0 -54
  834. package/esm/type/intrinsic/index.mjs +0 -28
  835. package/esm/type/intrinsic/intrinsic.d.mts +0 -27
  836. package/esm/type/intrinsic/intrinsic.mjs +0 -98
  837. package/esm/type/iterator/index.mjs +0 -28
  838. package/esm/type/iterator/iterator.d.mts +0 -11
  839. package/esm/type/iterator/iterator.mjs +0 -38
  840. package/esm/type/keyof/index.mjs +0 -30
  841. package/esm/type/keyof/keyof-string.d.mts +0 -30
  842. package/esm/type/keyof/keyof-string.mjs +0 -98
  843. package/esm/type/keyof/keyof-type.d.mts +0 -11
  844. package/esm/type/keyof/keyof-type.mjs +0 -44
  845. package/esm/type/keyof/keyof.d.mts +0 -5
  846. package/esm/type/keyof/keyof.mjs +0 -34
  847. package/esm/type/literal/index.mjs +0 -28
  848. package/esm/type/literal/literal.d.mts +0 -10
  849. package/esm/type/literal/literal.mjs +0 -37
  850. package/esm/type/mapped/index.mjs +0 -28
  851. package/esm/type/mapped/mapped.d.mts +0 -26
  852. package/esm/type/mapped/mapped.mjs +0 -43
  853. package/esm/type/modifiers/index.mjs +0 -28
  854. package/esm/type/modifiers/modifiers.d.mts +0 -18
  855. package/esm/type/modifiers/modifiers.mjs +0 -73
  856. package/esm/type/never/index.mjs +0 -28
  857. package/esm/type/never/never.d.mts +0 -9
  858. package/esm/type/never/never.mjs +0 -36
  859. package/esm/type/not/index.mjs +0 -28
  860. package/esm/type/not/not.d.mts +0 -10
  861. package/esm/type/not/not.mjs +0 -37
  862. package/esm/type/null/index.mjs +0 -28
  863. package/esm/type/null/null.d.mts +0 -9
  864. package/esm/type/null/null.mjs +0 -36
  865. package/esm/type/number/index.mjs +0 -28
  866. package/esm/type/number/number.d.mts +0 -16
  867. package/esm/type/number/number.mjs +0 -36
  868. package/esm/type/object/index.mjs +0 -28
  869. package/esm/type/object/object.d.mts +0 -44
  870. package/esm/type/object/object.mjs +0 -43
  871. package/esm/type/omit/index.mjs +0 -28
  872. package/esm/type/omit/omit.d.mts +0 -21
  873. package/esm/type/omit/omit.mjs +0 -70
  874. package/esm/type/operators/index.mjs +0 -28
  875. package/esm/type/operators/operators.d.mts +0 -24
  876. package/esm/type/operators/operators.mjs +0 -108
  877. package/esm/type/optional/index.mjs +0 -28
  878. package/esm/type/optional/optional.d.mts +0 -7
  879. package/esm/type/optional/optional.mjs +0 -33
  880. package/esm/type/parameters/index.mjs +0 -28
  881. package/esm/type/parameters/parameters.d.mts +0 -7
  882. package/esm/type/parameters/parameters.mjs +0 -33
  883. package/esm/type/partial/index.mjs +0 -28
  884. package/esm/type/partial/partial.d.mts +0 -23
  885. package/esm/type/partial/partial.mjs +0 -68
  886. package/esm/type/patterns/index.mjs +0 -28
  887. package/esm/type/patterns/patterns.mjs +0 -33
  888. package/esm/type/pick/index.mjs +0 -28
  889. package/esm/type/pick/pick.d.mts +0 -21
  890. package/esm/type/pick/pick.mjs +0 -61
  891. package/esm/type/promise/index.mjs +0 -28
  892. package/esm/type/promise/promise.d.mts +0 -11
  893. package/esm/type/promise/promise.mjs +0 -38
  894. package/esm/type/readonly/index.mjs +0 -28
  895. package/esm/type/readonly/readonly.d.mts +0 -7
  896. package/esm/type/readonly/readonly.mjs +0 -33
  897. package/esm/type/readonly-optional/index.mjs +0 -28
  898. package/esm/type/readonly-optional/readonly-optional.d.mts +0 -6
  899. package/esm/type/readonly-optional/readonly-optional.mjs +0 -33
  900. package/esm/type/record/index.mjs +0 -28
  901. package/esm/type/record/record.d.mts +0 -55
  902. package/esm/type/record/record.mjs +0 -92
  903. package/esm/type/recursive/index.mjs +0 -28
  904. package/esm/type/recursive/recursive.d.mts +0 -15
  905. package/esm/type/recursive/recursive.mjs +0 -44
  906. package/esm/type/ref/index.mjs +0 -28
  907. package/esm/type/ref/ref.d.mts +0 -12
  908. package/esm/type/ref/ref.mjs +0 -41
  909. package/esm/type/regexp/index.mjs +0 -28
  910. package/esm/type/regexp/regexp.d.mts +0 -7
  911. package/esm/type/regexp/regexp.mjs +0 -34
  912. package/esm/type/registry/format.d.mts +0 -13
  913. package/esm/type/registry/format.mjs +0 -53
  914. package/esm/type/registry/index.mjs +0 -29
  915. package/esm/type/registry/type.d.mts +0 -13
  916. package/esm/type/registry/type.mjs +0 -53
  917. package/esm/type/required/index.mjs +0 -28
  918. package/esm/type/required/required.d.mts +0 -23
  919. package/esm/type/required/required.mjs +0 -67
  920. package/esm/type/rest/index.mjs +0 -28
  921. package/esm/type/rest/rest.d.mts +0 -10
  922. package/esm/type/rest/rest.mjs +0 -36
  923. package/esm/type/return-type/index.mjs +0 -28
  924. package/esm/type/return-type/return-type.d.mts +0 -5
  925. package/esm/type/return-type/return-type.mjs +0 -32
  926. package/esm/type/schema/anyschema.d.mts +0 -32
  927. package/esm/type/schema/anyschema.mjs +0 -28
  928. package/esm/type/schema/index.mjs +0 -29
  929. package/esm/type/schema/schema.d.mts +0 -29
  930. package/esm/type/schema/schema.mjs +0 -28
  931. package/esm/type/static/index.mjs +0 -28
  932. package/esm/type/static/static.d.mts +0 -34
  933. package/esm/type/static/static.mjs +0 -28
  934. package/esm/type/strict/index.mjs +0 -28
  935. package/esm/type/strict/strict.d.mts +0 -3
  936. package/esm/type/strict/strict.mjs +0 -31
  937. package/esm/type/string/index.mjs +0 -28
  938. package/esm/type/string/string.d.mts +0 -25
  939. package/esm/type/string/string.mjs +0 -32
  940. package/esm/type/symbol/index.mjs +0 -28
  941. package/esm/type/symbol/symbol.d.mts +0 -10
  942. package/esm/type/symbol/symbol.mjs +0 -32
  943. package/esm/type/symbols/index.mjs +0 -28
  944. package/esm/type/symbols/symbols.d.mts +0 -10
  945. package/esm/type/symbols/symbols.mjs +0 -37
  946. package/esm/type/template-literal/finite.d.mts +0 -16
  947. package/esm/type/template-literal/finite.mjs +0 -66
  948. package/esm/type/template-literal/generate.d.mts +0 -15
  949. package/esm/type/template-literal/generate.mjs +0 -69
  950. package/esm/type/template-literal/index.mjs +0 -34
  951. package/esm/type/template-literal/parser.d.mts +0 -19
  952. package/esm/type/template-literal/parser.mjs +0 -169
  953. package/esm/type/template-literal/pattern.d.mts +0 -4
  954. package/esm/type/template-literal/pattern.mjs +0 -56
  955. package/esm/type/template-literal/syntax.d.mts +0 -20
  956. package/esm/type/template-literal/syntax.mjs +0 -83
  957. package/esm/type/template-literal/template-literal.d.mts +0 -30
  958. package/esm/type/template-literal/template-literal.mjs +0 -39
  959. package/esm/type/template-literal/union.d.mts +0 -7
  960. package/esm/type/template-literal/union.mjs +0 -44
  961. package/esm/type/transform/index.mjs +0 -28
  962. package/esm/type/transform/transform.d.mts +0 -29
  963. package/esm/type/transform/transform.mjs +0 -69
  964. package/esm/type/tuple/index.mjs +0 -28
  965. package/esm/type/tuple/tuple.d.mts +0 -15
  966. package/esm/type/tuple/tuple.mjs +0 -38
  967. package/esm/type/type/index.d.mts +0 -6
  968. package/esm/type/type/index.mjs +0 -40
  969. package/esm/type/type/javascript.d.mts +0 -58
  970. package/esm/type/type/javascript.mjs +0 -116
  971. package/esm/type/type/json.d.mts +0 -139
  972. package/esm/type/type/json.mjs +0 -251
  973. package/esm/type/type/type.mjs +0 -88
  974. package/esm/type/uint8array/index.mjs +0 -28
  975. package/esm/type/uint8array/uint8array.d.mts +0 -13
  976. package/esm/type/uint8array/uint8array.mjs +0 -32
  977. package/esm/type/undefined/index.mjs +0 -28
  978. package/esm/type/undefined/undefined.d.mts +0 -9
  979. package/esm/type/undefined/undefined.mjs +0 -32
  980. package/esm/type/union/index.mjs +0 -28
  981. package/esm/type/union/union.d.mts +0 -16
  982. package/esm/type/union/union.mjs +0 -45
  983. package/esm/type/unknown/index.mjs +0 -28
  984. package/esm/type/unknown/unknown.d.mts +0 -8
  985. package/esm/type/unknown/unknown.mjs +0 -35
  986. package/esm/type/unsafe/index.mjs +0 -28
  987. package/esm/type/unsafe/unsafe.d.mts +0 -11
  988. package/esm/type/unsafe/unsafe.mjs +0 -35
  989. package/esm/type/void/index.mjs +0 -28
  990. package/esm/type/void/void.d.mts +0 -9
  991. package/esm/type/void/void.mjs +0 -36
  992. package/esm/value/cast/cast.d.mts +0 -23
  993. package/esm/value/cast/cast.mjs +0 -260
  994. package/esm/value/cast/index.mjs +0 -28
  995. package/esm/value/check/check.d.mts +0 -10
  996. package/esm/value/check/check.mjs +0 -464
  997. package/esm/value/check/index.mjs +0 -28
  998. package/esm/value/clean/clean.d.mts +0 -5
  999. package/esm/value/clean/clean.mjs +0 -163
  1000. package/esm/value/clean/index.mjs +0 -28
  1001. package/esm/value/clone/clone.d.mts +0 -2
  1002. package/esm/value/clone/clone.mjs +0 -64
  1003. package/esm/value/clone/index.mjs +0 -28
  1004. package/esm/value/convert/convert.d.mts +0 -9
  1005. package/esm/value/convert/convert.mjs +0 -287
  1006. package/esm/value/convert/index.mjs +0 -28
  1007. package/esm/value/create/create.d.mts +0 -31
  1008. package/esm/value/create/create.mjs +0 -504
  1009. package/esm/value/create/index.mjs +0 -28
  1010. package/esm/value/default/default.d.mts +0 -5
  1011. package/esm/value/default/default.mjs +0 -171
  1012. package/esm/value/default/index.mjs +0 -28
  1013. package/esm/value/delta/delta.d.mts +0 -41
  1014. package/esm/value/delta/delta.mjs +0 -194
  1015. package/esm/value/delta/index.mjs +0 -28
  1016. package/esm/value/deref/deref.d.mts +0 -9
  1017. package/esm/value/deref/deref.mjs +0 -41
  1018. package/esm/value/deref/index.mjs +0 -28
  1019. package/esm/value/equal/equal.d.mts +0 -2
  1020. package/esm/value/equal/equal.mjs +0 -73
  1021. package/esm/value/equal/index.mjs +0 -28
  1022. package/esm/value/guard/guard.d.mts +0 -44
  1023. package/esm/value/guard/guard.mjs +0 -123
  1024. package/esm/value/guard/index.mjs +0 -28
  1025. package/esm/value/hash/hash.d.mts +0 -6
  1026. package/esm/value/hash/hash.mjs +0 -173
  1027. package/esm/value/hash/index.mjs +0 -28
  1028. package/esm/value/index.d.mts +0 -18
  1029. package/esm/value/index.mjs +0 -57
  1030. package/esm/value/mutate/index.mjs +0 -28
  1031. package/esm/value/mutate/mutate.d.mts +0 -11
  1032. package/esm/value/mutate/mutate.mjs +0 -123
  1033. package/esm/value/pointer/index.mjs +0 -28
  1034. package/esm/value/pointer/pointer.d.mts +0 -21
  1035. package/esm/value/pointer/pointer.mjs +0 -146
  1036. package/esm/value/transform/decode.d.mts +0 -19
  1037. package/esm/value/transform/decode.mjs +0 -210
  1038. package/esm/value/transform/encode.d.mts +0 -20
  1039. package/esm/value/transform/encode.mjs +0 -218
  1040. package/esm/value/transform/has.d.mts +0 -3
  1041. package/esm/value/transform/has.mjs +0 -142
  1042. package/esm/value/transform/index.mjs +0 -30
  1043. package/esm/value/value/index.mjs +0 -28
  1044. package/esm/value/value/value.d.mts +0 -53
  1045. package/esm/value/value/value.mjs +0 -107
  1046. /package/{esm/errors/index.d.mts → build/import/errors/index.mjs} +0 -0
  1047. /package/{esm/type/any/index.d.mts → build/import/type/any/index.mjs} +0 -0
  1048. /package/{esm/type/array/index.d.mts → build/import/type/array/index.mjs} +0 -0
  1049. /package/{esm/type/async-iterator/index.d.mts → build/import/type/async-iterator/index.mjs} +0 -0
  1050. /package/{esm/type/awaited/index.d.mts → build/import/type/awaited/index.mjs} +0 -0
  1051. /package/{esm/type/bigint/index.d.mts → build/import/type/bigint/index.mjs} +0 -0
  1052. /package/{esm/type/boolean/index.d.mts → build/import/type/boolean/index.mjs} +0 -0
  1053. /package/{esm/type/clone/index.d.mts → build/import/type/clone/index.mjs} +0 -0
  1054. /package/{esm/type/composite/index.d.mts → build/import/type/composite/index.mjs} +0 -0
  1055. /package/{esm/type/const/index.d.mts → build/import/type/const/index.mjs} +0 -0
  1056. /package/{esm/type/constructor/index.d.mts → build/import/type/constructor/index.mjs} +0 -0
  1057. /package/{esm/type/constructor-parameters/index.d.mts → build/import/type/constructor-parameters/index.mjs} +0 -0
  1058. /package/{esm/type/date/index.d.mts → build/import/type/date/index.mjs} +0 -0
  1059. /package/{esm/type/deref/index.d.mts → build/import/type/deref/index.mjs} +0 -0
  1060. /package/{esm/type/discard/index.d.mts → build/import/type/discard/index.mjs} +0 -0
  1061. /package/{esm/type/enum/index.d.mts → build/import/type/enum/index.mjs} +0 -0
  1062. /package/{esm/type/exclude/index.d.mts → build/import/type/exclude/index.mjs} +0 -0
  1063. /package/{esm/type/extends/index.d.mts → build/import/type/extends/index.mjs} +0 -0
  1064. /package/{esm/type/extract/index.d.mts → build/import/type/extract/index.mjs} +0 -0
  1065. /package/{esm/type/function/index.d.mts → build/import/type/function/index.mjs} +0 -0
  1066. /package/{esm/type/guard/index.d.mts → build/import/type/guard/index.mjs} +0 -0
  1067. /package/{esm/type/helpers/index.d.mts → build/import/type/helpers/index.mjs} +0 -0
  1068. /package/{esm/type/index.d.mts → build/import/type/index.mjs} +0 -0
  1069. /package/{esm/type/indexed/index.d.mts → build/import/type/indexed/index.mjs} +0 -0
  1070. /package/{esm/type/instance-type/index.d.mts → build/import/type/instance-type/index.mjs} +0 -0
  1071. /package/{esm/type/integer/index.d.mts → build/import/type/integer/index.mjs} +0 -0
  1072. /package/{esm/type/intersect/index.d.mts → build/import/type/intersect/index.mjs} +0 -0
  1073. /package/{esm/type/intrinsic/index.d.mts → build/import/type/intrinsic/index.mjs} +0 -0
  1074. /package/{esm/type/iterator/index.d.mts → build/import/type/iterator/index.mjs} +0 -0
  1075. /package/{esm/type/keyof/index.d.mts → build/import/type/keyof/index.mjs} +0 -0
  1076. /package/{esm/type/literal/index.d.mts → build/import/type/literal/index.mjs} +0 -0
  1077. /package/{esm/type/mapped/index.d.mts → build/import/type/mapped/index.mjs} +0 -0
  1078. /package/{esm/type/modifiers/index.d.mts → build/import/type/modifiers/index.mjs} +0 -0
  1079. /package/{esm/type/never/index.d.mts → build/import/type/never/index.mjs} +0 -0
  1080. /package/{esm/type/not/index.d.mts → build/import/type/not/index.mjs} +0 -0
  1081. /package/{esm/type/null/index.d.mts → build/import/type/null/index.mjs} +0 -0
  1082. /package/{esm/type/number/index.d.mts → build/import/type/number/index.mjs} +0 -0
  1083. /package/{esm/type/object/index.d.mts → build/import/type/object/index.mjs} +0 -0
  1084. /package/{esm/type/omit/index.d.mts → build/import/type/omit/index.mjs} +0 -0
  1085. /package/{esm/type/operators/index.d.mts → build/import/type/operators/index.mjs} +0 -0
  1086. /package/{esm/type/optional/index.d.mts → build/import/type/optional/index.mjs} +0 -0
  1087. /package/{esm/type/parameters/index.d.mts → build/import/type/parameters/index.mjs} +0 -0
  1088. /package/{esm/type/partial/index.d.mts → build/import/type/partial/index.mjs} +0 -0
  1089. /package/{esm/type/patterns/index.d.mts → build/import/type/patterns/index.mjs} +0 -0
  1090. /package/{esm/type/pick/index.d.mts → build/import/type/pick/index.mjs} +0 -0
  1091. /package/{esm/type/promise/index.d.mts → build/import/type/promise/index.mjs} +0 -0
  1092. /package/{esm/type/readonly/index.d.mts → build/import/type/readonly/index.mjs} +0 -0
  1093. /package/{esm/type/readonly-optional/index.d.mts → build/import/type/readonly-optional/index.mjs} +0 -0
  1094. /package/{esm/type/record/index.d.mts → build/import/type/record/index.mjs} +0 -0
  1095. /package/{esm/type/recursive/index.d.mts → build/import/type/recursive/index.mjs} +0 -0
  1096. /package/{esm/type/ref/index.d.mts → build/import/type/ref/index.mjs} +0 -0
  1097. /package/{esm/type/regexp/index.d.mts → build/import/type/regexp/index.mjs} +0 -0
  1098. /package/{esm/type/registry/index.d.mts → build/import/type/registry/index.mjs} +0 -0
  1099. /package/{esm/type/required/index.d.mts → build/import/type/required/index.mjs} +0 -0
  1100. /package/{esm/type/rest/index.d.mts → build/import/type/rest/index.mjs} +0 -0
  1101. /package/{esm/type/return-type/index.d.mts → build/import/type/return-type/index.mjs} +0 -0
  1102. /package/{esm/type/schema/index.d.mts → build/import/type/schema/index.mjs} +0 -0
  1103. /package/{esm/type/static/index.d.mts → build/import/type/static/index.mjs} +0 -0
  1104. /package/{esm/type/strict/index.d.mts → build/import/type/strict/index.mjs} +0 -0
  1105. /package/{esm/type/string/index.d.mts → build/import/type/string/index.mjs} +0 -0
  1106. /package/{esm/type/symbol/index.d.mts → build/import/type/symbol/index.mjs} +0 -0
  1107. /package/{esm/type/symbols/index.d.mts → build/import/type/symbols/index.mjs} +0 -0
  1108. /package/{esm/type/template-literal/index.d.mts → build/import/type/template-literal/index.mjs} +0 -0
  1109. /package/{esm/type/transform/index.d.mts → build/import/type/transform/index.mjs} +0 -0
  1110. /package/{esm/type/tuple/index.d.mts → build/import/type/tuple/index.mjs} +0 -0
  1111. /package/{esm/type/type/type.d.mts → build/import/type/type/type.mjs} +0 -0
  1112. /package/{esm/type/uint8array/index.d.mts → build/import/type/uint8array/index.mjs} +0 -0
  1113. /package/{esm/type/undefined/index.d.mts → build/import/type/undefined/index.mjs} +0 -0
  1114. /package/{esm/type/union/index.d.mts → build/import/type/union/index.mjs} +0 -0
  1115. /package/{esm/type/unknown/index.d.mts → build/import/type/unknown/index.mjs} +0 -0
  1116. /package/{esm/type/unsafe/index.d.mts → build/import/type/unsafe/index.mjs} +0 -0
  1117. /package/{esm/type/void/index.d.mts → build/import/type/void/index.mjs} +0 -0
  1118. /package/{esm/value/cast/index.d.mts → build/import/value/cast/index.mjs} +0 -0
  1119. /package/{esm/value/check/index.d.mts → build/import/value/check/index.mjs} +0 -0
  1120. /package/{esm/value/clean/index.d.mts → build/import/value/clean/index.mjs} +0 -0
  1121. /package/{esm/value/clone/index.d.mts → build/import/value/clone/index.mjs} +0 -0
  1122. /package/{esm/value/convert/index.d.mts → build/import/value/convert/index.mjs} +0 -0
  1123. /package/{esm/value/create/index.d.mts → build/import/value/create/index.mjs} +0 -0
  1124. /package/{esm/value/default/index.d.mts → build/import/value/default/index.mjs} +0 -0
  1125. /package/{esm/value/delta/index.d.mts → build/import/value/delta/index.mjs} +0 -0
  1126. /package/{esm/value/deref/index.d.mts → build/import/value/deref/index.mjs} +0 -0
  1127. /package/{esm/value/equal/index.d.mts → build/import/value/equal/index.mjs} +0 -0
  1128. /package/{esm/value/guard/index.d.mts → build/import/value/guard/index.mjs} +0 -0
  1129. /package/{esm/value/hash/index.d.mts → build/import/value/hash/index.mjs} +0 -0
  1130. /package/{esm/value/mutate/index.d.mts → build/import/value/mutate/index.mjs} +0 -0
  1131. /package/{esm/value/pointer/index.d.mts → build/import/value/pointer/index.mjs} +0 -0
  1132. /package/{esm/value/transform/index.d.mts → build/import/value/transform/index.mjs} +0 -0
  1133. /package/{esm/value/value/index.d.mts → build/import/value/value/index.mjs} +0 -0
  1134. /package/{esm/type/discard/discard.d.mts → build/types/type/discard/discard.d.ts} +0 -0
  1135. /package/{esm/type/patterns/patterns.d.mts → build/types/type/patterns/patterns.d.ts} +0 -0
@@ -1,42 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/type
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- import { Object } from '../object/index.mjs';
29
- import { Intersect } from '../intersect/index.mjs';
30
- import { KeyOfStringResolve } from '../keyof/index.mjs';
31
- import { Index } from '../indexed/index.mjs';
32
- import { CloneType } from '../clone/type.mjs';
33
- export function CompositeResolve(T) {
34
- const intersect = Intersect(T, {});
35
- const keys = KeyOfStringResolve(intersect);
36
- const properties = keys.reduce((acc, key) => ({ ...acc, [key]: Index(intersect, [key]) }), {});
37
- return Object(properties);
38
- }
39
- /** `[Json]` Creates a Composite object type */
40
- export function Composite(T, options) {
41
- return CloneType(CompositeResolve(T), options);
42
- }
@@ -1,28 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/type
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- export * from './composite.mjs';
@@ -1,30 +0,0 @@
1
- import type { AssertRest, Evaluate } from '../helpers/index.mjs';
2
- import type { TSchema, SchemaOptions } from '../schema/index.mjs';
3
- import { type TAny } from '../any/index.mjs';
4
- import { type TBigInt } from '../bigint/index.mjs';
5
- import { type TDate } from '../date/index.mjs';
6
- import { type TFunction } from '../function/index.mjs';
7
- import { type TLiteral } from '../literal/index.mjs';
8
- import { type TNever } from '../never/index.mjs';
9
- import { type TNull } from '../null/index.mjs';
10
- import { type TObject } from '../object/index.mjs';
11
- import { type TSymbol } from '../symbol/index.mjs';
12
- import { type TTuple } from '../tuple/index.mjs';
13
- import { type TReadonly } from '../readonly/index.mjs';
14
- import { type TUndefined } from '../undefined/index.mjs';
15
- import { type TUint8Array } from '../uint8array/index.mjs';
16
- import { type TUnknown } from '../unknown/index.mjs';
17
- type FromArray<T extends readonly unknown[]> = T extends readonly [infer L extends unknown, ...infer R extends unknown[]] ? [FromValue<L, false>, ...FromArray<R>] : T;
18
- declare function FromArray<T extends readonly unknown[]>(T: [...T]): FromArray<T>;
19
- type FromProperties<T extends Record<PropertyKey, unknown>> = {
20
- -readonly [K in keyof T]: FromValue<T[K], false> extends infer R extends TSchema ? TReadonly<R> : TReadonly<TNever>;
21
- };
22
- declare function FromProperties<T extends Record<PropertyKey, unknown>>(value: T): FromProperties<T>;
23
- type ConditionalReadonly<T extends TSchema, Root extends boolean> = Root extends true ? T : TReadonly<T>;
24
- declare function ConditionalReadonly<T extends TSchema, Root extends boolean>(T: T, root: Root): ConditionalReadonly<T, Root>;
25
- type FromValue<T, Root extends boolean> = T extends AsyncIterableIterator<unknown> ? ConditionalReadonly<TAny, Root> : T extends IterableIterator<unknown> ? ConditionalReadonly<TAny, Root> : T extends readonly unknown[] ? TReadonly<TTuple<AssertRest<FromArray<T>>>> : T extends Uint8Array ? TUint8Array : T extends Date ? TDate : T extends Record<PropertyKey, unknown> ? ConditionalReadonly<TObject<Evaluate<FromProperties<T>>>, Root> : T extends Function ? ConditionalReadonly<TFunction<[], TUnknown>, Root> : T extends undefined ? TUndefined : T extends null ? TNull : T extends symbol ? TSymbol : T extends number ? TLiteral<T> : T extends boolean ? TLiteral<T> : T extends string ? TLiteral<T> : T extends bigint ? TBigInt : TObject<{}>;
26
- declare function FromValue<T, Root extends boolean>(value: T, root: Root): FromValue<T, Root>;
27
- export type TConst<T> = FromValue<T, true>;
28
- /** `[JavaScript]` Creates a readonly const type from the given value. */
29
- export declare function Const</* const (not supported in 4.0) */ T>(T: T, options?: SchemaOptions): TConst<T>;
30
- export {};
@@ -1,80 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/type
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- import { IsArray, IsNumber, IsBigInt, IsUint8Array, IsDate, IsIterator, IsObject, IsAsyncIterator, IsFunction, IsUndefined, IsNull, IsSymbol, IsBoolean, IsString } from '../guard/value.mjs';
29
- import { Any } from '../any/index.mjs';
30
- import { BigInt } from '../bigint/index.mjs';
31
- import { Date } from '../date/index.mjs';
32
- import { Function } from '../function/index.mjs';
33
- import { Literal } from '../literal/index.mjs';
34
- import { Null } from '../null/index.mjs';
35
- import { Object } from '../object/index.mjs';
36
- import { Symbol } from '../symbol/index.mjs';
37
- import { Tuple } from '../tuple/index.mjs';
38
- import { Readonly } from '../readonly/index.mjs';
39
- import { Undefined } from '../undefined/index.mjs';
40
- import { Uint8Array } from '../uint8array/index.mjs';
41
- import { Unknown } from '../unknown/index.mjs';
42
- import { TypeClone } from '../clone/index.mjs';
43
- // prettier-ignore
44
- function FromArray(T) {
45
- const [L, ...R] = T;
46
- return (T.length > 0
47
- ? [FromValue(L, false), ...FromArray(R)]
48
- : []);
49
- }
50
- // prettier-ignore
51
- function FromProperties(value) {
52
- return globalThis.Object.getOwnPropertyNames(value).reduce((acc, key) => {
53
- return { ...acc, [key]: Readonly(FromValue(value[key], false)) };
54
- }, {});
55
- }
56
- function ConditionalReadonly(T, root) {
57
- return (root === true ? T : Readonly(T));
58
- }
59
- // prettier-ignore
60
- function FromValue(value, root) {
61
- return (IsAsyncIterator(value) ? ConditionalReadonly(Any(), root) :
62
- IsIterator(value) ? ConditionalReadonly(Any(), root) :
63
- IsArray(value) ? Readonly(Tuple(FromArray(value))) : // Always Readonly
64
- IsUint8Array(value) ? Uint8Array() :
65
- IsDate(value) ? Date() :
66
- IsObject(value) ? ConditionalReadonly(Object(FromProperties(value)), root) :
67
- IsFunction(value) ? ConditionalReadonly(Function([], Unknown()), root) :
68
- IsUndefined(value) ? Undefined() :
69
- IsNull(value) ? Null() :
70
- IsSymbol(value) ? Symbol() :
71
- IsBigInt(value) ? BigInt() :
72
- IsNumber(value) ? Literal(value) :
73
- IsBoolean(value) ? Literal(value) :
74
- IsString(value) ? Literal(value) :
75
- Object({}));
76
- }
77
- /** `[JavaScript]` Creates a readonly const type from the given value. */
78
- export function Const(T, options = {}) {
79
- return TypeClone.CloneType(FromValue(T, true), options);
80
- }
@@ -1,28 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/type
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- export * from './const.mjs';
@@ -1,17 +0,0 @@
1
- import type { TSchema, SchemaOptions } from '../schema/index.mjs';
2
- import type { Static } from '../static/index.mjs';
3
- import type { Ensure } from '../helpers/index.mjs';
4
- import { Kind } from '../symbols/index.mjs';
5
- type TConstructorReturnTypeResolve<T extends TSchema, P extends unknown[]> = Static<T, P>;
6
- type TConstructorParametersResolve<T extends TSchema[], P extends unknown[]> = T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? [Static<L, P>, ...TConstructorParametersResolve<R, P>] : [];
7
- export type TConstructorResolve<T extends TSchema[], U extends TSchema, P extends unknown[]> = (Ensure<new (...param: TConstructorParametersResolve<T, P>) => TConstructorReturnTypeResolve<U, P>>);
8
- export interface TConstructor<T extends TSchema[] = TSchema[], U extends TSchema = TSchema> extends TSchema {
9
- [Kind]: 'Constructor';
10
- static: TConstructorResolve<T, U, this['params']>;
11
- type: 'Constructor';
12
- parameters: T;
13
- returns: U;
14
- }
15
- /** `[JavaScript]` Creates a Constructor type */
16
- export declare function Constructor<T extends TSchema[], U extends TSchema>(parameters: [...T], returns: U, options?: SchemaOptions): TConstructor<T, U>;
17
- export {};
@@ -1,39 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/type
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- import { Kind } from '../symbols/index.mjs';
29
- import { CloneType, CloneRest } from '../clone/type.mjs';
30
- /** `[JavaScript]` Creates a Constructor type */
31
- export function Constructor(parameters, returns, options) {
32
- return {
33
- ...options,
34
- [Kind]: 'Constructor',
35
- type: 'Constructor',
36
- parameters: CloneRest(parameters),
37
- returns: CloneType(returns),
38
- };
39
- }
@@ -1,28 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/type
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- export * from './constructor.mjs';
@@ -1,7 +0,0 @@
1
- import type { TSchema, SchemaOptions } from '../schema/index.mjs';
2
- import type { Ensure } from '../helpers/index.mjs';
3
- import type { TConstructor } from '../constructor/index.mjs';
4
- import { type TTuple } from '../tuple/index.mjs';
5
- export type TConstructorParameters<T extends TConstructor<TSchema[], TSchema>> = (Ensure<TTuple<T['parameters']>>);
6
- /** `[JavaScript]` Extracts the ConstructorParameters from the given Constructor type */
7
- export declare function ConstructorParameters<T extends TConstructor<TSchema[], TSchema>>(schema: T, options?: SchemaOptions): TConstructorParameters<T>;
@@ -1,33 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/type
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- import { Tuple } from '../tuple/index.mjs';
29
- import { CloneRest } from '../clone/type.mjs';
30
- /** `[JavaScript]` Extracts the ConstructorParameters from the given Constructor type */
31
- export function ConstructorParameters(schema, options = {}) {
32
- return Tuple(CloneRest(schema.parameters), { ...options });
33
- }
@@ -1,28 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/type
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- export * from './constructor-parameters.mjs';
@@ -1,21 +0,0 @@
1
- import type { TSchema, SchemaOptions } from '../schema/index.mjs';
2
- import { Kind } from '../symbols/index.mjs';
3
- export interface DateOptions extends SchemaOptions {
4
- /** The exclusive maximum timestamp value */
5
- exclusiveMaximumTimestamp?: number;
6
- /** The exclusive minimum timestamp value */
7
- exclusiveMinimumTimestamp?: number;
8
- /** The maximum timestamp value */
9
- maximumTimestamp?: number;
10
- /** The minimum timestamp value */
11
- minimumTimestamp?: number;
12
- /** The multiple of timestamp value */
13
- multipleOfTimestamp?: number;
14
- }
15
- export interface TDate extends TSchema, DateOptions {
16
- [Kind]: 'Date';
17
- static: Date;
18
- type: 'date';
19
- }
20
- /** `[JavaScript]` Creates a Date type */
21
- export declare function Date(options?: DateOptions): TDate;
@@ -1,36 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/type
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- import { Kind } from '../symbols/index.mjs';
29
- /** `[JavaScript]` Creates a Date type */
30
- export function Date(options = {}) {
31
- return {
32
- ...options,
33
- [Kind]: 'Date',
34
- type: 'Date',
35
- };
36
- }
@@ -1,28 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/type
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- export * from './date.mjs';
@@ -1,24 +0,0 @@
1
- import type { TSchema } from '../schema/index.mjs';
2
- import type { Evaluate } from '../helpers/index.mjs';
3
- import type { TTuple } from '../tuple/index.mjs';
4
- import type { TIntersect } from '../intersect/index.mjs';
5
- import type { TUnion } from '../union/index.mjs';
6
- import type { TPromise } from '../promise/index.mjs';
7
- import type { TAsyncIterator } from '../async-iterator/index.mjs';
8
- import type { TIterator } from '../iterator/index.mjs';
9
- import type { TArray } from '../array/index.mjs';
10
- import type { TConstructor } from '../constructor/index.mjs';
11
- import type { TFunction } from '../function/index.mjs';
12
- import type { TRef } from '../ref/index.mjs';
13
- import type { TObject, TProperties } from '../object/index.mjs';
14
- export type FromRest<T extends TSchema[]> = (T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? [DerefResolve<L>, ...FromRest<R>] : []);
15
- type FromProperties<T extends TProperties> = Evaluate<{
16
- [K in keyof T]: DerefResolve<T[K]>;
17
- }>;
18
- declare function FromProperties(properties: TProperties, references: TSchema[]): TProperties;
19
- export type DerefResolve<T extends TSchema> = T extends TConstructor<infer S extends TSchema[], infer R extends TSchema> ? TConstructor<FromRest<S>, DerefResolve<R>> : T extends TFunction<infer S extends TSchema[], infer R extends TSchema> ? TFunction<FromRest<S>, DerefResolve<R>> : T extends TIntersect<infer S extends TSchema[]> ? TIntersect<FromRest<S>> : T extends TUnion<infer S extends TSchema[]> ? TUnion<FromRest<S>> : T extends TTuple<infer S extends TSchema[]> ? TTuple<FromRest<S>> : T extends TObject<infer S extends TProperties> ? TObject<FromProperties<S>> : T extends TArray<infer S extends TSchema> ? TArray<DerefResolve<S>> : T extends TPromise<infer S extends TSchema> ? TPromise<DerefResolve<S>> : T extends TAsyncIterator<infer S extends TSchema> ? TAsyncIterator<DerefResolve<S>> : T extends TIterator<infer S extends TSchema> ? TIterator<DerefResolve<S>> : T extends TRef<infer S extends TSchema> ? DerefResolve<S> : T;
20
- export declare function DerefResolve<T extends TSchema>(schema: T, references: TSchema[]): TDeref<T>;
21
- export type TDeref<T extends TSchema> = DerefResolve<T>;
22
- /** `[Json]` Creates a dereferenced type */
23
- export declare function Deref<T extends TSchema>(schema: T, references: TSchema[]): TDeref<T>;
24
- export {};
@@ -1,131 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/type
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- import { CloneType } from '../clone/type.mjs';
29
- import { Discard } from '../discard/index.mjs';
30
- import { IsUndefined } from '../guard/value.mjs';
31
- import { TConstructor as IsConstructorType, TFunction as IsFunctionType, TIntersect as IsIntersectType, TUnion as IsUnionType, TTuple as IsTupleType, TArray as IsArrayType, TObject as IsObjectType, TPromise as IsPromiseType, TAsyncIterator as IsAsyncIteratorType, TIterator as IsIteratorType, TRef as IsRefType, } from '../guard/type.mjs';
32
- function FromRest(schema, references) {
33
- return schema.map((schema) => Deref(schema, references));
34
- }
35
- // prettier-ignore
36
- function FromProperties(properties, references) {
37
- return globalThis.Object.getOwnPropertyNames(properties).reduce((acc, key) => {
38
- return { ...acc, [key]: Deref(properties[key], references) };
39
- }, {});
40
- }
41
- // prettier-ignore
42
- function FromConstructor(schema, references) {
43
- const clone = CloneType(schema);
44
- clone.parameters = FromRest(clone.parameters, references);
45
- clone.returns = Deref(clone.returns, references);
46
- return clone;
47
- }
48
- // prettier-ignore
49
- function FromFunction(schema, references) {
50
- const clone = CloneType(schema);
51
- clone.parameters = FromRest(clone.parameters, references);
52
- clone.returns = Deref(clone.returns, references);
53
- return clone;
54
- }
55
- // prettier-ignore
56
- function FromIntersect(schema, references) {
57
- const clone = CloneType(schema);
58
- clone.allOf = FromRest(clone.allOf, references);
59
- return clone;
60
- }
61
- // prettier-ignore
62
- function FromUnion(schema, references) {
63
- const clone = CloneType(schema);
64
- clone.anyOf = FromRest(clone.anyOf, references);
65
- return clone;
66
- }
67
- // prettier-ignore
68
- function FromTuple(schema, references) {
69
- const clone = CloneType(schema);
70
- if (IsUndefined(clone.items))
71
- return clone;
72
- clone.items = FromRest(clone.items, references);
73
- return clone;
74
- }
75
- // prettier-ignore
76
- function FromArray(schema, references) {
77
- const clone = CloneType(schema);
78
- clone.items = Deref(clone.items, references);
79
- return clone;
80
- }
81
- // prettier-ignore
82
- function FromObject(schema, references) {
83
- const clone = CloneType(schema);
84
- clone.properties = FromProperties(clone.properties, references);
85
- return clone;
86
- }
87
- // prettier-ignore
88
- function FromPromise(schema, references) {
89
- const clone = CloneType(schema);
90
- clone.item = Deref(clone.item, references);
91
- return clone;
92
- }
93
- // prettier-ignore
94
- function FromAsyncIterator(schema, references) {
95
- const clone = CloneType(schema);
96
- clone.items = Deref(clone.items, references);
97
- return clone;
98
- }
99
- // prettier-ignore
100
- function FromIterator(schema, references) {
101
- const clone = CloneType(schema);
102
- clone.items = Deref(clone.items, references);
103
- return clone;
104
- }
105
- // prettier-ignore
106
- function FromRef(schema, references) {
107
- const target = references.find(remote => remote.$id === schema.$ref);
108
- if (target === undefined)
109
- throw Error(`Unable to dereference schema with $id ${schema.$ref}`);
110
- const discard = Discard(target, ['$id']);
111
- return Deref(discard, references);
112
- }
113
- // prettier-ignore
114
- export function DerefResolve(schema, references) {
115
- return (IsConstructorType(schema) ? FromConstructor(schema, references) :
116
- IsFunctionType(schema) ? FromFunction(schema, references) :
117
- IsIntersectType(schema) ? FromIntersect(schema, references) :
118
- IsUnionType(schema) ? FromUnion(schema, references) :
119
- IsTupleType(schema) ? FromTuple(schema, references) :
120
- IsArrayType(schema) ? FromArray(schema, references) :
121
- IsObjectType(schema) ? FromObject(schema, references) :
122
- IsPromiseType(schema) ? FromPromise(schema, references) :
123
- IsAsyncIteratorType(schema) ? FromAsyncIterator(schema, references) :
124
- IsIteratorType(schema) ? FromIterator(schema, references) :
125
- IsRefType(schema) ? FromRef(schema, references) :
126
- schema);
127
- }
128
- /** `[Json]` Creates a dereferenced type */
129
- export function Deref(schema, references) {
130
- return DerefResolve(schema, references);
131
- }
@@ -1,28 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/type
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- export * from './deref.mjs';