arktype 2.0.0-dev.8 → 2.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (562) hide show
  1. package/LICENSE +7 -0
  2. package/out/config.d.ts +25 -9
  3. package/out/config.js +2 -18
  4. package/out/generic.d.ts +154 -19
  5. package/out/generic.js +37 -24
  6. package/out/index.d.ts +7 -0
  7. package/out/index.js +6 -0
  8. package/out/intersect.d.ts +28 -0
  9. package/out/intersect.js +1 -0
  10. package/out/keys.d.ts +16 -0
  11. package/out/keys.js +1 -0
  12. package/out/keywords/ark.d.ts +29 -66
  13. package/out/keywords/ark.js +18 -29
  14. package/out/keywords/ast.d.ts +193 -0
  15. package/out/keywords/ast.js +2 -0
  16. package/out/keywords/builtin.d.ts +13 -0
  17. package/out/keywords/builtin.js +10 -0
  18. package/out/keywords/constructors/Array.d.ts +16 -0
  19. package/out/keywords/constructors/Array.js +19 -0
  20. package/out/keywords/constructors/FormData.d.ts +9 -0
  21. package/out/keywords/constructors/FormData.js +25 -0
  22. package/out/keywords/constructors/TypedArray.d.ts +15 -0
  23. package/out/keywords/constructors/TypedArray.js +14 -0
  24. package/out/keywords/constructors/constructors.d.ts +41 -0
  25. package/out/keywords/constructors/constructors.js +31 -0
  26. package/out/keywords/number/epoch.d.ts +10 -0
  27. package/out/keywords/number/epoch.js +26 -0
  28. package/out/keywords/number/integer.d.ts +3 -0
  29. package/out/keywords/number/integer.js +5 -0
  30. package/out/keywords/number/number.d.ts +26 -0
  31. package/out/keywords/number/number.js +9 -0
  32. package/out/keywords/string/alpha.d.ts +7 -0
  33. package/out/keywords/string/alpha.js +2 -0
  34. package/out/keywords/string/alphanumeric.d.ts +7 -0
  35. package/out/keywords/string/alphanumeric.js +2 -0
  36. package/out/keywords/string/capitalize.d.ts +14 -0
  37. package/out/keywords/string/capitalize.js +12 -0
  38. package/out/keywords/string/creditCard.d.ts +8 -0
  39. package/out/keywords/string/creditCard.js +37 -0
  40. package/out/keywords/string/date.d.ts +54 -0
  41. package/out/keywords/string/date.js +98 -0
  42. package/out/keywords/string/digits.d.ts +7 -0
  43. package/out/keywords/string/digits.js +2 -0
  44. package/out/keywords/string/email.d.ts +7 -0
  45. package/out/keywords/string/email.js +4 -0
  46. package/out/keywords/string/integer.d.ts +15 -0
  47. package/out/keywords/string/integer.js +16 -0
  48. package/out/keywords/string/ip.d.ts +20 -0
  49. package/out/keywords/string/ip.js +23 -0
  50. package/out/keywords/string/json.d.ts +14 -0
  51. package/out/keywords/string/json.js +45 -0
  52. package/out/keywords/string/lower.d.ts +14 -0
  53. package/out/keywords/string/lower.js +12 -0
  54. package/out/keywords/string/normalize.d.ts +72 -0
  55. package/out/keywords/string/normalize.js +43 -0
  56. package/out/keywords/string/numeric.d.ts +14 -0
  57. package/out/keywords/string/numeric.js +13 -0
  58. package/out/keywords/string/semver.d.ts +7 -0
  59. package/out/keywords/string/semver.js +4 -0
  60. package/out/keywords/string/string.d.ts +57 -0
  61. package/out/keywords/string/string.js +41 -0
  62. package/out/keywords/string/trim.d.ts +14 -0
  63. package/out/keywords/string/trim.js +14 -0
  64. package/out/keywords/string/upper.d.ts +14 -0
  65. package/out/keywords/string/upper.js +12 -0
  66. package/out/keywords/string/url.d.ts +14 -0
  67. package/out/keywords/string/url.js +37 -0
  68. package/out/keywords/string/utils.d.ts +2 -0
  69. package/out/keywords/string/utils.js +10 -0
  70. package/out/keywords/string/uuid.d.ts +38 -0
  71. package/out/keywords/string/uuid.js +19 -0
  72. package/out/keywords/ts.d.ts +53 -0
  73. package/out/keywords/ts.js +51 -0
  74. package/out/keywords/utils.d.ts +1 -0
  75. package/out/keywords/utils.js +2 -0
  76. package/out/module.d.ts +21 -10
  77. package/out/module.js +3 -4
  78. package/out/parser/definition.d.ts +21 -17
  79. package/out/parser/definition.js +5 -6
  80. package/out/parser/objectLiteral.d.ts +54 -37
  81. package/out/parser/objectLiteral.js +75 -43
  82. package/out/parser/semantic/bounds.d.ts +11 -11
  83. package/out/parser/semantic/bounds.js +0 -1
  84. package/out/parser/semantic/default.d.ts +8 -0
  85. package/out/parser/semantic/default.js +1 -0
  86. package/out/parser/semantic/divisor.d.ts +5 -6
  87. package/out/parser/semantic/divisor.js +0 -1
  88. package/out/parser/semantic/infer.d.ts +21 -13
  89. package/out/parser/semantic/infer.js +0 -1
  90. package/out/parser/semantic/keyof.d.ts +7 -0
  91. package/out/parser/semantic/keyof.js +1 -0
  92. package/out/parser/semantic/utils.d.ts +3 -4
  93. package/out/parser/semantic/utils.js +0 -1
  94. package/out/parser/semantic/validate.d.ts +21 -18
  95. package/out/parser/semantic/validate.js +0 -2
  96. package/out/parser/string/reduce/dynamic.d.ts +16 -15
  97. package/out/parser/string/reduce/dynamic.js +8 -8
  98. package/out/parser/string/reduce/shared.d.ts +17 -30
  99. package/out/parser/string/reduce/shared.js +4 -3
  100. package/out/parser/string/reduce/static.d.ts +22 -24
  101. package/out/parser/string/reduce/static.js +0 -1
  102. package/out/parser/string/shift/operand/date.d.ts +3 -6
  103. package/out/parser/string/shift/operand/date.js +1 -2
  104. package/out/parser/string/shift/operand/enclosed.d.ts +5 -16
  105. package/out/parser/string/shift/operand/enclosed.js +5 -5
  106. package/out/parser/string/shift/operand/genericArgs.d.ts +13 -14
  107. package/out/parser/string/shift/operand/genericArgs.js +7 -13
  108. package/out/parser/string/shift/operand/operand.d.ts +8 -8
  109. package/out/parser/string/shift/operand/operand.js +5 -7
  110. package/out/parser/string/shift/operand/unenclosed.d.ts +31 -19
  111. package/out/parser/string/shift/operand/unenclosed.js +10 -15
  112. package/out/parser/string/shift/operator/bounds.d.ts +15 -27
  113. package/out/parser/string/shift/operator/bounds.js +11 -17
  114. package/out/parser/string/shift/operator/default.d.ts +19 -0
  115. package/out/parser/string/shift/operator/default.js +17 -0
  116. package/out/parser/string/shift/operator/divisor.d.ts +4 -5
  117. package/out/parser/string/shift/operator/divisor.js +1 -2
  118. package/out/parser/string/shift/operator/operator.d.ts +8 -8
  119. package/out/parser/string/shift/operator/operator.js +1 -2
  120. package/out/parser/string/shift/scanner.d.ts +26 -31
  121. package/out/parser/string/shift/scanner.js +23 -21
  122. package/out/parser/string/string.d.ts +14 -12
  123. package/out/parser/string/string.js +5 -3
  124. package/out/parser/tuple.d.ts +22 -21
  125. package/out/parser/tuple.js +12 -24
  126. package/out/scope.d.ts +102 -55
  127. package/out/scope.js +61 -60
  128. package/out/subtypes/array.d.ts +13 -0
  129. package/out/subtypes/array.js +1 -0
  130. package/out/subtypes/base.d.ts +84 -0
  131. package/out/subtypes/base.js +1 -0
  132. package/out/subtypes/date.d.ts +11 -0
  133. package/out/subtypes/date.js +1 -0
  134. package/out/subtypes/instantiate.d.ts +16 -0
  135. package/out/subtypes/instantiate.js +1 -0
  136. package/out/subtypes/morph.d.ts +13 -0
  137. package/out/subtypes/morph.js +1 -0
  138. package/out/subtypes/number.d.ts +12 -0
  139. package/out/subtypes/number.js +1 -0
  140. package/out/subtypes/object.d.ts +33 -0
  141. package/out/subtypes/object.js +1 -0
  142. package/out/subtypes/string.d.ts +13 -0
  143. package/out/subtypes/string.js +1 -0
  144. package/out/subtypes/validator.d.ts +11 -0
  145. package/out/subtypes/validator.js +1 -0
  146. package/out/type.d.ts +30 -50
  147. package/out/type.js +19 -15
  148. package/package.json +46 -43
  149. package/__tests__/array.test.ts +0 -391
  150. package/__tests__/badDefinitionType.test.ts +0 -58
  151. package/__tests__/basis.test.ts +0 -50
  152. package/__tests__/bounds.test.ts +0 -318
  153. package/__tests__/cast.test.ts +0 -37
  154. package/__tests__/completions.test.ts +0 -51
  155. package/__tests__/config.test.ts +0 -85
  156. package/__tests__/cyclic.test.ts +0 -148
  157. package/__tests__/dateLiteral.test.ts +0 -36
  158. package/__tests__/declared.test.ts +0 -124
  159. package/__tests__/discrimination.test.ts +0 -74
  160. package/__tests__/divisor.test.ts +0 -114
  161. package/__tests__/enclosed.test.ts +0 -107
  162. package/__tests__/examples.test.ts +0 -56
  163. package/__tests__/expressions.test.ts +0 -210
  164. package/__tests__/generateBenchData.ts +0 -89
  165. package/__tests__/generated/cyclic.ts +0 -3058
  166. package/__tests__/generic.test.ts +0 -313
  167. package/__tests__/group.test.ts +0 -85
  168. package/__tests__/hkt.test.ts +0 -22
  169. package/__tests__/imports.test.ts +0 -120
  170. package/__tests__/instanceof.test.ts +0 -104
  171. package/__tests__/intersection.test.ts +0 -108
  172. package/__tests__/keyTraversal.test.ts +0 -77
  173. package/__tests__/keyof.test.ts +0 -150
  174. package/__tests__/keywords.test.ts +0 -214
  175. package/__tests__/literal.test.ts +0 -74
  176. package/__tests__/match.bench.ts +0 -31
  177. package/__tests__/match.test.ts +0 -234
  178. package/__tests__/methods.bench.ts +0 -22
  179. package/__tests__/narrow.test.ts +0 -100
  180. package/__tests__/object.bench.ts +0 -28
  181. package/__tests__/objectLiteral.test.ts +0 -319
  182. package/__tests__/operand.bench.ts +0 -45
  183. package/__tests__/operator.bench.ts +0 -130
  184. package/__tests__/pipe.test.ts +0 -501
  185. package/__tests__/realWorld.test.ts +0 -63
  186. package/__tests__/regex.test.ts +0 -68
  187. package/__tests__/scope.bench.ts +0 -39
  188. package/__tests__/scope.test.ts +0 -177
  189. package/__tests__/serialization.test.ts +0 -19
  190. package/__tests__/string.test.ts +0 -52
  191. package/__tests__/submodule.test.ts +0 -86
  192. package/__tests__/this.test.ts +0 -83
  193. package/__tests__/thunk.test.ts +0 -86
  194. package/__tests__/traverse.test.ts +0 -133
  195. package/__tests__/tsGenerics.test.ts +0 -12
  196. package/__tests__/type.test.ts +0 -36
  197. package/__tests__/typeReference.test.ts +0 -39
  198. package/__tests__/unenclosed.test.ts +0 -136
  199. package/__tests__/union.test.ts +0 -214
  200. package/ark.ts +0 -47
  201. package/generic.ts +0 -69
  202. package/main.ts +0 -6
  203. package/match.ts +0 -218
  204. package/module.ts +0 -15
  205. package/out/ark.d.ts +0 -29
  206. package/out/ark.d.ts.map +0 -1
  207. package/out/ark.js +0 -11
  208. package/out/ark.js.map +0 -1
  209. package/out/base.d.ts +0 -205
  210. package/out/base.d.ts.map +0 -1
  211. package/out/base.js +0 -320
  212. package/out/base.js.map +0 -1
  213. package/out/builtins/builtins.d.ts +0 -23
  214. package/out/builtins/builtins.d.ts.map +0 -1
  215. package/out/builtins/builtins.js +0 -15
  216. package/out/builtins/builtins.js.map +0 -1
  217. package/out/builtins/jsObjects.d.ts +0 -19
  218. package/out/builtins/jsObjects.d.ts.map +0 -1
  219. package/out/builtins/jsObjects.js +0 -18
  220. package/out/builtins/jsObjects.js.map +0 -1
  221. package/out/builtins/parsing.d.ts +0 -16
  222. package/out/builtins/parsing.d.ts.map +0 -1
  223. package/out/builtins/parsing.js +0 -62
  224. package/out/builtins/parsing.js.map +0 -1
  225. package/out/builtins/tsGenerics.d.ts +0 -2
  226. package/out/builtins/tsGenerics.d.ts.map +0 -1
  227. package/out/builtins/tsGenerics.js +0 -26
  228. package/out/builtins/tsGenerics.js.map +0 -1
  229. package/out/builtins/tsKeywords.d.ts +0 -23
  230. package/out/builtins/tsKeywords.d.ts.map +0 -1
  231. package/out/builtins/tsKeywords.js +0 -23
  232. package/out/builtins/tsKeywords.js.map +0 -1
  233. package/out/builtins/utils/creditCard.d.ts +0 -3
  234. package/out/builtins/utils/creditCard.d.ts.map +0 -1
  235. package/out/builtins/utils/creditCard.js +0 -35
  236. package/out/builtins/utils/creditCard.js.map +0 -1
  237. package/out/builtins/utils/date.d.ts +0 -41
  238. package/out/builtins/utils/date.d.ts.map +0 -1
  239. package/out/builtins/utils/date.js +0 -56
  240. package/out/builtins/utils/date.js.map +0 -1
  241. package/out/builtins/validation.d.ts +0 -19
  242. package/out/builtins/validation.d.ts.map +0 -1
  243. package/out/builtins/validation.js +0 -74
  244. package/out/builtins/validation.js.map +0 -1
  245. package/out/config.d.ts.map +0 -1
  246. package/out/config.js.map +0 -1
  247. package/out/constraints/ast.d.ts +0 -287
  248. package/out/constraints/ast.d.ts.map +0 -1
  249. package/out/constraints/ast.js +0 -2
  250. package/out/constraints/ast.js.map +0 -1
  251. package/out/constraints/constraint.d.ts +0 -200
  252. package/out/constraints/constraint.d.ts.map +0 -1
  253. package/out/constraints/constraint.js +0 -25
  254. package/out/constraints/constraint.js.map +0 -1
  255. package/out/constraints/predicate.d.ts +0 -64
  256. package/out/constraints/predicate.d.ts.map +0 -1
  257. package/out/constraints/predicate.js +0 -52
  258. package/out/constraints/predicate.js.map +0 -1
  259. package/out/constraints/props/index.d.ts +0 -42
  260. package/out/constraints/props/index.d.ts.map +0 -1
  261. package/out/constraints/props/index.js +0 -56
  262. package/out/constraints/props/index.js.map +0 -1
  263. package/out/constraints/props/optional.d.ts +0 -37
  264. package/out/constraints/props/optional.d.ts.map +0 -1
  265. package/out/constraints/props/optional.js +0 -56
  266. package/out/constraints/props/optional.js.map +0 -1
  267. package/out/constraints/props/prop.d.ts +0 -49
  268. package/out/constraints/props/prop.d.ts.map +0 -1
  269. package/out/constraints/props/prop.js +0 -106
  270. package/out/constraints/props/prop.js.map +0 -1
  271. package/out/constraints/props/props.d.ts +0 -37
  272. package/out/constraints/props/props.d.ts.map +0 -1
  273. package/out/constraints/props/props.js +0 -121
  274. package/out/constraints/props/props.js.map +0 -1
  275. package/out/constraints/props/required.d.ts +0 -46
  276. package/out/constraints/props/required.d.ts.map +0 -1
  277. package/out/constraints/props/required.js +0 -81
  278. package/out/constraints/props/required.js.map +0 -1
  279. package/out/constraints/props/sequence.d.ts +0 -82
  280. package/out/constraints/props/sequence.d.ts.map +0 -1
  281. package/out/constraints/props/sequence.js +0 -376
  282. package/out/constraints/props/sequence.js.map +0 -1
  283. package/out/constraints/props/shared.d.ts +0 -3
  284. package/out/constraints/props/shared.d.ts.map +0 -1
  285. package/out/constraints/props/shared.js +0 -4
  286. package/out/constraints/props/shared.js.map +0 -1
  287. package/out/constraints/refinements/after.d.ts +0 -33
  288. package/out/constraints/refinements/after.d.ts.map +0 -1
  289. package/out/constraints/refinements/after.js +0 -36
  290. package/out/constraints/refinements/after.js.map +0 -1
  291. package/out/constraints/refinements/before.d.ts +0 -33
  292. package/out/constraints/refinements/before.d.ts.map +0 -1
  293. package/out/constraints/refinements/before.js +0 -43
  294. package/out/constraints/refinements/before.js.map +0 -1
  295. package/out/constraints/refinements/divisor.d.ts +0 -52
  296. package/out/constraints/refinements/divisor.d.ts.map +0 -1
  297. package/out/constraints/refinements/divisor.js +0 -52
  298. package/out/constraints/refinements/divisor.js.map +0 -1
  299. package/out/constraints/refinements/exactLength.d.ts +0 -45
  300. package/out/constraints/refinements/exactLength.d.ts.map +0 -1
  301. package/out/constraints/refinements/exactLength.js +0 -52
  302. package/out/constraints/refinements/exactLength.js.map +0 -1
  303. package/out/constraints/refinements/kinds.d.ts +0 -29
  304. package/out/constraints/refinements/kinds.d.ts.map +0 -1
  305. package/out/constraints/refinements/kinds.js +0 -17
  306. package/out/constraints/refinements/kinds.js.map +0 -1
  307. package/out/constraints/refinements/length.d.ts +0 -48
  308. package/out/constraints/refinements/length.d.ts.map +0 -1
  309. package/out/constraints/refinements/length.js +0 -53
  310. package/out/constraints/refinements/length.js.map +0 -1
  311. package/out/constraints/refinements/max.d.ts +0 -31
  312. package/out/constraints/refinements/max.d.ts.map +0 -1
  313. package/out/constraints/refinements/max.js +0 -35
  314. package/out/constraints/refinements/max.js.map +0 -1
  315. package/out/constraints/refinements/maxLength.d.ts +0 -32
  316. package/out/constraints/refinements/maxLength.d.ts.map +0 -1
  317. package/out/constraints/refinements/maxLength.js +0 -36
  318. package/out/constraints/refinements/maxLength.js.map +0 -1
  319. package/out/constraints/refinements/min.d.ts +0 -31
  320. package/out/constraints/refinements/min.d.ts.map +0 -1
  321. package/out/constraints/refinements/min.js +0 -28
  322. package/out/constraints/refinements/min.js.map +0 -1
  323. package/out/constraints/refinements/minLength.d.ts +0 -32
  324. package/out/constraints/refinements/minLength.d.ts.map +0 -1
  325. package/out/constraints/refinements/minLength.js +0 -33
  326. package/out/constraints/refinements/minLength.js.map +0 -1
  327. package/out/constraints/refinements/range.d.ts +0 -119
  328. package/out/constraints/refinements/range.d.ts.map +0 -1
  329. package/out/constraints/refinements/range.js +0 -89
  330. package/out/constraints/refinements/range.js.map +0 -1
  331. package/out/constraints/refinements/regex.d.ts +0 -47
  332. package/out/constraints/refinements/regex.d.ts.map +0 -1
  333. package/out/constraints/refinements/regex.js +0 -37
  334. package/out/constraints/refinements/regex.js.map +0 -1
  335. package/out/constraints/refinements/shared.d.ts +0 -20
  336. package/out/constraints/refinements/shared.d.ts.map +0 -1
  337. package/out/constraints/refinements/shared.js +0 -10
  338. package/out/constraints/refinements/shared.js.map +0 -1
  339. package/out/generic.d.ts.map +0 -1
  340. package/out/generic.js.map +0 -1
  341. package/out/inference.d.ts +0 -137
  342. package/out/inference.d.ts.map +0 -1
  343. package/out/inference.js +0 -73
  344. package/out/inference.js.map +0 -1
  345. package/out/keywords/ark.d.ts.map +0 -1
  346. package/out/keywords/ark.js.map +0 -1
  347. package/out/keywords/internal.d.ts +0 -13
  348. package/out/keywords/internal.d.ts.map +0 -1
  349. package/out/keywords/internal.js +0 -13
  350. package/out/keywords/internal.js.map +0 -1
  351. package/out/keywords/jsObject.d.ts +0 -20
  352. package/out/keywords/jsObject.d.ts.map +0 -1
  353. package/out/keywords/jsObject.js +0 -18
  354. package/out/keywords/jsObject.js.map +0 -1
  355. package/out/keywords/parsing.d.ts +0 -17
  356. package/out/keywords/parsing.d.ts.map +0 -1
  357. package/out/keywords/parsing.js +0 -64
  358. package/out/keywords/parsing.js.map +0 -1
  359. package/out/keywords/root.d.ts +0 -7
  360. package/out/keywords/root.d.ts.map +0 -1
  361. package/out/keywords/root.js +0 -4
  362. package/out/keywords/root.js.map +0 -1
  363. package/out/keywords/tsGenerics.d.ts +0 -2
  364. package/out/keywords/tsGenerics.d.ts.map +0 -1
  365. package/out/keywords/tsGenerics.js +0 -26
  366. package/out/keywords/tsGenerics.js.map +0 -1
  367. package/out/keywords/tsPrimitive.d.ts +0 -24
  368. package/out/keywords/tsPrimitive.d.ts.map +0 -1
  369. package/out/keywords/tsPrimitive.js +0 -25
  370. package/out/keywords/tsPrimitive.js.map +0 -1
  371. package/out/keywords/utils/creditCard.d.ts +0 -11
  372. package/out/keywords/utils/creditCard.d.ts.map +0 -1
  373. package/out/keywords/utils/creditCard.js +0 -35
  374. package/out/keywords/utils/creditCard.js.map +0 -1
  375. package/out/keywords/utils/date.d.ts +0 -45
  376. package/out/keywords/utils/date.d.ts.map +0 -1
  377. package/out/keywords/utils/date.js +0 -56
  378. package/out/keywords/utils/date.js.map +0 -1
  379. package/out/keywords/validation.d.ts +0 -20
  380. package/out/keywords/validation.d.ts.map +0 -1
  381. package/out/keywords/validation.js +0 -80
  382. package/out/keywords/validation.js.map +0 -1
  383. package/out/kinds.d.ts +0 -102
  384. package/out/kinds.d.ts.map +0 -1
  385. package/out/kinds.js +0 -29
  386. package/out/kinds.js.map +0 -1
  387. package/out/main.d.ts +0 -7
  388. package/out/main.d.ts.map +0 -1
  389. package/out/main.js +0 -6
  390. package/out/main.js.map +0 -1
  391. package/out/match.d.ts +0 -72
  392. package/out/match.d.ts.map +0 -1
  393. package/out/match.js +0 -53
  394. package/out/match.js.map +0 -1
  395. package/out/module.d.ts.map +0 -1
  396. package/out/module.js.map +0 -1
  397. package/out/parse.d.ts +0 -29
  398. package/out/parse.d.ts.map +0 -1
  399. package/out/parse.js +0 -161
  400. package/out/parse.js.map +0 -1
  401. package/out/parser/definition.d.ts.map +0 -1
  402. package/out/parser/definition.js.map +0 -1
  403. package/out/parser/generic.d.ts +0 -17
  404. package/out/parser/generic.d.ts.map +0 -1
  405. package/out/parser/generic.js +0 -16
  406. package/out/parser/generic.js.map +0 -1
  407. package/out/parser/objectLiteral.d.ts.map +0 -1
  408. package/out/parser/objectLiteral.js.map +0 -1
  409. package/out/parser/semantic/bounds.d.ts.map +0 -1
  410. package/out/parser/semantic/bounds.js.map +0 -1
  411. package/out/parser/semantic/divisor.d.ts.map +0 -1
  412. package/out/parser/semantic/divisor.js.map +0 -1
  413. package/out/parser/semantic/infer.d.ts.map +0 -1
  414. package/out/parser/semantic/infer.js.map +0 -1
  415. package/out/parser/semantic/utils.d.ts.map +0 -1
  416. package/out/parser/semantic/utils.js.map +0 -1
  417. package/out/parser/semantic/validate.d.ts.map +0 -1
  418. package/out/parser/semantic/validate.js.map +0 -1
  419. package/out/parser/string/reduce/dynamic.d.ts.map +0 -1
  420. package/out/parser/string/reduce/dynamic.js.map +0 -1
  421. package/out/parser/string/reduce/shared.d.ts.map +0 -1
  422. package/out/parser/string/reduce/shared.js.map +0 -1
  423. package/out/parser/string/reduce/static.d.ts.map +0 -1
  424. package/out/parser/string/reduce/static.js.map +0 -1
  425. package/out/parser/string/shift/operand/date.d.ts.map +0 -1
  426. package/out/parser/string/shift/operand/date.js.map +0 -1
  427. package/out/parser/string/shift/operand/enclosed.d.ts.map +0 -1
  428. package/out/parser/string/shift/operand/enclosed.js.map +0 -1
  429. package/out/parser/string/shift/operand/genericArgs.d.ts.map +0 -1
  430. package/out/parser/string/shift/operand/genericArgs.js.map +0 -1
  431. package/out/parser/string/shift/operand/operand.d.ts.map +0 -1
  432. package/out/parser/string/shift/operand/operand.js.map +0 -1
  433. package/out/parser/string/shift/operand/unenclosed.d.ts.map +0 -1
  434. package/out/parser/string/shift/operand/unenclosed.js.map +0 -1
  435. package/out/parser/string/shift/operator/bounds.d.ts.map +0 -1
  436. package/out/parser/string/shift/operator/bounds.js.map +0 -1
  437. package/out/parser/string/shift/operator/divisor.d.ts.map +0 -1
  438. package/out/parser/string/shift/operator/divisor.js.map +0 -1
  439. package/out/parser/string/shift/operator/operator.d.ts.map +0 -1
  440. package/out/parser/string/shift/operator/operator.js.map +0 -1
  441. package/out/parser/string/shift/scanner.d.ts.map +0 -1
  442. package/out/parser/string/shift/scanner.js.map +0 -1
  443. package/out/parser/string/string.d.ts.map +0 -1
  444. package/out/parser/string/string.js.map +0 -1
  445. package/out/parser/tuple.d.ts.map +0 -1
  446. package/out/parser/tuple.js.map +0 -1
  447. package/out/schema.d.ts +0 -175
  448. package/out/schema.d.ts.map +0 -1
  449. package/out/schema.js +0 -73
  450. package/out/schema.js.map +0 -1
  451. package/out/schemaScope.d.ts +0 -180
  452. package/out/schemaScope.d.ts.map +0 -1
  453. package/out/schemaScope.js +0 -235
  454. package/out/schemaScope.js.map +0 -1
  455. package/out/scope.d.ts.map +0 -1
  456. package/out/scope.js.map +0 -1
  457. package/out/shared/compile.d.ts +0 -22
  458. package/out/shared/compile.d.ts.map +0 -1
  459. package/out/shared/compile.js +0 -79
  460. package/out/shared/compile.js.map +0 -1
  461. package/out/shared/context.d.ts +0 -54
  462. package/out/shared/context.d.ts.map +0 -1
  463. package/out/shared/context.js +0 -53
  464. package/out/shared/context.js.map +0 -1
  465. package/out/shared/declare.d.ts +0 -69
  466. package/out/shared/declare.d.ts.map +0 -1
  467. package/out/shared/declare.js +0 -2
  468. package/out/shared/declare.js.map +0 -1
  469. package/out/shared/disjoint.d.ts +0 -91
  470. package/out/shared/disjoint.d.ts.map +0 -1
  471. package/out/shared/disjoint.js +0 -110
  472. package/out/shared/disjoint.js.map +0 -1
  473. package/out/shared/errors.d.ts +0 -99
  474. package/out/shared/errors.d.ts.map +0 -1
  475. package/out/shared/errors.js +0 -108
  476. package/out/shared/errors.js.map +0 -1
  477. package/out/shared/implement.d.ts +0 -363
  478. package/out/shared/implement.d.ts.map +0 -1
  479. package/out/shared/implement.js +0 -68
  480. package/out/shared/implement.js.map +0 -1
  481. package/out/shared/inference.d.ts +0 -6
  482. package/out/shared/inference.d.ts.map +0 -1
  483. package/out/shared/inference.js +0 -5
  484. package/out/shared/inference.js.map +0 -1
  485. package/out/shared/intersections.d.ts +0 -60
  486. package/out/shared/intersections.d.ts.map +0 -1
  487. package/out/shared/intersections.js +0 -2
  488. package/out/shared/intersections.js.map +0 -1
  489. package/out/shared/traversal.d.ts +0 -62
  490. package/out/shared/traversal.d.ts.map +0 -1
  491. package/out/shared/traversal.js +0 -97
  492. package/out/shared/traversal.js.map +0 -1
  493. package/out/shared/utils.d.ts +0 -24
  494. package/out/shared/utils.d.ts.map +0 -1
  495. package/out/shared/utils.js +0 -15
  496. package/out/shared/utils.js.map +0 -1
  497. package/out/type.d.ts.map +0 -1
  498. package/out/type.js.map +0 -1
  499. package/out/types/basis.d.ts +0 -47
  500. package/out/types/basis.d.ts.map +0 -1
  501. package/out/types/basis.js +0 -15
  502. package/out/types/basis.js.map +0 -1
  503. package/out/types/discriminate.d.ts +0 -34
  504. package/out/types/discriminate.d.ts.map +0 -1
  505. package/out/types/discriminate.js +0 -120
  506. package/out/types/discriminate.js.map +0 -1
  507. package/out/types/domain.d.ts +0 -57
  508. package/out/types/domain.d.ts.map +0 -1
  509. package/out/types/domain.js +0 -41
  510. package/out/types/domain.js.map +0 -1
  511. package/out/types/intersection.d.ts +0 -127
  512. package/out/types/intersection.d.ts.map +0 -1
  513. package/out/types/intersection.js +0 -379
  514. package/out/types/intersection.js.map +0 -1
  515. package/out/types/morph.d.ts +0 -157
  516. package/out/types/morph.d.ts.map +0 -1
  517. package/out/types/morph.js +0 -99
  518. package/out/types/morph.js.map +0 -1
  519. package/out/types/proto.d.ts +0 -51
  520. package/out/types/proto.d.ts.map +0 -1
  521. package/out/types/proto.js +0 -60
  522. package/out/types/proto.js.map +0 -1
  523. package/out/types/type.d.ts +0 -143
  524. package/out/types/type.d.ts.map +0 -1
  525. package/out/types/type.js +0 -123
  526. package/out/types/type.js.map +0 -1
  527. package/out/types/union.d.ts +0 -71
  528. package/out/types/union.d.ts.map +0 -1
  529. package/out/types/union.js +0 -379
  530. package/out/types/union.js.map +0 -1
  531. package/out/types/unit.d.ts +0 -45
  532. package/out/types/unit.d.ts.map +0 -1
  533. package/out/types/unit.js +0 -56
  534. package/out/types/unit.js.map +0 -1
  535. package/out/util.d.ts +0 -31
  536. package/out/util.d.ts.map +0 -1
  537. package/out/util.js +0 -8
  538. package/out/util.js.map +0 -1
  539. package/parser/definition.ts +0 -143
  540. package/parser/generic.ts +0 -66
  541. package/parser/objectLiteral.ts +0 -217
  542. package/parser/semantic/bounds.ts +0 -62
  543. package/parser/semantic/divisor.ts +0 -11
  544. package/parser/semantic/infer.ts +0 -141
  545. package/parser/semantic/utils.ts +0 -15
  546. package/parser/semantic/validate.ts +0 -117
  547. package/parser/string/reduce/dynamic.ts +0 -208
  548. package/parser/string/reduce/shared.ts +0 -99
  549. package/parser/string/reduce/static.ts +0 -296
  550. package/parser/string/shift/operand/date.ts +0 -55
  551. package/parser/string/shift/operand/enclosed.ts +0 -123
  552. package/parser/string/shift/operand/genericArgs.ts +0 -128
  553. package/parser/string/shift/operand/operand.ts +0 -42
  554. package/parser/string/shift/operand/unenclosed.ts +0 -218
  555. package/parser/string/shift/operator/bounds.ts +0 -270
  556. package/parser/string/shift/operator/divisor.ts +0 -33
  557. package/parser/string/shift/operator/operator.ts +0 -71
  558. package/parser/string/shift/scanner.ts +0 -210
  559. package/parser/string/string.ts +0 -85
  560. package/parser/tuple.ts +0 -542
  561. package/scope.ts +0 -285
  562. package/type.ts +0 -265
