@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,219 +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.Encode = exports.TransformEncodeError = exports.TransformEncodeCheckError = void 0;
31
- const type_mjs_1 = require("../../type/guard/type");
32
- const index_mjs_1 = require("../../type/symbols/index");
33
- const index_mjs_2 = require("../guard/index");
34
- const index_mjs_3 = require("../../type/keyof/index");
35
- const index_mjs_4 = require("../../type/indexed/index");
36
- const index_mjs_5 = require("../deref/index");
37
- const index_mjs_6 = require("../check/index");
38
- // ------------------------------------------------------------------
39
- // Errors
40
- // ------------------------------------------------------------------
41
- class TransformEncodeCheckError extends Error {
42
- constructor(schema, value, error) {
43
- super(`Unable to encode due to invalid value`);
44
- this.schema = schema;
45
- this.value = value;
46
- this.error = error;
47
- }
48
- }
49
- exports.TransformEncodeCheckError = TransformEncodeCheckError;
50
- class TransformEncodeError extends Error {
51
- constructor(schema, value, error) {
52
- super(`${error instanceof Error ? error.message : 'Unknown error'}`);
53
- this.schema = schema;
54
- this.value = value;
55
- }
56
- }
57
- exports.TransformEncodeError = TransformEncodeError;
58
- // ------------------------------------------------------------------
59
- // Encode
60
- // ------------------------------------------------------------------
61
- // prettier-ignore
62
- function Default(schema, value) {
63
- try {
64
- return (0, type_mjs_1.TTransform)(schema) ? schema[index_mjs_1.TransformKind].Encode(value) : value;
65
- }
66
- catch (error) {
67
- throw new TransformEncodeError(schema, value, error);
68
- }
69
- }
70
- // prettier-ignore
71
- function TArray(schema, references, value) {
72
- const defaulted = Default(schema, value);
73
- return (0, index_mjs_2.IsArray)(defaulted)
74
- ? defaulted.map((value) => Visit(schema.items, references, value))
75
- : defaulted;
76
- }
77
- // prettier-ignore
78
- function TIntersect(schema, references, value) {
79
- const defaulted = Default(schema, value);
80
- if (!(0, index_mjs_2.IsPlainObject)(value) || (0, index_mjs_2.IsValueType)(value))
81
- return defaulted;
82
- const knownKeys = (0, index_mjs_3.KeyOfStringResolve)(schema);
83
- const knownProperties = knownKeys.reduce((value, key) => {
84
- return key in defaulted
85
- ? { ...value, [key]: Visit((0, index_mjs_4.IndexedTypeResolve)(schema, [key]), references, value[key]) }
86
- : value;
87
- }, defaulted);
88
- if (!(0, type_mjs_1.TTransform)(schema.unevaluatedProperties)) {
89
- return Default(schema, knownProperties);
90
- }
91
- const unknownKeys = Object.getOwnPropertyNames(knownProperties);
92
- const unevaluatedProperties = schema.unevaluatedProperties;
93
- return unknownKeys.reduce((value, key) => {
94
- return !knownKeys.includes(key)
95
- ? { ...value, [key]: Default(unevaluatedProperties, value[key]) }
96
- : value;
97
- }, knownProperties);
98
- }
99
- // prettier-ignore
100
- function TNot(schema, references, value) {
101
- return Default(schema.not, Default(schema, value));
102
- }
103
- // prettier-ignore
104
- function TObject(schema, references, value) {
105
- const defaulted = Default(schema, value);
106
- if (!(0, index_mjs_2.IsPlainObject)(value))
107
- return defaulted;
108
- const knownKeys = (0, index_mjs_3.KeyOfStringResolve)(schema);
109
- const knownProperties = knownKeys.reduce((value, key) => {
110
- return key in value
111
- ? { ...value, [key]: Visit(schema.properties[key], references, value[key]) }
112
- : value;
113
- }, defaulted);
114
- if (!(0, type_mjs_1.TSchema)(schema.additionalProperties)) {
115
- return knownProperties;
116
- }
117
- const unknownKeys = Object.getOwnPropertyNames(knownProperties);
118
- const additionalProperties = schema.additionalProperties;
119
- return unknownKeys.reduce((value, key) => {
120
- return !knownKeys.includes(key)
121
- ? { ...value, [key]: Default(additionalProperties, value[key]) }
122
- : value;
123
- }, knownProperties);
124
- }
125
- // prettier-ignore
126
- function TRecord(schema, references, value) {
127
- const defaulted = Default(schema, value);
128
- if (!(0, index_mjs_2.IsPlainObject)(value))
129
- return defaulted;
130
- const pattern = Object.getOwnPropertyNames(schema.patternProperties)[0];
131
- const knownKeys = new RegExp(pattern);
132
- const knownProperties = Object.getOwnPropertyNames(value).reduce((value, key) => {
133
- return knownKeys.test(key)
134
- ? { ...value, [key]: Visit(schema.patternProperties[pattern], references, value[key]) }
135
- : value;
136
- }, defaulted);
137
- if (!(0, type_mjs_1.TSchema)(schema.additionalProperties)) {
138
- return Default(schema, knownProperties);
139
- }
140
- const unknownKeys = Object.getOwnPropertyNames(knownProperties);
141
- const additionalProperties = schema.additionalProperties;
142
- return unknownKeys.reduce((value, key) => {
143
- return !knownKeys.test(key)
144
- ? { ...value, [key]: Default(additionalProperties, value[key]) }
145
- : value;
146
- }, knownProperties);
147
- }
148
- // prettier-ignore
149
- function TRef(schema, references, value) {
150
- const target = (0, index_mjs_5.Deref)(schema, references);
151
- const resolved = Visit(target, references, value);
152
- return Default(schema, resolved);
153
- }
154
- // prettier-ignore
155
- function TThis(schema, references, value) {
156
- const target = (0, index_mjs_5.Deref)(schema, references);
157
- const resolved = Visit(target, references, value);
158
- return Default(schema, resolved);
159
- }
160
- // prettier-ignore
161
- function TTuple(schema, references, value) {
162
- const value1 = Default(schema, value);
163
- return (0, index_mjs_2.IsArray)(schema.items) ? schema.items.map((schema, index) => Visit(schema, references, value1[index])) : [];
164
- }
165
- // prettier-ignore
166
- function TUnion(schema, references, value) {
167
- // test value against union variants
168
- for (const subschema of schema.anyOf) {
169
- if (!(0, index_mjs_6.Check)(subschema, references, value))
170
- continue;
171
- const value1 = Visit(subschema, references, value);
172
- return Default(schema, value1);
173
- }
174
- // test transformed value against union variants
175
- for (const subschema of schema.anyOf) {
176
- const value1 = Visit(subschema, references, value);
177
- if (!(0, index_mjs_6.Check)(schema, references, value1))
178
- continue;
179
- return Default(schema, value1);
180
- }
181
- return Default(schema, value);
182
- }
183
- // prettier-ignore
184
- function Visit(schema, references, value) {
185
- const references_ = typeof schema.$id === 'string' ? [...references, schema] : references;
186
- const schema_ = schema;
187
- switch (schema[index_mjs_1.Kind]) {
188
- case 'Array':
189
- return TArray(schema_, references_, value);
190
- case 'Intersect':
191
- return TIntersect(schema_, references_, value);
192
- case 'Not':
193
- return TNot(schema_, references_, value);
194
- case 'Object':
195
- return TObject(schema_, references_, value);
196
- case 'Record':
197
- return TRecord(schema_, references_, value);
198
- case 'Ref':
199
- return TRef(schema_, references_, value);
200
- case 'This':
201
- return TThis(schema_, references_, value);
202
- case 'Tuple':
203
- return TTuple(schema_, references_, value);
204
- case 'Union':
205
- return TUnion(schema_, references_, value);
206
- default:
207
- return Default(schema_, value);
208
- }
209
- }
210
- /**
211
- * `[Internal]` Encodes the value and returns the result. This function expects the
212
- * caller to pass a statically checked value. This function does not check the encoded
213
- * result, meaning the result should be passed to `Check` before use. Refer to the
214
- * `Value.Encode()` function for implementation details.
215
- */
216
- function Encode(schema, references, value) {
217
- return Visit(schema, references, value);
218
- }
219
- exports.Encode = Encode;
@@ -1,146 +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.HasTransform = void 0;
31
- const type_mjs_1 = require("../../type/guard/type");
32
- const index_mjs_1 = require("../guard/index");
33
- const index_mjs_2 = require("../deref/index");
34
- const index_mjs_3 = require("../../type/symbols/index");
35
- // prettier-ignore
36
- function TArray(schema, references) {
37
- return (0, type_mjs_1.TTransform)(schema) || Visit(schema.items, references);
38
- }
39
- // prettier-ignore
40
- function TAsyncIterator(schema, references) {
41
- return (0, type_mjs_1.TTransform)(schema) || Visit(schema.items, references);
42
- }
43
- // prettier-ignore
44
- function TConstructor(schema, references) {
45
- return (0, type_mjs_1.TTransform)(schema) || Visit(schema.returns, references) || schema.parameters.some((schema) => Visit(schema, references));
46
- }
47
- // prettier-ignore
48
- function TFunction(schema, references) {
49
- return (0, type_mjs_1.TTransform)(schema) || Visit(schema.returns, references) || schema.parameters.some((schema) => Visit(schema, references));
50
- }
51
- // prettier-ignore
52
- function TIntersect(schema, references) {
53
- return (0, type_mjs_1.TTransform)(schema) || (0, type_mjs_1.TTransform)(schema.unevaluatedProperties) || schema.allOf.some((schema) => Visit(schema, references));
54
- }
55
- // prettier-ignore
56
- function TIterator(schema, references) {
57
- return (0, type_mjs_1.TTransform)(schema) || Visit(schema.items, references);
58
- }
59
- // prettier-ignore
60
- function TNot(schema, references) {
61
- return (0, type_mjs_1.TTransform)(schema) || Visit(schema.not, references);
62
- }
63
- // prettier-ignore
64
- function TObject(schema, references) {
65
- return ((0, type_mjs_1.TTransform)(schema) ||
66
- Object.values(schema.properties).some((schema) => Visit(schema, references)) ||
67
- ((0, type_mjs_1.TSchema)(schema.additionalProperties) && Visit(schema.additionalProperties, references)));
68
- }
69
- // prettier-ignore
70
- function TPromise(schema, references) {
71
- return (0, type_mjs_1.TTransform)(schema) || Visit(schema.item, references);
72
- }
73
- // prettier-ignore
74
- function TRecord(schema, references) {
75
- const pattern = Object.getOwnPropertyNames(schema.patternProperties)[0];
76
- const property = schema.patternProperties[pattern];
77
- return (0, type_mjs_1.TTransform)(schema) || Visit(property, references) || ((0, type_mjs_1.TSchema)(schema.additionalProperties) && (0, type_mjs_1.TTransform)(schema.additionalProperties));
78
- }
79
- // prettier-ignore
80
- function TRef(schema, references) {
81
- if ((0, type_mjs_1.TTransform)(schema))
82
- return true;
83
- return Visit((0, index_mjs_2.Deref)(schema, references), references);
84
- }
85
- // prettier-ignore
86
- function TThis(schema, references) {
87
- if ((0, type_mjs_1.TTransform)(schema))
88
- return true;
89
- return Visit((0, index_mjs_2.Deref)(schema, references), references);
90
- }
91
- // prettier-ignore
92
- function TTuple(schema, references) {
93
- return (0, type_mjs_1.TTransform)(schema) || (!(0, index_mjs_1.IsUndefined)(schema.items) && schema.items.some((schema) => Visit(schema, references)));
94
- }
95
- // prettier-ignore
96
- function TUnion(schema, references) {
97
- return (0, type_mjs_1.TTransform)(schema) || schema.anyOf.some((schema) => Visit(schema, references));
98
- }
99
- // prettier-ignore
100
- function Visit(schema, references) {
101
- const references_ = (0, index_mjs_1.IsString)(schema.$id) ? [...references, schema] : references;
102
- const schema_ = schema;
103
- if (schema.$id && visited.has(schema.$id))
104
- return false;
105
- if (schema.$id)
106
- visited.add(schema.$id);
107
- switch (schema[index_mjs_3.Kind]) {
108
- case 'Array':
109
- return TArray(schema_, references_);
110
- case 'AsyncIterator':
111
- return TAsyncIterator(schema_, references_);
112
- case 'Constructor':
113
- return TConstructor(schema_, references_);
114
- case 'Function':
115
- return TFunction(schema_, references_);
116
- case 'Intersect':
117
- return TIntersect(schema_, references_);
118
- case 'Iterator':
119
- return TIterator(schema_, references_);
120
- case 'Not':
121
- return TNot(schema_, references_);
122
- case 'Object':
123
- return TObject(schema_, references_);
124
- case 'Promise':
125
- return TPromise(schema_, references_);
126
- case 'Record':
127
- return TRecord(schema_, references_);
128
- case 'Ref':
129
- return TRef(schema_, references_);
130
- case 'This':
131
- return TThis(schema_, references_);
132
- case 'Tuple':
133
- return TTuple(schema_, references_);
134
- case 'Union':
135
- return TUnion(schema_, references_);
136
- default:
137
- return (0, type_mjs_1.TTransform)(schema);
138
- }
139
- }
140
- const visited = new Set();
141
- /** Returns true if this schema contains a transform codec */
142
- function HasTransform(schema, references) {
143
- visited.clear();
144
- return Visit(schema, references);
145
- }
146
- exports.HasTransform = HasTransform;
@@ -1,46 +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("./decode"), exports);
45
- __exportStar(require("./encode"), exports);
46
- __exportStar(require("./has"), exports);
@@ -1,31 +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.Value = void 0;
31
- exports.Value = require("./value");
@@ -1,125 +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.Mutate = exports.Patch = exports.Hash = exports.Diff = exports.Equal = exports.Errors = exports.Encode = exports.Default = exports.Decode = exports.Clone = exports.Convert = exports.Clean = exports.Check = exports.Create = exports.Cast = void 0;
31
- const index_mjs_1 = require("../transform/index");
32
- const index_mjs_2 = require("../mutate/index");
33
- const index_mjs_3 = require("../hash/index");
34
- const index_mjs_4 = require("../equal/index");
35
- const index_mjs_5 = require("../cast/index");
36
- const index_mjs_6 = require("../clone/index");
37
- const index_mjs_7 = require("../convert/index");
38
- const index_mjs_8 = require("../create/index");
39
- const index_mjs_9 = require("../clean/index");
40
- const index_mjs_10 = require("../check/index");
41
- const index_mjs_11 = require("../default/index");
42
- const index_mjs_12 = require("../delta/index");
43
- const index_mjs_13 = require("../../errors/index");
44
- /** Casts a value into a given type. The return value will retain as much information of the original value as possible. */
45
- function Cast(...args) {
46
- return index_mjs_5.Cast.apply(index_mjs_5.Cast, args);
47
- }
48
- exports.Cast = Cast;
49
- /** Creates a value from the given type */
50
- function Create(...args) {
51
- return index_mjs_8.Create.apply(index_mjs_8.Create, args);
52
- }
53
- exports.Create = Create;
54
- /** Returns true if the value matches the given type */
55
- function Check(...args) {
56
- return index_mjs_10.Check.apply(index_mjs_10.Check, args);
57
- }
58
- exports.Check = Check;
59
- /** `[Mutable]` Removes excess properties from a value and returns the result. This function does not check the value and returns an unknown type. You should Check the result before use. Clean is a mutable operation. To avoid mutation, Clone the value first. */
60
- function Clean(...args) {
61
- return index_mjs_9.Clean.apply(index_mjs_9.Clean, args);
62
- }
63
- exports.Clean = Clean;
64
- /** Converts any type mismatched values to their target type if a reasonable conversion is possible */
65
- function Convert(...args) {
66
- return index_mjs_7.Convert.apply(index_mjs_7.Convert, args);
67
- }
68
- exports.Convert = Convert;
69
- /** Returns a structural clone of the given value */
70
- function Clone(value) {
71
- return (0, index_mjs_6.Clone)(value);
72
- }
73
- exports.Clone = Clone;
74
- /** Decodes a value or throws if error */
75
- function Decode(...args) {
76
- const [schema, references, value] = args.length === 3 ? [args[0], args[1], args[2]] : [args[0], [], args[1]];
77
- if (!Check(schema, references, value))
78
- throw new index_mjs_1.TransformDecodeCheckError(schema, value, Errors(schema, references, value).First());
79
- return (0, index_mjs_1.Decode)(schema, references, value);
80
- }
81
- exports.Decode = Decode;
82
- /** `[Mutable]` Generates missing properties on a value using default schema annotations if available. This function does not check the value and returns an unknown type. You should Check the result before use. Default is a mutable operation. To avoid mutation, Clone the value first. */
83
- function Default(...args) {
84
- return index_mjs_11.Default.apply(index_mjs_11.Default, args);
85
- }
86
- exports.Default = Default;
87
- /** Encodes a value or throws if error */
88
- function Encode(...args) {
89
- const [schema, references, value] = args.length === 3 ? [args[0], args[1], args[2]] : [args[0], [], args[1]];
90
- const encoded = (0, index_mjs_1.Encode)(schema, references, value);
91
- if (!Check(schema, references, encoded))
92
- throw new index_mjs_1.TransformEncodeCheckError(schema, value, Errors(schema, references, value).First());
93
- return encoded;
94
- }
95
- exports.Encode = Encode;
96
- /** Returns an iterator for each error in this value. */
97
- function Errors(...args) {
98
- return index_mjs_13.Errors.apply(index_mjs_13.Errors, args);
99
- }
100
- exports.Errors = Errors;
101
- /** Returns true if left and right values are structurally equal */
102
- function Equal(left, right) {
103
- return (0, index_mjs_4.Equal)(left, right);
104
- }
105
- exports.Equal = Equal;
106
- /** Returns edits to transform the current value into the next value */
107
- function Diff(current, next) {
108
- return (0, index_mjs_12.Diff)(current, next);
109
- }
110
- exports.Diff = Diff;
111
- /** Returns a FNV1A-64 non cryptographic hash of the given value */
112
- function Hash(value) {
113
- return (0, index_mjs_3.Hash)(value);
114
- }
115
- exports.Hash = Hash;
116
- /** Returns a new value with edits applied to the given value */
117
- function Patch(current, edits) {
118
- return (0, index_mjs_12.Patch)(current, edits);
119
- }
120
- exports.Patch = Patch;
121
- /** `[Mutable]` Performs a deep mutable value assignment while retaining internal references. */
122
- function Mutate(current, next) {
123
- (0, index_mjs_2.Mutate)(current, next);
124
- }
125
- exports.Mutate = Mutate;
@@ -1,56 +0,0 @@
1
- import { ValueErrorIterator } from '../errors/index.mjs';
2
- import type { TSchema } from '../type/schema/index.mjs';
3
- import type { Static, StaticDecode, StaticEncode } from '../type/static/index.mjs';
4
- export type CheckFunction = (value: unknown) => boolean;
5
- export declare class TypeCheck<T extends TSchema> {
6
- private readonly schema;
7
- private readonly references;
8
- private readonly checkFunc;
9
- private readonly code;
10
- private readonly hasTransform;
11
- constructor(schema: T, references: TSchema[], checkFunc: CheckFunction, code: string);
12
- /** Returns the generated assertion code used to validate this type. */
13
- Code(): string;
14
- /** Returns an iterator for each error in this value. */
15
- Errors(value: unknown): ValueErrorIterator;
16
- /** Returns true if the value matches the compiled type. */
17
- Check(value: unknown): value is Static<T>;
18
- /**
19
- * Decodes a value or throws if error
20
- * @deprecated Use raw `Decode` from `Value` module
21
- */
22
- Decode(value: unknown): StaticDecode<T>;
23
- /**
24
- * Encodes a value or throws if error
25
- * @deprecated Use raw `Encode` from `Value` module
26
- */
27
- Encode(value: unknown): StaticEncode<T>;
28
- }
29
- export declare class TypeCompilerUnknownTypeError extends Error {
30
- readonly schema: TSchema;
31
- constructor(schema: TSchema);
32
- }
33
- export declare class TypeCompilerTypeGuardError extends Error {
34
- readonly schema: TSchema;
35
- constructor(schema: TSchema);
36
- }
37
- export declare namespace Policy {
38
- function IsExactOptionalProperty(value: string, key: string, expression: string): string;
39
- function IsObjectLike(value: string): string;
40
- function IsRecordLike(value: string): string;
41
- function IsNumberLike(value: string): string;
42
- function IsVoidLike(value: string): string;
43
- }
44
- export type TypeCompilerLanguageOption = 'typescript' | 'javascript';
45
- export interface TypeCompilerCodegenOptions {
46
- language?: TypeCompilerLanguageOption;
47
- }
48
- /** Compiles Types for Runtime Type Checking */
49
- export declare namespace TypeCompiler {
50
- /** Generates the code used to assert this type and returns it as a string */
51
- function Code<T extends TSchema>(schema: T, references: TSchema[], options?: TypeCompilerCodegenOptions): string;
52
- /** Generates the code used to assert this type and returns it as a string */
53
- function Code<T extends TSchema>(schema: T, options?: TypeCompilerCodegenOptions): string;
54
- /** Compiles a TypeBox type for optimal runtime type checking. Types must be valid TypeBox types of TSchema */
55
- function Compile<T extends TSchema>(schema: T, references?: TSchema[]): TypeCheck<T>;
56
- }