@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,44 +0,0 @@
1
- export type ObjectType = Record<PropertyKey, unknown>;
2
- export type ArrayType = unknown[];
3
- export type ValueType = null | undefined | symbol | bigint | number | boolean | string;
4
- export type TypedArrayType = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
5
- /** Returns true if this value is an async iterator */
6
- export declare function IsAsyncIterator(value: unknown): value is AsyncIterableIterator<any>;
7
- /** Returns true if this value is an iterator */
8
- export declare function IsIterator(value: unknown): value is IterableIterator<any>;
9
- /** Returns true if this value is a typed array */
10
- export declare function IsTypedArray(value: unknown): value is TypedArrayType;
11
- /** Returns true if this value is a Promise */
12
- export declare function IsPromise(value: unknown): value is Promise<unknown>;
13
- /** Returns true if the value is a Uint8Array */
14
- export declare function IsUint8Array(value: unknown): value is Uint8Array;
15
- /** Returns true if this value is a Date */
16
- export declare function IsDate(value: unknown): value is Date;
17
- /** Returns true if this value has this property key */
18
- export declare function HasPropertyKey<K extends PropertyKey>(value: Record<any, unknown>, key: K): value is ObjectType & Record<K, unknown>;
19
- /** Returns true if this object is not an instance of any other type */
20
- export declare function IsPlainObject(value: unknown): value is ObjectType;
21
- /** Returns true of this value is an object type */
22
- export declare function IsObject(value: unknown): value is ObjectType;
23
- /** Returns true if this value is an array, but not a typed array */
24
- export declare function IsArray(value: unknown): value is ArrayType;
25
- /** Returns true if this value is an undefined */
26
- export declare function IsUndefined(value: unknown): value is undefined;
27
- /** Returns true if this value is an null */
28
- export declare function IsNull(value: unknown): value is null;
29
- /** Returns true if this value is an boolean */
30
- export declare function IsBoolean(value: unknown): value is boolean;
31
- /** Returns true if this value is an number */
32
- export declare function IsNumber(value: unknown): value is number;
33
- /** Returns true if this value is an integer */
34
- export declare function IsInteger(value: unknown): value is number;
35
- /** Returns true if this value is bigint */
36
- export declare function IsBigInt(value: unknown): value is bigint;
37
- /** Returns true if this value is string */
38
- export declare function IsString(value: unknown): value is string;
39
- /** Returns true if this value is a function */
40
- export declare function IsFunction(value: unknown): value is Function;
41
- /** Returns true if this value is a symbol */
42
- export declare function IsSymbol(value: unknown): value is symbol;
43
- /** Returns true if this value is a value type such as number, string, boolean */
44
- export declare function IsValueType(value: unknown): value is ValueType;
@@ -1,123 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/value
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- // --------------------------------------------------------------------------
29
- // Iterators
30
- // --------------------------------------------------------------------------
31
- /** Returns true if this value is an async iterator */
32
- export function IsAsyncIterator(value) {
33
- return IsObject(value) && Symbol.asyncIterator in value;
34
- }
35
- /** Returns true if this value is an iterator */
36
- export function IsIterator(value) {
37
- return IsObject(value) && Symbol.iterator in value;
38
- }
39
- // --------------------------------------------------------------------------
40
- // Nominal
41
- // --------------------------------------------------------------------------
42
- /** Returns true if this value is a typed array */
43
- export function IsTypedArray(value) {
44
- return ArrayBuffer.isView(value);
45
- }
46
- /** Returns true if this value is a Promise */
47
- export function IsPromise(value) {
48
- return value instanceof Promise;
49
- }
50
- /** Returns true if the value is a Uint8Array */
51
- export function IsUint8Array(value) {
52
- return value instanceof Uint8Array;
53
- }
54
- /** Returns true if this value is a Date */
55
- export function IsDate(value) {
56
- return value instanceof Date && Number.isFinite(value.getTime());
57
- }
58
- // --------------------------------------------------------------------------
59
- // Standard
60
- // --------------------------------------------------------------------------
61
- /** Returns true if this value has this property key */
62
- export function HasPropertyKey(value, key) {
63
- return key in value;
64
- }
65
- /** Returns true if this object is not an instance of any other type */
66
- export function IsPlainObject(value) {
67
- return IsObject(value) && IsFunction(value.constructor) && value.constructor.name === 'Object';
68
- }
69
- /** Returns true of this value is an object type */
70
- export function IsObject(value) {
71
- return value !== null && typeof value === 'object';
72
- }
73
- /** Returns true if this value is an array, but not a typed array */
74
- export function IsArray(value) {
75
- return Array.isArray(value) && !ArrayBuffer.isView(value);
76
- }
77
- /** Returns true if this value is an undefined */
78
- export function IsUndefined(value) {
79
- return value === undefined;
80
- }
81
- /** Returns true if this value is an null */
82
- export function IsNull(value) {
83
- return value === null;
84
- }
85
- /** Returns true if this value is an boolean */
86
- export function IsBoolean(value) {
87
- return typeof value === 'boolean';
88
- }
89
- /** Returns true if this value is an number */
90
- export function IsNumber(value) {
91
- return typeof value === 'number';
92
- }
93
- /** Returns true if this value is an integer */
94
- export function IsInteger(value) {
95
- return IsNumber(value) && Number.isInteger(value);
96
- }
97
- /** Returns true if this value is bigint */
98
- export function IsBigInt(value) {
99
- return typeof value === 'bigint';
100
- }
101
- /** Returns true if this value is string */
102
- export function IsString(value) {
103
- return typeof value === 'string';
104
- }
105
- /** Returns true if this value is a function */
106
- export function IsFunction(value) {
107
- return typeof value === 'function';
108
- }
109
- /** Returns true if this value is a symbol */
110
- export function IsSymbol(value) {
111
- return typeof value === 'symbol';
112
- }
113
- /** Returns true if this value is a value type such as number, string, boolean */
114
- export function IsValueType(value) {
115
- // prettier-ignore
116
- return (IsBigInt(value) ||
117
- IsBoolean(value) ||
118
- IsNull(value) ||
119
- IsNumber(value) ||
120
- IsString(value) ||
121
- IsSymbol(value) ||
122
- IsUndefined(value));
123
- }
@@ -1,28 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/value
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- export * from './guard.mjs';
@@ -1,6 +0,0 @@
1
- export declare class ValueHashError extends Error {
2
- readonly value: unknown;
3
- constructor(value: unknown);
4
- }
5
- /** Creates a FNV1A-64 non cryptographic hash of the given value */
6
- export declare function Hash(value: unknown): bigint;
@@ -1,173 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/value
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- import { IsArray, IsBoolean, IsBigInt, IsDate, IsNull, IsNumber, IsPlainObject, IsString, IsSymbol, IsUint8Array, IsUndefined } from '../guard/index.mjs';
29
- // ------------------------------------------------------------------
30
- // Errors
31
- // ------------------------------------------------------------------
32
- export class ValueHashError extends Error {
33
- value;
34
- constructor(value) {
35
- super(`Unable to hash value`);
36
- this.value = value;
37
- }
38
- }
39
- // ------------------------------------------------------------------
40
- // ByteMarker
41
- // ------------------------------------------------------------------
42
- var ByteMarker;
43
- (function (ByteMarker) {
44
- ByteMarker[ByteMarker["Undefined"] = 0] = "Undefined";
45
- ByteMarker[ByteMarker["Null"] = 1] = "Null";
46
- ByteMarker[ByteMarker["Boolean"] = 2] = "Boolean";
47
- ByteMarker[ByteMarker["Number"] = 3] = "Number";
48
- ByteMarker[ByteMarker["String"] = 4] = "String";
49
- ByteMarker[ByteMarker["Object"] = 5] = "Object";
50
- ByteMarker[ByteMarker["Array"] = 6] = "Array";
51
- ByteMarker[ByteMarker["Date"] = 7] = "Date";
52
- ByteMarker[ByteMarker["Uint8Array"] = 8] = "Uint8Array";
53
- ByteMarker[ByteMarker["Symbol"] = 9] = "Symbol";
54
- ByteMarker[ByteMarker["BigInt"] = 10] = "BigInt";
55
- })(ByteMarker || (ByteMarker = {}));
56
- // ------------------------------------------------------------------
57
- // State
58
- // ------------------------------------------------------------------
59
- let Accumulator = BigInt('14695981039346656037');
60
- const [Prime, Size] = [BigInt('1099511628211'), BigInt('2') ** BigInt('64')];
61
- const Bytes = Array.from({ length: 256 }).map((_, i) => BigInt(i));
62
- const F64 = new Float64Array(1);
63
- const F64In = new DataView(F64.buffer);
64
- const F64Out = new Uint8Array(F64.buffer);
65
- // ------------------------------------------------------------------
66
- // NumberToBytes
67
- // ------------------------------------------------------------------
68
- function* NumberToBytes(value) {
69
- const byteCount = value === 0 ? 1 : Math.ceil(Math.floor(Math.log2(value) + 1) / 8);
70
- for (let i = 0; i < byteCount; i++) {
71
- yield (value >> (8 * (byteCount - 1 - i))) & 0xff;
72
- }
73
- }
74
- // ------------------------------------------------------------------
75
- // Hashing Functions
76
- // ------------------------------------------------------------------
77
- function ArrayType(value) {
78
- FNV1A64(ByteMarker.Array);
79
- for (const item of value) {
80
- Visit(item);
81
- }
82
- }
83
- function BooleanType(value) {
84
- FNV1A64(ByteMarker.Boolean);
85
- FNV1A64(value ? 1 : 0);
86
- }
87
- function BigIntType(value) {
88
- FNV1A64(ByteMarker.BigInt);
89
- F64In.setBigInt64(0, value);
90
- for (const byte of F64Out) {
91
- FNV1A64(byte);
92
- }
93
- }
94
- function DateType(value) {
95
- FNV1A64(ByteMarker.Date);
96
- Visit(value.getTime());
97
- }
98
- function NullType(value) {
99
- FNV1A64(ByteMarker.Null);
100
- }
101
- function NumberType(value) {
102
- FNV1A64(ByteMarker.Number);
103
- F64In.setFloat64(0, value);
104
- for (const byte of F64Out) {
105
- FNV1A64(byte);
106
- }
107
- }
108
- function ObjectType(value) {
109
- FNV1A64(ByteMarker.Object);
110
- for (const key of globalThis.Object.keys(value).sort()) {
111
- Visit(key);
112
- Visit(value[key]);
113
- }
114
- }
115
- function StringType(value) {
116
- FNV1A64(ByteMarker.String);
117
- for (let i = 0; i < value.length; i++) {
118
- for (const byte of NumberToBytes(value.charCodeAt(i))) {
119
- FNV1A64(byte);
120
- }
121
- }
122
- }
123
- function SymbolType(value) {
124
- FNV1A64(ByteMarker.Symbol);
125
- Visit(value.description);
126
- }
127
- function Uint8ArrayType(value) {
128
- FNV1A64(ByteMarker.Uint8Array);
129
- for (let i = 0; i < value.length; i++) {
130
- FNV1A64(value[i]);
131
- }
132
- }
133
- function UndefinedType(value) {
134
- return FNV1A64(ByteMarker.Undefined);
135
- }
136
- function Visit(value) {
137
- if (IsArray(value))
138
- return ArrayType(value);
139
- if (IsBoolean(value))
140
- return BooleanType(value);
141
- if (IsBigInt(value))
142
- return BigIntType(value);
143
- if (IsDate(value))
144
- return DateType(value);
145
- if (IsNull(value))
146
- return NullType(value);
147
- if (IsNumber(value))
148
- return NumberType(value);
149
- if (IsPlainObject(value))
150
- return ObjectType(value);
151
- if (IsString(value))
152
- return StringType(value);
153
- if (IsSymbol(value))
154
- return SymbolType(value);
155
- if (IsUint8Array(value))
156
- return Uint8ArrayType(value);
157
- if (IsUndefined(value))
158
- return UndefinedType(value);
159
- throw new ValueHashError(value);
160
- }
161
- function FNV1A64(byte) {
162
- Accumulator = Accumulator ^ Bytes[byte];
163
- Accumulator = (Accumulator * Prime) % Size;
164
- }
165
- // ------------------------------------------------------------------
166
- // Hash
167
- // ------------------------------------------------------------------
168
- /** Creates a FNV1A-64 non cryptographic hash of the given value */
169
- export function Hash(value) {
170
- Accumulator = BigInt('14695981039346656037');
171
- Visit(value);
172
- return Accumulator;
173
- }
@@ -1,28 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/value
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- export * from './hash.mjs';
@@ -1,18 +0,0 @@
1
- export { ValueError, ValueErrorType, ValueErrorIterator } from '../errors/index.mjs';
2
- export { Cast, ValueCastArrayUniqueItemsTypeError, ValueCastNeverTypeError, ValueCastRecursiveTypeError, ValueCastUnknownTypeError } from './cast/index.mjs';
3
- export { Check } from './check/index.mjs';
4
- export { Clean } from './clean/index.mjs';
5
- export { Clone } from './clone/index.mjs';
6
- export { Convert, ValueConvertUnknownTypeError } from './convert/index.mjs';
7
- export { Create, ValueCreateIntersectTypeError, ValueCreateNeverTypeError, ValueCreateNotTypeError, ValueCreateRecursiveInstantiationError, ValueCreateTempateLiteralTypeError, ValueCreateUnknownTypeError } from './create/index.mjs';
8
- export { Default } from './default/index.mjs';
9
- export { Diff, Patch, Edit, Delete, Insert, Update, ValueDeltaObjectWithSymbolKeyError, ValueDeltaUnableToDiffUnknownValue } from './delta/index.mjs';
10
- export { Equal } from './equal/index.mjs';
11
- export { Hash, ValueHashError } from './hash/index.mjs';
12
- export { Mutate, type Mutable, ValueMutateInvalidRootMutationError, ValueMutateTypeMismatchError } from './mutate/index.mjs';
13
- export { ValuePointer } from './pointer/index.mjs';
14
- export { Decode, Encode, HasTransform, TransformDecodeCheckError, TransformDecodeError, TransformEncodeCheckError, TransformEncodeError } from './transform/index.mjs';
15
- export { ArrayType, HasPropertyKey, IsArray, IsAsyncIterator, IsBigInt, IsBoolean, IsDate, IsFunction, IsInteger, IsIterator, IsNull, IsNumber, IsObject, IsPlainObject, IsPromise, IsString, IsSymbol, IsTypedArray, IsUint8Array, IsUndefined, IsValueType, ObjectType, TypedArrayType, ValueType, } from './guard/index.mjs';
16
- import { Value } from './value/index.mjs';
17
- export { Value };
18
- export default Value;
@@ -1,57 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/value
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- // ------------------------------------------------------------------
29
- // Value Errors (re-export)
30
- // ------------------------------------------------------------------
31
- export { ValueErrorType, ValueErrorIterator } from '../errors/index.mjs';
32
- // ------------------------------------------------------------------
33
- // Value Operators
34
- // ------------------------------------------------------------------
35
- export { Cast, ValueCastArrayUniqueItemsTypeError, ValueCastNeverTypeError, ValueCastRecursiveTypeError, ValueCastUnknownTypeError } from './cast/index.mjs';
36
- export { Check } from './check/index.mjs';
37
- export { Clean } from './clean/index.mjs';
38
- export { Clone } from './clone/index.mjs';
39
- export { Convert, ValueConvertUnknownTypeError } from './convert/index.mjs';
40
- export { Create, ValueCreateIntersectTypeError, ValueCreateNeverTypeError, ValueCreateNotTypeError, ValueCreateRecursiveInstantiationError, ValueCreateTempateLiteralTypeError, ValueCreateUnknownTypeError } from './create/index.mjs';
41
- export { Default } from './default/index.mjs';
42
- export { Diff, Patch, Edit, Delete, Insert, Update, ValueDeltaObjectWithSymbolKeyError, ValueDeltaUnableToDiffUnknownValue } from './delta/index.mjs';
43
- export { Equal } from './equal/index.mjs';
44
- export { Hash, ValueHashError } from './hash/index.mjs';
45
- export { Mutate, ValueMutateInvalidRootMutationError, ValueMutateTypeMismatchError } from './mutate/index.mjs';
46
- export { ValuePointer } from './pointer/index.mjs';
47
- export { Decode, Encode, HasTransform, TransformDecodeCheckError, TransformDecodeError, TransformEncodeCheckError, TransformEncodeError } from './transform/index.mjs';
48
- // ------------------------------------------------------------------
49
- // Value Guards
50
- // ------------------------------------------------------------------
51
- export { HasPropertyKey, IsArray, IsAsyncIterator, IsBigInt, IsBoolean, IsDate, IsFunction, IsInteger, IsIterator, IsNull, IsNumber, IsObject, IsPlainObject, IsPromise, IsString, IsSymbol, IsTypedArray, IsUint8Array, IsUndefined, IsValueType, } from './guard/index.mjs';
52
- // ------------------------------------------------------------------
53
- // Value Namespace
54
- // ------------------------------------------------------------------
55
- import { Value } from './value/index.mjs';
56
- export { Value };
57
- export default Value;
@@ -1,28 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/value
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- export * from './mutate.mjs';
@@ -1,11 +0,0 @@
1
- export declare class ValueMutateTypeMismatchError extends Error {
2
- constructor();
3
- }
4
- export declare class ValueMutateInvalidRootMutationError extends Error {
5
- constructor();
6
- }
7
- export type Mutable = {
8
- [key: string]: unknown;
9
- } | unknown[];
10
- /** `[Mutable]` Performs a deep mutable value assignment while retaining internal references */
11
- export declare function Mutate(current: Mutable, next: Mutable): void;
@@ -1,123 +0,0 @@
1
- /*--------------------------------------------------------------------------
2
-
3
- @sinclair/typebox/value
4
-
5
- The MIT License (MIT)
6
-
7
- Copyright (c) 2017-2023 Haydn Paterson (sinclair) <haydn.developer@gmail.com>
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in
17
- all copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- THE SOFTWARE.
26
-
27
- ---------------------------------------------------------------------------*/
28
- import { IsPlainObject, IsArray, IsTypedArray, IsValueType } from '../guard/index.mjs';
29
- import { ValuePointer } from '../pointer/index.mjs';
30
- import { Clone } from '../clone/index.mjs';
31
- // ------------------------------------------------------------------
32
- // Errors
33
- // ------------------------------------------------------------------
34
- export class ValueMutateTypeMismatchError extends Error {
35
- constructor() {
36
- super('Cannot assign due type mismatch of assignable values');
37
- }
38
- }
39
- export class ValueMutateInvalidRootMutationError extends Error {
40
- constructor() {
41
- super('Only object and array types can be mutated at the root level');
42
- }
43
- }
44
- function ObjectType(root, path, current, next) {
45
- if (!IsPlainObject(current)) {
46
- ValuePointer.Set(root, path, Clone(next));
47
- }
48
- else {
49
- const currentKeys = Object.keys(current);
50
- const nextKeys = Object.keys(next);
51
- for (const currentKey of currentKeys) {
52
- if (!nextKeys.includes(currentKey)) {
53
- delete current[currentKey];
54
- }
55
- }
56
- for (const nextKey of nextKeys) {
57
- if (!currentKeys.includes(nextKey)) {
58
- current[nextKey] = null;
59
- }
60
- }
61
- for (const nextKey of nextKeys) {
62
- Visit(root, `${path}/${nextKey}`, current[nextKey], next[nextKey]);
63
- }
64
- }
65
- }
66
- function ArrayType(root, path, current, next) {
67
- if (!IsArray(current)) {
68
- ValuePointer.Set(root, path, Clone(next));
69
- }
70
- else {
71
- for (let index = 0; index < next.length; index++) {
72
- Visit(root, `${path}/${index}`, current[index], next[index]);
73
- }
74
- current.splice(next.length);
75
- }
76
- }
77
- function TypedArrayType(root, path, current, next) {
78
- if (IsTypedArray(current) && current.length === next.length) {
79
- for (let i = 0; i < current.length; i++) {
80
- current[i] = next[i];
81
- }
82
- }
83
- else {
84
- ValuePointer.Set(root, path, Clone(next));
85
- }
86
- }
87
- function ValueType(root, path, current, next) {
88
- if (current === next)
89
- return;
90
- ValuePointer.Set(root, path, next);
91
- }
92
- function Visit(root, path, current, next) {
93
- if (IsArray(next))
94
- return ArrayType(root, path, current, next);
95
- if (IsTypedArray(next))
96
- return TypedArrayType(root, path, current, next);
97
- if (IsPlainObject(next))
98
- return ObjectType(root, path, current, next);
99
- if (IsValueType(next))
100
- return ValueType(root, path, current, next);
101
- }
102
- // ------------------------------------------------------------------
103
- // IsNonMutableValue
104
- // ------------------------------------------------------------------
105
- function IsNonMutableValue(value) {
106
- return IsTypedArray(value) || IsValueType(value);
107
- }
108
- function IsMismatchedValue(current, next) {
109
- // prettier-ignore
110
- return ((IsPlainObject(current) && IsArray(next)) ||
111
- (IsArray(current) && IsPlainObject(next)));
112
- }
113
- // ------------------------------------------------------------------
114
- // Mutate
115
- // ------------------------------------------------------------------
116
- /** `[Mutable]` Performs a deep mutable value assignment while retaining internal references */
117
- export function Mutate(current, next) {
118
- if (IsNonMutableValue(current) || IsNonMutableValue(next))
119
- throw new ValueMutateInvalidRootMutationError();
120
- if (IsMismatchedValue(current, next))
121
- throw new ValueMutateTypeMismatchError();
122
- Visit(current, '', current, next);
123
- }