@@ -1,119 +0,0 @@
1
- import { type array, type valueOf } from "@arktype/util"
2
- import type { Node } from "../../base.js"
3
- import type { BaseMeta, BaseNodeDeclaration } from "../../shared/declare.js"
4
- import type { KeyDefinitions, RangeKind } from "../../shared/implement.js"
5
- import { BasePrimitiveConstraint } from "../constraint.js"
6
- export declare abstract class BaseRange<
7
- d extends BaseRangeDeclaration
8
- > extends BasePrimitiveConstraint<d> {
9
- readonly boundOperandKind: {
10
- readonly min: "value"
11
- readonly max: "value"
12
- readonly minLength: "length"
13
- readonly maxLength: "length"
14
- readonly after: "date"
15
- readonly before: "date"
16
- }[d["kind"]]
17
- readonly compiledActual: string
18
- readonly comparator: ">" | "<" | ">=" | "<="
19
- readonly numericLimit: number
20
- readonly expression: string
21
- readonly compiledCondition: string
22
- readonly compiledNegation: string
23
- readonly stringLimit: string
24
- readonly errorContext: import("../../shared/declare.js").BaseErrorContext<
25
- d["kind"]
26
- > &
27
- d["inner"] extends infer T
28
- ? {
29
- [k in keyof T]: (import("../../shared/declare.js").BaseErrorContext<
30
- d["kind"]
31
- > &
32
- d["inner"])[k]
33
- }
34
- : never
35
- readonly limitKind: LimitKind
36
- isStricterThan(r: Node<d["kind"] | pairedRangeKind<d["kind"]>>): boolean
37
- overlapsRange(r: Node<pairedRangeKind<d["kind"]>>): boolean
38
- overlapIsUnit(r: Node<pairedRangeKind<d["kind"]>>): boolean
39
- }
40
- export interface BaseRangeInner extends BaseMeta {
41
- readonly rule: number | Date
42
- readonly exclusive?: true
43
- }
44
- export type LimitSchemaValue<kind extends RangeKind = RangeKind> = kind extends
45
- | "before"
46
- | "after"
47
- ? Date | number | string
48
- : number
49
- export type LimitInnerValue<kind extends RangeKind = RangeKind> = kind extends
50
- | "before"
51
- | "after"
52
- ? Date
53
- : number
54
- export interface BaseNormalizedRangeSchema extends BaseMeta {
55
- readonly exclusive?: boolean
56
- }
57
- export type LimitKind = "lower" | "upper"
58
- export type RelativeComparator<kind extends LimitKind = LimitKind> = {
59
- lower: ">" | ">="
60
- upper: "<" | "<="
61
- }[kind]
62
- export declare const negatedComparators: {
63
- readonly "<": ">="
64
- readonly "<=": ">"
65
- readonly ">": "<="
66
- readonly ">=": "<"
67
- }
68
- export declare const boundKindPairsByLower: {
69
- readonly min: "max"
70
- readonly minLength: "maxLength"
71
- readonly after: "before"
72
- }
73
- type BoundKindPairsByLower = typeof boundKindPairsByLower
74
- export declare const boundKindPairsByUpper: {
75
- max: "min"
76
- maxLength: "minLength"
77
- before: "after"
78
- }
79
- type BoundKindPairsByUpper = typeof boundKindPairsByUpper
80
- export type pairedRangeKind<kind extends RangeKind> =
81
- kind extends LowerBoundKind
82
- ? BoundKindPairsByLower[kind]
83
- : BoundKindPairsByUpper[kind & UpperBoundKind]
84
- export type LowerBoundKind = keyof typeof boundKindPairsByLower
85
- export type LowerNode = Node<LowerBoundKind>
86
- export type UpperBoundKind = valueOf<typeof boundKindPairsByLower>
87
- export type UpperNode = Node<UpperBoundKind>
88
- export type NumericallyBoundable = string | number | array
89
- export type Boundable = NumericallyBoundable | Date
90
- export declare const parseExclusiveKey: KeyDefinitions<BaseRangeDeclaration>["exclusive"]
91
- export declare const parseDateLimit: (limit: LimitSchemaValue) => Date
92
- export interface BaseRangeDeclaration extends BaseNodeDeclaration {
93
- kind: RangeKind
94
- inner: BaseRangeInner
95
- normalizedSchema: BaseNormalizedRangeSchema
96
- }
97
- export declare const operandKindsByBoundKind: {
98
- readonly min: "value"
99
- readonly max: "value"
100
- readonly minLength: "length"
101
- readonly maxLength: "length"
102
- readonly after: "date"
103
- readonly before: "date"
104
- }
105
- export declare const compileComparator: (
106
- kind: RangeKind,
107
- exclusive: boolean | undefined
108
- ) => ">" | "<" | ">=" | "<="
109
- export type BoundOperandKind = "value" | "length" | "date"
110
- export type LengthBoundableData = string | array
111
- export type DateRangeKind = "before" | "after"
112
- export declare const dateLimitToString: (limit: LimitSchemaValue) => string
113
- export declare const writeUnboundableMessage: <root extends string>(
114
- root: root
115
- ) => `Bounded expression ${root} must be a number, string, Array, or Date`
116
- export type writeUnboundableMessage<root extends string> =
117
- `Bounded expression ${root} must be a number, string, Array, or Date`
118
- export {}
119
- //# sourceMappingURL=range.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../constraints/refinements/range.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,KAAK,KAAK,EAEV,KAAK,OAAO,EACZ,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAC1E,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAE1D,8BAAsB,SAAS,CAC9B,CAAC,SAAS,oBAAoB,C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AE,SAAS,CAAA;IACf,KAAK,EAAE,cAAc,CAAA;IACrB,gBAAgB,EAAE,yBAAyB,CAAA;CAC3C;AAED,eAAO,MAAM,uBAAuB;;;;;;;CAOoB,CAAA;AAExD,eAAO,MAAM,iBAAiB,SACvB,SAAS,aACJ,OAAO,GAAG,SAAS,4BAInB,CAAA;AAEZ,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;AAE1D,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,KAAK,CAAA;AAEhD,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE9C,eAAO,MAAM,iBAAiB,UAAW,gBAAgB,KAAG,MACS,CAAA;AAErE,eAAO,MAAM,uBAAuB,4GAGkC,CAAA;AAEtE,MAAM,MAAM,uBAAuB,CAAC,IAAI,SAAS,MAAM,IACtD,sBAAsB,IAAI,2CAA2C,CAAA"}
@@ -1,89 +0,0 @@
1
- import { invert, isKeyOf } from "@arktype/util"
2
- import { BasePrimitiveConstraint } from "../constraint.js"
3
- export class BaseRange extends BasePrimitiveConstraint {
4
- boundOperandKind = operandKindsByBoundKind[this.kind]
5
- compiledActual =
6
- this.boundOperandKind === "value"
7
- ? `data`
8
- : this.boundOperandKind === "length"
9
- ? `data.length`
10
- : `data.valueOf()`
11
- comparator = compileComparator(this.kind, this.exclusive)
12
- numericLimit = this.rule.valueOf()
13
- expression = `${this.comparator}${this.rule}`
14
- compiledCondition = `${this.compiledActual} ${this.comparator} ${this.numericLimit}`
15
- compiledNegation = `${this.compiledActual} ${
16
- negatedComparators[this.comparator]
17
- } ${this.numericLimit}`
18
- // we need to compute stringLimit before errorContext, which references it
19
- // transitively through description for date bounds
20
- stringLimit =
21
- this.boundOperandKind === "date"
22
- ? dateLimitToString(this.numericLimit)
23
- : `${this.numericLimit}`
24
- errorContext = this.createErrorContext(this.inner)
25
- limitKind = this.comparator["0"] === "<" ? "upper" : "lower"
26
- isStricterThan(r) {
27
- const thisLimitIsStricter =
28
- this.limitKind === "upper"
29
- ? this.numericLimit < r.numericLimit
30
- : this.numericLimit > r.numericLimit
31
- return (
32
- thisLimitIsStricter ||
33
- (this.numericLimit === r.numericLimit &&
34
- this.exclusive === true &&
35
- !r.exclusive)
36
- )
37
- }
38
- overlapsRange(r) {
39
- if (this.isStricterThan(r)) return false
40
- if (
41
- this.numericLimit === r.numericLimit &&
42
- (this.exclusive || r.exclusive)
43
- )
44
- return false
45
- return true
46
- }
47
- overlapIsUnit(r) {
48
- return (
49
- this.numericLimit === r.numericLimit &&
50
- !this.exclusive &&
51
- !r.exclusive
52
- )
53
- }
54
- }
55
- export const negatedComparators = {
56
- "<": ">=",
57
- "<=": ">",
58
- ">": "<=",
59
- ">=": "<"
60
- }
61
- export const boundKindPairsByLower = {
62
- min: "max",
63
- minLength: "maxLength",
64
- after: "before"
65
- }
66
- export const boundKindPairsByUpper = invert(boundKindPairsByLower)
67
- export const parseExclusiveKey = {
68
- // omit key with value false since it is the default
69
- parse: (flag) => flag || undefined
70
- }
71
- export const parseDateLimit = (limit) =>
72
- typeof limit === "string" || typeof limit === "number"
73
- ? new Date(limit)
74
- : limit
75
- export const operandKindsByBoundKind = {
76
- min: "value",
77
- max: "value",
78
- minLength: "length",
79
- maxLength: "length",
80
- after: "date",
81
- before: "date"
82
- }
83
- export const compileComparator = (kind, exclusive) =>
84
- `${isKeyOf(kind, boundKindPairsByLower) ? ">" : "<"}${exclusive ? "" : "="}`
85
- export const dateLimitToString = (limit) =>
86
- typeof limit === "string" ? limit : new Date(limit).toLocaleString()
87
- export const writeUnboundableMessage = (root) =>
88
- `Bounded expression ${root} must be a number, string, Array, or Date`
89
- //# sourceMappingURL=range.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"range.js","sourceRoot":"","sources":["../../../constraints/refinements/range.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,EACN,OAAO,EAIP,MAAM,eAAe,CAAA;AAItB,OAAO,EAAE,uBA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AAA;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAuB,EAAQ,EAAE,CAC/D,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ;IACrD,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC;IACjB,CAAC,CAAC,KAAK,CAAA;AAQT,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACtC,GAAG,EAAE,OAAO;IACZ,GAAG,EAAE,OAAO;IACZ,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;CACyC,CAAA;AAExD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAChC,IAAe,EACf,SAA8B,EAC7B,EAAE,CACH,GAAG,OAAO,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAClD,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAClB,EAAW,CAAA;AAQZ,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAuB,EAAU,EAAE,CACpE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,cAAc,EAAE,CAAA;AAErE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACtC,IAAU,EACsB,EAAE,CAClC,sBAAsB,IAAI,2CAA2C,CAAA"}
@@ -1,47 +0,0 @@
1
- import type { BaseMeta, declareNode } from "../../shared/declare.js"
2
- import { BasePrimitiveConstraint } from "../constraint.js"
3
- export interface RegexInner extends BaseMeta {
4
- readonly rule: string
5
- readonly flags?: string
6
- }
7
- export type NormalizedRegexSchema = RegexInner
8
- export type RegexSchema = NormalizedRegexSchema | string | RegExp
9
- export type RegexDeclaration = declareNode<{
10
- kind: "regex"
11
- schema: RegexSchema
12
- normalizedSchema: NormalizedRegexSchema
13
- inner: RegexInner
14
- intersectionIsOpen: true
15
- prerequisite: string
16
- errorContext: RegexInner
17
- }>
18
- export declare class RegexNode extends BasePrimitiveConstraint<RegexDeclaration> {
19
- static implementation: import("../../shared/implement.js").nodeImplementationOf<{
20
- reducibleTo: "regex"
21
- childKind: never
22
- kind: "regex"
23
- schema: RegexSchema
24
- normalizedSchema: RegexInner
25
- inner: RegexInner
26
- intersectionIsOpen: true
27
- prerequisite: string
28
- errorContext: RegexInner &
29
- import("../../shared/declare.js").BaseErrorContext<"regex">
30
- }>
31
- readonly instance: RegExp
32
- readonly expression: string
33
- traverseAllows: (string: string) => boolean
34
- readonly compiledCondition: string
35
- readonly compiledNegation: string
36
- readonly impliedBasis: import("../../main.js").Type<
37
- string,
38
- import("../../keywords/tsPrimitive.js").tsPrimitive.exports
39
- >
40
- readonly errorContext: {
41
- code: "regex"
42
- readonly rule: string
43
- readonly flags?: string
44
- readonly description?: string
45
- }
46
- }
47
- //# sourceMappingURL=regex.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"regex.d.ts","sourceRoot":"","sources":["../../../constraints/refinements/regex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAE1D,MAAM,WAAW,UAAW,SAAQ,QAAQ;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAA;AAE9C,MAAM,MAAM,WAAW,GAAG,qBAAqB,GAAG,MAAM,GAAG,MAAM,CAAA;AAEjE,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC;IAC1C,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,EAAE,WAAW,CAAA;IACnB,gBAAgB,EAAE,qBAAqB,CAAA;IACvC,KAAK,EAAE,UAAU,CAAA;IACjB,kBAAkB,EAAE,IAAI,CAAA;IACxB,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,UAAU,CAAA;CACxB,CAAC,CAAA;AAEF,qBAAa,SAAU,SAAQ,uBAAuB,CAAC,gBAAgB,CAAC;IACvE,MAAM,CAAC,cAAc;;;;;;;;;;OAyBnB;IAEF,QAAQ,CAAC,QAAQ,SAAoC;IACrD,QAAQ,CAAC,UAAU,SAAqB;IACxC,cAAc,8BAAyC;IAEvD,QAAQ,CAAC,iBAAiB,SAAkC;IAC5D,QAAQ,CAAC,gBAAgB,SAA+B;IACxD,QAAQ,CAAC,YAAY,oGAAyB;IAC9C,QAAQ,CAAC,YAAY;;;;;MAAsC;CAC3D"}
@@ -1,37 +0,0 @@
1
- import { BasePrimitiveConstraint } from "../constraint.js"
2
- export class RegexNode extends BasePrimitiveConstraint {
3
- static implementation = this.implement({
4
- collapsibleKey: "rule",
5
- keys: {
6
- rule: {},
7
- flags: {}
8
- },
9
- normalize: (schema) =>
10
- typeof schema === "string"
11
- ? { rule: schema }
12
- : schema instanceof RegExp
13
- ? schema.flags
14
- ? { rule: schema.source, flags: schema.flags }
15
- : { rule: schema.source }
16
- : schema,
17
- hasAssociatedError: true,
18
- intersectionIsOpen: true,
19
- intersections: {
20
- // for now, non-equal regex are naively intersected
21
- regex: () => null
22
- },
23
- defaults: {
24
- description(node) {
25
- return `matched by ${node.rule}`
26
- }
27
- }
28
- })
29
- instance = new RegExp(this.rule, this.flags)
30
- expression = `${this.instance}`
31
- traverseAllows = this.instance.test.bind(this.instance)
32
- compiledCondition = `${this.expression}.test(data)`
33
- compiledNegation = `!${this.compiledCondition}`
34
- impliedBasis = this.$.keywords.string
35
- errorContext = this.createErrorContext(this.inner)
36
- }
37
- //# sourceMappingURL=regex.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"regex.js","sourceRoot":"","sources":["../../../constraints/refinements/regex.ts"],"names":[],"mappings":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,CAAA;IAC/C,YAAY,GAAG,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAA;IACrC,YAAY,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA"}
@@ -1,20 +0,0 @@
1
- export declare const rangeKinds: readonly [
2
- "max",
3
- "min",
4
- "maxLength",
5
- "minLength",
6
- "before",
7
- "after"
8
- ]
9
- export type RangeKind = (typeof rangeKinds)[number]
10
- export declare const boundKinds: readonly [
11
- "length",
12
- "max",
13
- "min",
14
- "maxLength",
15
- "minLength",
16
- "before",
17
- "after"
18
- ]
19
- export type BoundKind = (typeof boundKinds)[number]
20
- //# sourceMappingURL=shared.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../constraints/refinements/shared.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,sEAOb,CAAA;AAEV,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAEnD,eAAO,MAAM,UAAU,gFAAqC,CAAA;AAE5D,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA"}
@@ -1,10 +0,0 @@
1
- export const rangeKinds = [
2
- "max",
3
- "min",
4
- "maxLength",
5
- "minLength",
6
- "before",
7
- "after"
8
- ]
9
- export const boundKinds = ["length", ...rangeKinds]
10
- //# sourceMappingURL=shared.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../constraints/refinements/shared.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,KAAK;IACL,KAAK;IACL,WAAW;IACX,WAAW;IACX,QAAQ;IACR,OAAO;CACE,CAAA;AAIV,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,GAAG,UAAU,CAAU,CAAA"}
@@ -1 +0,0 @@
1
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BAAqB;YACrB,IAAI,CAAA;YACJ,OAAO,CAAC,CAAC,SAAS,CAAC,GAAG,CAAU,CAAA;QACjC,CAAC,CAAC,CAAA;QAbK,WAAM,GAAN,MAAM,CAAQ;QACd,QAAG,GAAH,GAAG,CAAK;QAER,MAAC,GAAD,CAAC,CAAgB;IAWzB,CAAC;CACD"}
@@ -1,137 +0,0 @@
1
- import type {
2
- Constructor,
3
- ErrorMessage,
4
- List,
5
- NonEnumerableDomain,
6
- conform,
7
- describe
8
- } from "@arktype/util"
9
- import type { Node, TypeNode } from "./base.js"
10
- import type { isSchemaCast, schema } from "./builtins/builtins.js"
11
- import type { Prerequisite } from "./kinds.js"
12
- import type { ConstraintKind } from "./shared/implement.js"
13
- import type { instantiateBasis } from "./types/basis.js"
14
- import type { DomainNode, DomainSchema } from "./types/domain.js"
15
- import type {
16
- IntersectionNode,
17
- IntersectionSchema
18
- } from "./types/intersection.js"
19
- import type {
20
- Morph,
21
- MorphChildDefinition,
22
- MorphChildKind,
23
- MorphSchema,
24
- Out,
25
- inferMorphOut
26
- } from "./types/morph.js"
27
- import type { ProtoNode, ProtoSchema } from "./types/proto.js"
28
- import type { NormalizedUnionSchema, UnionChildNode } from "./types/union.js"
29
- import type { UnitSchema } from "./types/unit.js"
30
- export type validateAliases<aliases> = {
31
- [k in keyof aliases]: "branches" extends keyof aliases[k]
32
- ? conform<aliases[k], NormalizedUnionSchema>
33
- : aliases[k] extends readonly [...infer branches]
34
- ? {
35
- [i in keyof branches]: validateSchemaBranch<
36
- branches[i],
37
- aliases
38
- >
39
- }
40
- : validateSchemaBranch<aliases[k], aliases>
41
- }
42
- export type instantiateAliases<aliases> = {
43
- [k in keyof aliases]: isSchemaCast<aliases[k]> extends true
44
- ? aliases[k] extends schema.cast<infer to, infer kind>
45
- ? TypeNode<to, kind>
46
- : never
47
- : aliases[k] extends NormalizedUnionSchema
48
- ? instantiateSchemaBranches<aliases[k]["branches"]>
49
- : aliases[k] extends readonly [...infer branches]
50
- ? instantiateSchemaBranches<branches>
51
- : instantiateSchemaBranch<aliases[k]>
52
- } & unknown
53
- export type validateSchemaBranch<def, $> = isSchemaCast<def> extends true
54
- ? def
55
- : keyof def & ("morph" | "in" | "out") extends never
56
- ? validateMorphChild<def>
57
- : validateMorphSchema<def>
58
- export type instantiateSchemaBranches<branches extends List> =
59
- branches["length"] extends 0
60
- ? TypeNode<never, "union">
61
- : branches["length"] extends 1
62
- ? instantiateSchemaBranch<branches[0]>
63
- : TypeNode<instantiateSchemaBranch<branches[number]>["infer"]>
64
- export type instantiateSchemaBranch<def> = isSchemaCast<def> extends true
65
- ? def extends schema.cast<infer to, infer kind>
66
- ? TypeNode<to, kind>
67
- : never
68
- : def extends MorphSchema
69
- ? instantiateMorphSchema<def>
70
- : def extends MorphChildDefinition
71
- ? instantiateMorphChild<def>
72
- : UnionChildNode
73
- type NonIntersectableBasisSchema =
74
- | NonEnumerableDomain
75
- | Constructor
76
- | UnitSchema
77
- export type validateMorphChild<def> = [def] extends [
78
- NonIntersectableBasisSchema
79
- ]
80
- ? def
81
- : validateIntersectionSchema<def>
82
- export type instantiateMorphChild<def> = def extends NonIntersectableBasisSchema
83
- ? instantiateBasis<def>
84
- : def extends IntersectionSchema
85
- ? instantiateIntersectionSchema<def>
86
- : Node<MorphChildKind>
87
- export type validateMorphSchema<def> = {
88
- [k in keyof def]: k extends "in" | "out"
89
- ? validateMorphChild<def[k]>
90
- : k extends keyof MorphSchema
91
- ? MorphSchema[k]
92
- : `'${k & string}' is not a valid morph schema key`
93
- }
94
- export type instantiateMorphSchema<def> = def extends MorphSchema
95
- ? TypeNode<
96
- (
97
- In: def["in"] extends {}
98
- ? instantiateMorphChild<def["in"]>["infer"]
99
- : unknown
100
- ) => def["out"] extends {}
101
- ? Out<instantiateMorphChild<def["out"]>["infer"]>
102
- : def["morph"] extends
103
- | Morph<any, infer o>
104
- | readonly [...unknown[], Morph<any, infer o>]
105
- ? Out<inferMorphOut<o>>
106
- : never,
107
- "morph"
108
- >
109
- : never
110
- type exactBasisMessageOnError<def, expected> = {
111
- [k in keyof def]: k extends keyof expected
112
- ? conform<def[k], expected[k]>
113
- : ErrorMessage<
114
- k extends ConstraintKind
115
- ? `${k} has a prerequisite of ${describe<Prerequisite<k>>}`
116
- : `'${k & string}' is not on an intersection schema`
117
- >
118
- }
119
- export type validateIntersectionSchema<schema> = exactBasisMessageOnError<
120
- schema,
121
- IntersectionSchema<inferBasisOf<schema>>
122
- >
123
- type inferBasisOf<schema> = "proto" extends keyof schema
124
- ? instantiateBasis<conform<schema["proto"], ProtoSchema>>["infer"]
125
- : "domain" extends keyof schema
126
- ? instantiateBasis<conform<schema["domain"], DomainSchema>>["infer"]
127
- : unknown
128
- export type instantiateIntersectionSchema<def> = keyof def &
129
- ConstraintKind extends never
130
- ? "proto" extends keyof def
131
- ? ProtoNode<inferBasisOf<def>>
132
- : "domain" extends keyof def
133
- ? DomainNode<inferBasisOf<def>>
134
- : IntersectionNode
135
- : IntersectionNode<inferBasisOf<def>>
136
- export {}
137
- //# sourceMappingURL=inference.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../inference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,mBAAmB,EACnB,OAAO,EACP,QAAQ,EACR,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAA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,GAAG,GAAG,CAAC,SAAS,MAAM,QAAQ,GACvC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,GAC5B,YAAY,CACZ,CAAC,SAAS,cAAc,GACrB,GAAG,CAAC,0BAA0B,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,GACzD,IAAI,CAAC,GAAG,MAAM,oCAAoC,CACpD;CACJ,CAAA;AAED,MAAM,MAAM,0BAA0B,CAAC,MAAM,IAAI,wBAAwB,CACxE,MAAM,EACN,kBAAkB,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CACxC,CAAA;AAED,KAAK,YAAY,CAAC,MAAM,IAAI,OAAO,SAAS,MAAM,MAAM,GACrD,gBAAgB,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,GAChE,QAAQ,SAAS,MAAM,MAAM,GAC7B,gBAAgB,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,GAClE,OAAO,CAAA;AAEV,MAAM,MAAM,6BAA6B,CAAC,GAAG,IAAI,MAAM,GAAG,GACzD,cAAc,SAAS,KAAK,GAC1B,OAAO,SAAS,MAAM,GAAG,GACxB,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAC5B,QAAQ,SAAS,MAAM,GAAG,GAC1B,UAAU,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,GAC7B,gBAAgB,GACjB,gBAAgB,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAA"}
package/out/inference.js DELETED
@@ -1,73 +0,0 @@
1
- export {}
2
- // export type inferPropsInput<input extends PropsInput> =
3
- // input extends PropsInputTuple<infer named, infer indexed>
4
- // ? inferIndexed<indexed, inferNamedProps<named, indexed>>
5
- // : input extends NamedPropsInput
6
- // ? inferNamedProps<input, []>
7
- // : never
8
- // type inferIndexed<
9
- // indexed extends readonly IndexedPropInput[],
10
- // result = unknown
11
- // > = indexed extends readonly [
12
- // infer entry extends IndexedPropInput,
13
- // ...infer tail extends IndexedPropInput[]
14
- // ]
15
- // ? inferIndexed<
16
- // tail,
17
- // entry["key"] extends { readonly regex: VariadicIndexMatcherLiteral }
18
- // ? result extends List
19
- // ? [...result, ...inferTypeInput<entry["value"]>[]]
20
- // : never
21
- // : entry["key"] extends {
22
- // readonly regex: NonVariadicIndexMatcherLiteral
23
- // }
24
- // ? inferTypeInput<entry["value"]>[]
25
- // : Record<
26
- // Extract<inferTypeInput<entry["key"]>, PropertyKey>,
27
- // inferTypeInput<entry["value"]>
28
- // >
29
- // >
30
- // : result
31
- // type inferNamedProps<
32
- // named extends NamedPropsInput,
33
- // indexed extends readonly IndexedPropInput[]
34
- // > = [named, indexed[0]["key"]] extends
35
- // | [TupleLengthProps, unknown]
36
- // | [unknown, { readonly regex: VariadicIndexMatcherLiteral }]
37
- // ? inferNonVariadicTupleProps<named> &
38
- // inferObjectLiteralProps<Omit<named, "length" | NumberLiteral | number>>
39
- // : inferObjectLiteralProps<named>
40
- // type inferObjectLiteralProps<named extends NamedPropsInput> = {} extends named
41
- // ? unknown
42
- // : evaluate<
43
- // {
44
- // [k in requiredKeyOf<named>]: inferPropValue<named[k]["value"]>
45
- // } & {
46
- // [k in optionalKeyOf<named>]?: inferPropValue<named[k]["value"]>
47
- // }
48
- // >
49
- // type inferPropValue<value extends PropValueInput> = value extends Thunk<
50
- // infer ret
51
- // >
52
- // ? inferResolvedPropValue<ret>
53
- // : inferResolvedPropValue<value>
54
- // type inferResolvedPropValue<value> = value extends TypeNode<infer t>
55
- // ? t
56
- // : inferTypeInput<Extract<value, TypeInput>>
57
- // type stringifiedNumericKeyOf<t> = `${Extract<keyof t, number | NumberLiteral>}`
58
- // type inferNonVariadicTupleProps<
59
- // named extends NamedPropsInput,
60
- // result extends unknown[] = []
61
- // > = `${result["length"]}` extends stringifiedNumericKeyOf<named>
62
- // ? inferNonVariadicTupleProps<
63
- // named,
64
- // [...result, inferPropValue<named[`${result["length"]}`]["value"]>]
65
- // >
66
- // : result
67
- // type TupleLengthProps<length extends number = number> = {
68
- // readonly length: {
69
- // readonly prerequisite: true
70
- // readonly value: { readonly basis: readonly ["===", length] }
71
- // }
72
- // }
73
- //# sourceMappingURL=inference.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inference.js","sourceRoot":"","sources":["../inference.ts"],"names":[],"mappings":";AAmJA,0DAA0D;AAC1D,6DAA6D;AAC7D,6DAA6D;AAC7D,oCAAoC;AACpC,iCAAiC;AACjC,YAAY;AAEZ,qBAAqB;AACrB,gDAAgD;AAChD,oBAAoB;AACpB,iCAAiC;AACjC,yCAAyC;AACzC,4CAA4C;AAC5C,IAAI;AACJ,mBAAmB;AACnB,WAAW;AACX,0EAA0E;AAC1E,4BAA4B;AAC5B,0DAA0D;AAC1D,eAAe;AACf,+BAA+B;AAC/B,uDAAuD;AACvD,UAAU;AACV,yCAAyC;AACzC,gBAAgB;AAChB,4DAA4D;AAC5D,uCAAuC;AACvC,UAAU;AACV,OAAO;AACP,YAAY;AAEZ,wBAAwB;AACxB,kCAAkC;AAClC,+CAA+C;AAC/C,yCAAyC;AACzC,iCAAiC;AACjC,gEAAgE;AAChE,yCAAyC;AACzC,6EAA6E;AAC7E,oCAAoC;AAEpC,iFAAiF;AACjF,aAAa;AACb,eAAe;AACf,OAAO;AACP,qEAAqE;AACrE,WAAW;AACX,sEAAsE;AACtE,OAAO;AACP,OAAO;AAEP,2EAA2E;AAC3E,aAAa;AACb,IAAI;AACJ,iCAAiC;AACjC,mCAAmC;AAEnC,uEAAuE;AACvE,OAAO;AACP,+CAA+C;AAE/C,kFAAkF;AAElF,mCAAmC;AACnC,kCAAkC;AAClC,iCAAiC;AACjC,mEAAmE;AACnE,iCAAiC;AACjC,YAAY;AACZ,wEAAwE;AACxE,OAAO;AACP,YAAY;AAEZ,4DAA4D;AAC5D,s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util"
2
- import type { Module, Scope, rootResolutions } from "../scope.js"
3
- export declare namespace internalPrimitive {
4
- interface exports {
5
- lengthBoundable: string | unknown[]
6
- propertyKey: Key
7
- }
8
- type resolutions = rootResolutions<exports>
9
- type infer = (typeof internalPrimitive)["infer"]
10
- }
11
- export declare const internalPrimitive: Scope<internalPrimitive.resolutions>
12
- export declare const internalPrimitiveKeywords: Module<internalPrimitive.resolutions>
13
- //# sourceMappingURL=internal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../keywords/internal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAGjE,yBAAiB,iBAAiB,CAAC;IAClC,UAAiB,OAAO;QACvB,eAAe,EAAE,MAAM,GAAG,OAAO,EAAE,CAAA;QACnC,WAAW,EAAE,GAAG,CAAA;KAChB;IAED,KAAY,WAAW,GAAG,eAAe,CAAC,OAAO,CAAC,CAAA;IAElD,KAAY,KAAK,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,OAAO,CAAC,CAAA;CACvD;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAUjE,CAAA;AAEF,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,iBAAiB,CAAC,WAAW,CACjD,CAAA"}
@@ -1,13 +0,0 @@
1
- import { root } from "./root.js"
2
- export const internalPrimitive = root.scope(
3
- {
4
- lengthBoundable: root.schema(["string", Array]),
5
- propertyKey: root.schema(["string", "symbol"])
6
- },
7
- {
8
- prereducedAliases: true,
9
- registerKeywords: true
10
- }
11
- )
12
- export const internalPrimitiveKeywords = internalPrimitive.export()
13
- //# sourceMappingURL=internal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"internal.js","sourceRoot":"","sources":["../../keywords/internal.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAahC,MAAM,CAAC,MAAM,iBAAiB,GAC7B,IAAI,CAAC,KAAK,CACT;IACC,eAAe,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC/C,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;CAC9C,EACD;IACC,iBAAiB,EAAE,IAAI;IACvB,gBAAgB,EAAE,IAAI;CACtB,CACD,CAAA;AAEF,MAAM,CAAC,MAAM,yBAAyB,GACrC,iBAAiB,CAAC,MAAM,EAAE,CAAA"}