@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,507 +0,0 @@
1
- "use strict";
2
- /*--------------------------------------------------------------------------
3
-
4
- @sinclair/typebox/value
5
-
6
- The MIT License (MIT)
7
-
8
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
9
-
10
- Permission is hereby granted, free of charge, to any person obtaining a copy
11
- of this software and associated documentation files (the "Software"), to deal
12
- in the Software without restriction, including without limitation the rights
13
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
- copies of the Software, and to permit persons to whom the Software is
15
- furnished to do so, subject to the following conditions:
16
-
17
- The above copyright notice and this permission notice shall be included in
18
- all copies or substantial portions of the Software.
19
-
20
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
- THE SOFTWARE.
27
-
28
- ---------------------------------------------------------------------------*/
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.Create = exports.ValueCreateRecursiveInstantiationError = exports.ValueCreateTempateLiteralTypeError = exports.ValueCreateIntersectTypeError = exports.ValueCreateNotTypeError = exports.ValueCreateNeverTypeError = exports.ValueCreateUnknownTypeError = void 0;
31
- const index_mjs_1 = require("../guard/index");
32
- const index_mjs_2 = require("../check/index");
33
- const index_mjs_3 = require("../deref/index");
34
- const index_mjs_4 = require("../../type/template-literal/index");
35
- const index_mjs_5 = require("../../type/patterns/index");
36
- const index_mjs_6 = require("../../type/registry/index");
37
- const index_mjs_7 = require("../../type/symbols/index");
38
- // ------------------------------------------------------------------
39
- // Errors
40
- // ------------------------------------------------------------------
41
- class ValueCreateUnknownTypeError extends Error {
42
- constructor(schema) {
43
- super('Unknown type');
44
- this.schema = schema;
45
- }
46
- }
47
- exports.ValueCreateUnknownTypeError = ValueCreateUnknownTypeError;
48
- class ValueCreateNeverTypeError extends Error {
49
- constructor(schema) {
50
- super('Never types cannot be created');
51
- this.schema = schema;
52
- }
53
- }
54
- exports.ValueCreateNeverTypeError = ValueCreateNeverTypeError;
55
- class ValueCreateNotTypeError extends Error {
56
- constructor(schema) {
57
- super('Not types must have a default value');
58
- this.schema = schema;
59
- }
60
- }
61
- exports.ValueCreateNotTypeError = ValueCreateNotTypeError;
62
- class ValueCreateIntersectTypeError extends Error {
63
- constructor(schema) {
64
- super('Intersect produced invalid value. Consider using a default value.');
65
- this.schema = schema;
66
- }
67
- }
68
- exports.ValueCreateIntersectTypeError = ValueCreateIntersectTypeError;
69
- class ValueCreateTempateLiteralTypeError extends Error {
70
- constructor(schema) {
71
- super('Can only create template literal values from patterns that produce finite sequences. Consider using a default value.');
72
- this.schema = schema;
73
- }
74
- }
75
- exports.ValueCreateTempateLiteralTypeError = ValueCreateTempateLiteralTypeError;
76
- class ValueCreateRecursiveInstantiationError extends Error {
77
- constructor(schema, recursiveMaxDepth) {
78
- super('Value cannot be created as recursive type may produce value of infinite size. Consider using a default.');
79
- this.schema = schema;
80
- this.recursiveMaxDepth = recursiveMaxDepth;
81
- }
82
- }
83
- exports.ValueCreateRecursiveInstantiationError = ValueCreateRecursiveInstantiationError;
84
- // ------------------------------------------------------------------
85
- // Create
86
- // ------------------------------------------------------------------
87
- function TAny(schema, references) {
88
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
89
- return schema.default;
90
- }
91
- else {
92
- return {};
93
- }
94
- }
95
- function TArray(schema, references) {
96
- if (schema.uniqueItems === true && !(0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
97
- throw new Error('ValueCreate.Array: Array with the uniqueItems constraint requires a default value');
98
- }
99
- else if ('contains' in schema && !(0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
100
- throw new Error('ValueCreate.Array: Array with the contains constraint requires a default value');
101
- }
102
- else if ('default' in schema) {
103
- return schema.default;
104
- }
105
- else if (schema.minItems !== undefined) {
106
- return Array.from({ length: schema.minItems }).map((item) => {
107
- return Visit(schema.items, references);
108
- });
109
- }
110
- else {
111
- return [];
112
- }
113
- }
114
- function TAsyncIterator(schema, references) {
115
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
116
- return schema.default;
117
- }
118
- else {
119
- return (async function* () { })();
120
- }
121
- }
122
- function TBigInt(schema, references) {
123
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
124
- return schema.default;
125
- }
126
- else {
127
- return BigInt(0);
128
- }
129
- }
130
- function TBoolean(schema, references) {
131
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
132
- return schema.default;
133
- }
134
- else {
135
- return false;
136
- }
137
- }
138
- function TConstructor(schema, references) {
139
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
140
- return schema.default;
141
- }
142
- else {
143
- const value = Visit(schema.returns, references);
144
- if (typeof value === 'object' && !Array.isArray(value)) {
145
- return class {
146
- constructor() {
147
- for (const [key, val] of Object.entries(value)) {
148
- const self = this;
149
- self[key] = val;
150
- }
151
- }
152
- };
153
- }
154
- else {
155
- return class {
156
- };
157
- }
158
- }
159
- }
160
- function TDate(schema, references) {
161
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
162
- return schema.default;
163
- }
164
- else if (schema.minimumTimestamp !== undefined) {
165
- return new Date(schema.minimumTimestamp);
166
- }
167
- else {
168
- return new Date();
169
- }
170
- }
171
- function TFunction(schema, references) {
172
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
173
- return schema.default;
174
- }
175
- else {
176
- return () => Visit(schema.returns, references);
177
- }
178
- }
179
- function TInteger(schema, references) {
180
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
181
- return schema.default;
182
- }
183
- else if (schema.minimum !== undefined) {
184
- return schema.minimum;
185
- }
186
- else {
187
- return 0;
188
- }
189
- }
190
- function TIntersect(schema, references) {
191
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
192
- return schema.default;
193
- }
194
- else {
195
- // --------------------------------------------------------------
196
- // Note: The best we can do here is attempt to instance each
197
- // sub type and apply through object assign. For non-object
198
- // sub types, we just escape the assignment and just return
199
- // the value. In the latter case, this is typically going to
200
- // be a consequence of an illogical intersection.
201
- // --------------------------------------------------------------
202
- const value = schema.allOf.reduce((acc, schema) => {
203
- const next = Visit(schema, references);
204
- return typeof next === 'object' ? { ...acc, ...next } : next;
205
- }, {});
206
- if (!(0, index_mjs_2.Check)(schema, references, value))
207
- throw new ValueCreateIntersectTypeError(schema);
208
- return value;
209
- }
210
- }
211
- function TIterator(schema, references) {
212
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
213
- return schema.default;
214
- }
215
- else {
216
- return (function* () { })();
217
- }
218
- }
219
- function TLiteral(schema, references) {
220
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
221
- return schema.default;
222
- }
223
- else {
224
- return schema.const;
225
- }
226
- }
227
- function TNever(schema, references) {
228
- throw new ValueCreateNeverTypeError(schema);
229
- }
230
- function TNot(schema, references) {
231
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
232
- return schema.default;
233
- }
234
- else {
235
- throw new ValueCreateNotTypeError(schema);
236
- }
237
- }
238
- function TNull(schema, references) {
239
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
240
- return schema.default;
241
- }
242
- else {
243
- return null;
244
- }
245
- }
246
- function TNumber(schema, references) {
247
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
248
- return schema.default;
249
- }
250
- else if (schema.minimum !== undefined) {
251
- return schema.minimum;
252
- }
253
- else {
254
- return 0;
255
- }
256
- }
257
- function TObject(schema, references) {
258
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
259
- return schema.default;
260
- }
261
- else {
262
- const required = new Set(schema.required);
263
- return (schema.default ||
264
- Object.entries(schema.properties).reduce((acc, [key, schema]) => {
265
- return required.has(key) ? { ...acc, [key]: Visit(schema, references) } : { ...acc };
266
- }, {}));
267
- }
268
- }
269
- function TPromise(schema, references) {
270
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
271
- return schema.default;
272
- }
273
- else {
274
- return Promise.resolve(Visit(schema.item, references));
275
- }
276
- }
277
- function TRecord(schema, references) {
278
- const [keyPattern, valueSchema] = Object.entries(schema.patternProperties)[0];
279
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
280
- return schema.default;
281
- }
282
- else if (!(keyPattern === index_mjs_5.PatternStringExact || keyPattern === index_mjs_5.PatternNumberExact)) {
283
- const propertyKeys = keyPattern.slice(1, keyPattern.length - 1).split('|');
284
- return propertyKeys.reduce((acc, key) => {
285
- return { ...acc, [key]: Visit(valueSchema, references) };
286
- }, {});
287
- }
288
- else {
289
- return {};
290
- }
291
- }
292
- function TRef(schema, references) {
293
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
294
- return schema.default;
295
- }
296
- else {
297
- return Visit((0, index_mjs_3.Deref)(schema, references), references);
298
- }
299
- }
300
- function TString(schema, references) {
301
- if (schema.pattern !== undefined) {
302
- if (!(0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
303
- throw new Error('ValueCreate.String: String types with patterns must specify a default value');
304
- }
305
- else {
306
- return schema.default;
307
- }
308
- }
309
- else if (schema.format !== undefined) {
310
- if (!(0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
311
- throw new Error('ValueCreate.String: String types with formats must specify a default value');
312
- }
313
- else {
314
- return schema.default;
315
- }
316
- }
317
- else {
318
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
319
- return schema.default;
320
- }
321
- else if (schema.minLength !== undefined) {
322
- return Array.from({ length: schema.minLength })
323
- .map(() => '.')
324
- .join('');
325
- }
326
- else {
327
- return '';
328
- }
329
- }
330
- }
331
- function TSymbol(schema, references) {
332
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
333
- return schema.default;
334
- }
335
- else if ('value' in schema) {
336
- return Symbol.for(schema.value);
337
- }
338
- else {
339
- return Symbol();
340
- }
341
- }
342
- function TTemplateLiteral(schema, references) {
343
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
344
- return schema.default;
345
- }
346
- const expression = (0, index_mjs_4.TemplateLiteralParseExact)(schema.pattern);
347
- if (!(0, index_mjs_4.IsTemplateLiteralFinite)(expression))
348
- throw new ValueCreateTempateLiteralTypeError(schema);
349
- const sequence = (0, index_mjs_4.TemplateLiteralGenerate)(expression);
350
- return sequence.next().value;
351
- }
352
- function TThis(schema, references) {
353
- if (recursiveDepth++ > recursiveMaxDepth)
354
- throw new ValueCreateRecursiveInstantiationError(schema, recursiveMaxDepth);
355
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
356
- return schema.default;
357
- }
358
- else {
359
- return Visit((0, index_mjs_3.Deref)(schema, references), references);
360
- }
361
- }
362
- function TTuple(schema, references) {
363
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
364
- return schema.default;
365
- }
366
- if (schema.items === undefined) {
367
- return [];
368
- }
369
- else {
370
- return Array.from({ length: schema.minItems }).map((_, index) => Visit(schema.items[index], references));
371
- }
372
- }
373
- function TUndefined(schema, references) {
374
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
375
- return schema.default;
376
- }
377
- else {
378
- return undefined;
379
- }
380
- }
381
- function TUnion(schema, references) {
382
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
383
- return schema.default;
384
- }
385
- else if (schema.anyOf.length === 0) {
386
- throw new Error('ValueCreate.Union: Cannot create Union with zero variants');
387
- }
388
- else {
389
- return Visit(schema.anyOf[0], references);
390
- }
391
- }
392
- function TUint8Array(schema, references) {
393
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
394
- return schema.default;
395
- }
396
- else if (schema.minByteLength !== undefined) {
397
- return new Uint8Array(schema.minByteLength);
398
- }
399
- else {
400
- return new Uint8Array(0);
401
- }
402
- }
403
- function TUnknown(schema, references) {
404
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
405
- return schema.default;
406
- }
407
- else {
408
- return {};
409
- }
410
- }
411
- function TVoid(schema, references) {
412
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
413
- return schema.default;
414
- }
415
- else {
416
- return void 0;
417
- }
418
- }
419
- function TKind(schema, references) {
420
- if ((0, index_mjs_1.HasPropertyKey)(schema, 'default')) {
421
- return schema.default;
422
- }
423
- else {
424
- throw new Error('User defined types must specify a default value');
425
- }
426
- }
427
- function Visit(schema, references) {
428
- const references_ = (0, index_mjs_1.IsString)(schema.$id) ? [...references, schema] : references;
429
- const schema_ = schema;
430
- switch (schema_[index_mjs_7.Kind]) {
431
- case 'Any':
432
- return TAny(schema_, references_);
433
- case 'Array':
434
- return TArray(schema_, references_);
435
- case 'AsyncIterator':
436
- return TAsyncIterator(schema_, references_);
437
- case 'BigInt':
438
- return TBigInt(schema_, references_);
439
- case 'Boolean':
440
- return TBoolean(schema_, references_);
441
- case 'Constructor':
442
- return TConstructor(schema_, references_);
443
- case 'Date':
444
- return TDate(schema_, references_);
445
- case 'Function':
446
- return TFunction(schema_, references_);
447
- case 'Integer':
448
- return TInteger(schema_, references_);
449
- case 'Intersect':
450
- return TIntersect(schema_, references_);
451
- case 'Iterator':
452
- return TIterator(schema_, references_);
453
- case 'Literal':
454
- return TLiteral(schema_, references_);
455
- case 'Never':
456
- return TNever(schema_, references_);
457
- case 'Not':
458
- return TNot(schema_, references_);
459
- case 'Null':
460
- return TNull(schema_, references_);
461
- case 'Number':
462
- return TNumber(schema_, references_);
463
- case 'Object':
464
- return TObject(schema_, references_);
465
- case 'Promise':
466
- return TPromise(schema_, references_);
467
- case 'Record':
468
- return TRecord(schema_, references_);
469
- case 'Ref':
470
- return TRef(schema_, references_);
471
- case 'String':
472
- return TString(schema_, references_);
473
- case 'Symbol':
474
- return TSymbol(schema_, references_);
475
- case 'TemplateLiteral':
476
- return TTemplateLiteral(schema_, references_);
477
- case 'This':
478
- return TThis(schema_, references_);
479
- case 'Tuple':
480
- return TTuple(schema_, references_);
481
- case 'Undefined':
482
- return TUndefined(schema_, references_);
483
- case 'Union':
484
- return TUnion(schema_, references_);
485
- case 'Uint8Array':
486
- return TUint8Array(schema_, references_);
487
- case 'Unknown':
488
- return TUnknown(schema_, references_);
489
- case 'Void':
490
- return TVoid(schema_, references_);
491
- default:
492
- if (!index_mjs_6.TypeRegistry.Has(schema_[index_mjs_7.Kind]))
493
- throw new ValueCreateUnknownTypeError(schema_);
494
- return TKind(schema_, references_);
495
- }
496
- }
497
- // ------------------------------------------------------------------
498
- // State
499
- // ------------------------------------------------------------------
500
- const recursiveMaxDepth = 512;
501
- let recursiveDepth = 0;
502
- /** Creates a value from the given schema */
503
- function Create(...args) {
504
- recursiveDepth = 0;
505
- return args.length === 2 ? Visit(args[0], args[1]) : Visit(args[0], []);
506
- }
507
- exports.Create = Create;
@@ -1,44 +0,0 @@
1
- "use strict";
2
- /*--------------------------------------------------------------------------
3
-
4
- @sinclair/typebox/value
5
-
6
- The MIT License (MIT)
7
-
8
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
9
-
10
- Permission is hereby granted, free of charge, to any person obtaining a copy
11
- of this software and associated documentation files (the "Software"), to deal
12
- in the Software without restriction, including without limitation the rights
13
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
- copies of the Software, and to permit persons to whom the Software is
15
- furnished to do so, subject to the following conditions:
16
-
17
- The above copyright notice and this permission notice shall be included in
18
- all copies or substantial portions of the Software.
19
-
20
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
- THE SOFTWARE.
27
-
28
- ---------------------------------------------------------------------------*/
29
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
30
- if (k2 === undefined) k2 = k;
31
- var desc = Object.getOwnPropertyDescriptor(m, k);
32
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
33
- desc = { enumerable: true, get: function() { return m[k]; } };
34
- }
35
- Object.defineProperty(o, k2, desc);
36
- }) : (function(o, m, k, k2) {
37
- if (k2 === undefined) k2 = k;
38
- o[k2] = m[k];
39
- }));
40
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
41
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
42
- };
43
- Object.defineProperty(exports, "__esModule", { value: true });
44
- __exportStar(require("./create"), exports);