arktype 2.0.0-dev.8 → 2.0.0-dev.9

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 (379) hide show
  1. package/__tests__/config.test.ts +11 -0
  2. package/__tests__/imports.test.ts +18 -12
  3. package/__tests__/literal.test.ts +30 -14
  4. package/__tests__/narrow.test.ts +2 -2
  5. package/__tests__/objectLiteral.test.ts +130 -7
  6. package/__tests__/pipe.test.ts +1 -1
  7. package/__tests__/scope.test.ts +197 -0
  8. package/__tests__/traverse.test.ts +13 -5
  9. package/out/ark.d.ts +1 -2
  10. package/out/ark.js +0 -1
  11. package/out/generic.d.ts +0 -1
  12. package/out/generic.js +0 -1
  13. package/out/main.d.ts +0 -1
  14. package/out/main.js +0 -1
  15. package/out/match.d.ts +0 -1
  16. package/out/match.js +0 -1
  17. package/out/module.d.ts +0 -1
  18. package/out/module.js +0 -1
  19. package/out/parser/definition.d.ts +1 -2
  20. package/out/parser/definition.js +0 -1
  21. package/out/parser/generic.d.ts +2 -3
  22. package/out/parser/generic.js +0 -1
  23. package/out/parser/generic.js.map +1 -1
  24. package/out/parser/objectLiteral.d.ts +1 -2
  25. package/out/parser/objectLiteral.js +15 -8
  26. package/out/parser/objectLiteral.js.map +1 -1
  27. package/out/parser/semantic/bounds.d.ts +1 -2
  28. package/out/parser/semantic/bounds.js +0 -1
  29. package/out/parser/semantic/divisor.d.ts +0 -1
  30. package/out/parser/semantic/divisor.js +0 -2
  31. package/out/parser/semantic/infer.d.ts +0 -1
  32. package/out/parser/semantic/infer.js +0 -2
  33. package/out/parser/semantic/utils.d.ts +0 -1
  34. package/out/parser/semantic/utils.js +0 -2
  35. package/out/parser/semantic/validate.d.ts +2 -3
  36. package/out/parser/semantic/validate.js +0 -1
  37. package/out/parser/string/reduce/dynamic.d.ts +0 -1
  38. package/out/parser/string/reduce/dynamic.js +0 -1
  39. package/out/parser/string/reduce/shared.d.ts +5 -18
  40. package/out/parser/string/reduce/shared.js +0 -1
  41. package/out/parser/string/reduce/static.d.ts +0 -1
  42. package/out/parser/string/reduce/static.js +0 -2
  43. package/out/parser/string/shift/operand/date.d.ts +2 -3
  44. package/out/parser/string/shift/operand/date.js +0 -1
  45. package/out/parser/string/shift/operand/enclosed.d.ts +2 -17
  46. package/out/parser/string/shift/operand/enclosed.js +0 -1
  47. package/out/parser/string/shift/operand/genericArgs.d.ts +1 -2
  48. package/out/parser/string/shift/operand/genericArgs.js +0 -1
  49. package/out/parser/string/shift/operand/operand.d.ts +0 -1
  50. package/out/parser/string/shift/operand/operand.js +0 -1
  51. package/out/parser/string/shift/operand/unenclosed.d.ts +2 -3
  52. package/out/parser/string/shift/operand/unenclosed.js +1 -3
  53. package/out/parser/string/shift/operand/unenclosed.js.map +1 -1
  54. package/out/parser/string/shift/operator/bounds.d.ts +1 -8
  55. package/out/parser/string/shift/operator/bounds.js +0 -1
  56. package/out/parser/string/shift/operator/divisor.d.ts +1 -2
  57. package/out/parser/string/shift/operator/divisor.js +0 -1
  58. package/out/parser/string/shift/operator/operator.d.ts +1 -2
  59. package/out/parser/string/shift/operator/operator.js +0 -1
  60. package/out/parser/string/shift/scanner.d.ts +0 -1
  61. package/out/parser/string/shift/scanner.js +0 -1
  62. package/out/parser/string/string.d.ts +0 -1
  63. package/out/parser/string/string.js +0 -1
  64. package/out/parser/tuple.d.ts +1 -2
  65. package/out/parser/tuple.js +0 -1
  66. package/out/scope.d.ts +6 -6
  67. package/out/scope.js +6 -6
  68. package/out/scope.js.map +1 -1
  69. package/out/type.d.ts +0 -1
  70. package/out/type.js +0 -1
  71. package/out/type.js.map +1 -1
  72. package/package.json +6 -4
  73. package/parser/generic.ts +2 -2
  74. package/parser/objectLiteral.ts +23 -7
  75. package/parser/string/shift/operand/unenclosed.ts +1 -2
  76. package/scope.ts +18 -12
  77. package/type.ts +1 -0
  78. package/__tests__/cyclic.test.ts +0 -148
  79. package/out/ark.d.ts.map +0 -1
  80. package/out/base.d.ts +0 -205
  81. package/out/base.d.ts.map +0 -1
  82. package/out/base.js +0 -320
  83. package/out/base.js.map +0 -1
  84. package/out/builtins/builtins.d.ts +0 -23
  85. package/out/builtins/builtins.d.ts.map +0 -1
  86. package/out/builtins/builtins.js +0 -15
  87. package/out/builtins/builtins.js.map +0 -1
  88. package/out/builtins/jsObjects.d.ts +0 -19
  89. package/out/builtins/jsObjects.d.ts.map +0 -1
  90. package/out/builtins/jsObjects.js +0 -18
  91. package/out/builtins/jsObjects.js.map +0 -1
  92. package/out/builtins/parsing.d.ts +0 -16
  93. package/out/builtins/parsing.d.ts.map +0 -1
  94. package/out/builtins/parsing.js +0 -62
  95. package/out/builtins/parsing.js.map +0 -1
  96. package/out/builtins/tsGenerics.d.ts +0 -2
  97. package/out/builtins/tsGenerics.d.ts.map +0 -1
  98. package/out/builtins/tsGenerics.js +0 -26
  99. package/out/builtins/tsGenerics.js.map +0 -1
  100. package/out/builtins/tsKeywords.d.ts +0 -23
  101. package/out/builtins/tsKeywords.d.ts.map +0 -1
  102. package/out/builtins/tsKeywords.js +0 -23
  103. package/out/builtins/tsKeywords.js.map +0 -1
  104. package/out/builtins/utils/creditCard.d.ts +0 -3
  105. package/out/builtins/utils/creditCard.d.ts.map +0 -1
  106. package/out/builtins/utils/creditCard.js +0 -35
  107. package/out/builtins/utils/creditCard.js.map +0 -1
  108. package/out/builtins/utils/date.d.ts +0 -41
  109. package/out/builtins/utils/date.d.ts.map +0 -1
  110. package/out/builtins/utils/date.js +0 -56
  111. package/out/builtins/utils/date.js.map +0 -1
  112. package/out/builtins/validation.d.ts +0 -19
  113. package/out/builtins/validation.d.ts.map +0 -1
  114. package/out/builtins/validation.js +0 -74
  115. package/out/builtins/validation.js.map +0 -1
  116. package/out/config.d.ts +0 -9
  117. package/out/config.d.ts.map +0 -1
  118. package/out/config.js +0 -18
  119. package/out/config.js.map +0 -1
  120. package/out/constraints/ast.d.ts +0 -287
  121. package/out/constraints/ast.d.ts.map +0 -1
  122. package/out/constraints/ast.js +0 -2
  123. package/out/constraints/ast.js.map +0 -1
  124. package/out/constraints/constraint.d.ts +0 -200
  125. package/out/constraints/constraint.d.ts.map +0 -1
  126. package/out/constraints/constraint.js +0 -25
  127. package/out/constraints/constraint.js.map +0 -1
  128. package/out/constraints/predicate.d.ts +0 -64
  129. package/out/constraints/predicate.d.ts.map +0 -1
  130. package/out/constraints/predicate.js +0 -52
  131. package/out/constraints/predicate.js.map +0 -1
  132. package/out/constraints/props/index.d.ts +0 -42
  133. package/out/constraints/props/index.d.ts.map +0 -1
  134. package/out/constraints/props/index.js +0 -56
  135. package/out/constraints/props/index.js.map +0 -1
  136. package/out/constraints/props/optional.d.ts +0 -37
  137. package/out/constraints/props/optional.d.ts.map +0 -1
  138. package/out/constraints/props/optional.js +0 -56
  139. package/out/constraints/props/optional.js.map +0 -1
  140. package/out/constraints/props/prop.d.ts +0 -49
  141. package/out/constraints/props/prop.d.ts.map +0 -1
  142. package/out/constraints/props/prop.js +0 -106
  143. package/out/constraints/props/prop.js.map +0 -1
  144. package/out/constraints/props/props.d.ts +0 -37
  145. package/out/constraints/props/props.d.ts.map +0 -1
  146. package/out/constraints/props/props.js +0 -121
  147. package/out/constraints/props/props.js.map +0 -1
  148. package/out/constraints/props/required.d.ts +0 -46
  149. package/out/constraints/props/required.d.ts.map +0 -1
  150. package/out/constraints/props/required.js +0 -81
  151. package/out/constraints/props/required.js.map +0 -1
  152. package/out/constraints/props/sequence.d.ts +0 -82
  153. package/out/constraints/props/sequence.d.ts.map +0 -1
  154. package/out/constraints/props/sequence.js +0 -376
  155. package/out/constraints/props/sequence.js.map +0 -1
  156. package/out/constraints/props/shared.d.ts +0 -3
  157. package/out/constraints/props/shared.d.ts.map +0 -1
  158. package/out/constraints/props/shared.js +0 -4
  159. package/out/constraints/props/shared.js.map +0 -1
  160. package/out/constraints/refinements/after.d.ts +0 -33
  161. package/out/constraints/refinements/after.d.ts.map +0 -1
  162. package/out/constraints/refinements/after.js +0 -36
  163. package/out/constraints/refinements/after.js.map +0 -1
  164. package/out/constraints/refinements/before.d.ts +0 -33
  165. package/out/constraints/refinements/before.d.ts.map +0 -1
  166. package/out/constraints/refinements/before.js +0 -43
  167. package/out/constraints/refinements/before.js.map +0 -1
  168. package/out/constraints/refinements/divisor.d.ts +0 -52
  169. package/out/constraints/refinements/divisor.d.ts.map +0 -1
  170. package/out/constraints/refinements/divisor.js +0 -52
  171. package/out/constraints/refinements/divisor.js.map +0 -1
  172. package/out/constraints/refinements/exactLength.d.ts +0 -45
  173. package/out/constraints/refinements/exactLength.d.ts.map +0 -1
  174. package/out/constraints/refinements/exactLength.js +0 -52
  175. package/out/constraints/refinements/exactLength.js.map +0 -1
  176. package/out/constraints/refinements/kinds.d.ts +0 -29
  177. package/out/constraints/refinements/kinds.d.ts.map +0 -1
  178. package/out/constraints/refinements/kinds.js +0 -17
  179. package/out/constraints/refinements/kinds.js.map +0 -1
  180. package/out/constraints/refinements/length.d.ts +0 -48
  181. package/out/constraints/refinements/length.d.ts.map +0 -1
  182. package/out/constraints/refinements/length.js +0 -53
  183. package/out/constraints/refinements/length.js.map +0 -1
  184. package/out/constraints/refinements/max.d.ts +0 -31
  185. package/out/constraints/refinements/max.d.ts.map +0 -1
  186. package/out/constraints/refinements/max.js +0 -35
  187. package/out/constraints/refinements/max.js.map +0 -1
  188. package/out/constraints/refinements/maxLength.d.ts +0 -32
  189. package/out/constraints/refinements/maxLength.d.ts.map +0 -1
  190. package/out/constraints/refinements/maxLength.js +0 -36
  191. package/out/constraints/refinements/maxLength.js.map +0 -1
  192. package/out/constraints/refinements/min.d.ts +0 -31
  193. package/out/constraints/refinements/min.d.ts.map +0 -1
  194. package/out/constraints/refinements/min.js +0 -28
  195. package/out/constraints/refinements/min.js.map +0 -1
  196. package/out/constraints/refinements/minLength.d.ts +0 -32
  197. package/out/constraints/refinements/minLength.d.ts.map +0 -1
  198. package/out/constraints/refinements/minLength.js +0 -33
  199. package/out/constraints/refinements/minLength.js.map +0 -1
  200. package/out/constraints/refinements/range.d.ts +0 -119
  201. package/out/constraints/refinements/range.d.ts.map +0 -1
  202. package/out/constraints/refinements/range.js +0 -89
  203. package/out/constraints/refinements/range.js.map +0 -1
  204. package/out/constraints/refinements/regex.d.ts +0 -47
  205. package/out/constraints/refinements/regex.d.ts.map +0 -1
  206. package/out/constraints/refinements/regex.js +0 -37
  207. package/out/constraints/refinements/regex.js.map +0 -1
  208. package/out/constraints/refinements/shared.d.ts +0 -20
  209. package/out/constraints/refinements/shared.d.ts.map +0 -1
  210. package/out/constraints/refinements/shared.js +0 -10
  211. package/out/constraints/refinements/shared.js.map +0 -1
  212. package/out/generic.d.ts.map +0 -1
  213. package/out/inference.d.ts +0 -137
  214. package/out/inference.d.ts.map +0 -1
  215. package/out/inference.js +0 -73
  216. package/out/inference.js.map +0 -1
  217. package/out/keywords/ark.d.ts +0 -70
  218. package/out/keywords/ark.d.ts.map +0 -1
  219. package/out/keywords/ark.js +0 -29
  220. package/out/keywords/ark.js.map +0 -1
  221. package/out/keywords/internal.d.ts +0 -13
  222. package/out/keywords/internal.d.ts.map +0 -1
  223. package/out/keywords/internal.js +0 -13
  224. package/out/keywords/internal.js.map +0 -1
  225. package/out/keywords/jsObject.d.ts +0 -20
  226. package/out/keywords/jsObject.d.ts.map +0 -1
  227. package/out/keywords/jsObject.js +0 -18
  228. package/out/keywords/jsObject.js.map +0 -1
  229. package/out/keywords/parsing.d.ts +0 -17
  230. package/out/keywords/parsing.d.ts.map +0 -1
  231. package/out/keywords/parsing.js +0 -64
  232. package/out/keywords/parsing.js.map +0 -1
  233. package/out/keywords/root.d.ts +0 -7
  234. package/out/keywords/root.d.ts.map +0 -1
  235. package/out/keywords/root.js +0 -4
  236. package/out/keywords/root.js.map +0 -1
  237. package/out/keywords/tsGenerics.d.ts +0 -2
  238. package/out/keywords/tsGenerics.d.ts.map +0 -1
  239. package/out/keywords/tsGenerics.js +0 -26
  240. package/out/keywords/tsGenerics.js.map +0 -1
  241. package/out/keywords/tsPrimitive.d.ts +0 -24
  242. package/out/keywords/tsPrimitive.d.ts.map +0 -1
  243. package/out/keywords/tsPrimitive.js +0 -25
  244. package/out/keywords/tsPrimitive.js.map +0 -1
  245. package/out/keywords/utils/creditCard.d.ts +0 -11
  246. package/out/keywords/utils/creditCard.d.ts.map +0 -1
  247. package/out/keywords/utils/creditCard.js +0 -35
  248. package/out/keywords/utils/creditCard.js.map +0 -1
  249. package/out/keywords/utils/date.d.ts +0 -45
  250. package/out/keywords/utils/date.d.ts.map +0 -1
  251. package/out/keywords/utils/date.js +0 -56
  252. package/out/keywords/utils/date.js.map +0 -1
  253. package/out/keywords/validation.d.ts +0 -20
  254. package/out/keywords/validation.d.ts.map +0 -1
  255. package/out/keywords/validation.js +0 -80
  256. package/out/keywords/validation.js.map +0 -1
  257. package/out/kinds.d.ts +0 -102
  258. package/out/kinds.d.ts.map +0 -1
  259. package/out/kinds.js +0 -29
  260. package/out/kinds.js.map +0 -1
  261. package/out/main.d.ts.map +0 -1
  262. package/out/match.d.ts.map +0 -1
  263. package/out/module.d.ts.map +0 -1
  264. package/out/parse.d.ts +0 -29
  265. package/out/parse.d.ts.map +0 -1
  266. package/out/parse.js +0 -161
  267. package/out/parse.js.map +0 -1
  268. package/out/parser/definition.d.ts.map +0 -1
  269. package/out/parser/generic.d.ts.map +0 -1
  270. package/out/parser/objectLiteral.d.ts.map +0 -1
  271. package/out/parser/semantic/bounds.d.ts.map +0 -1
  272. package/out/parser/semantic/divisor.d.ts.map +0 -1
  273. package/out/parser/semantic/infer.d.ts.map +0 -1
  274. package/out/parser/semantic/utils.d.ts.map +0 -1
  275. package/out/parser/semantic/validate.d.ts.map +0 -1
  276. package/out/parser/string/reduce/dynamic.d.ts.map +0 -1
  277. package/out/parser/string/reduce/shared.d.ts.map +0 -1
  278. package/out/parser/string/reduce/static.d.ts.map +0 -1
  279. package/out/parser/string/shift/operand/date.d.ts.map +0 -1
  280. package/out/parser/string/shift/operand/enclosed.d.ts.map +0 -1
  281. package/out/parser/string/shift/operand/genericArgs.d.ts.map +0 -1
  282. package/out/parser/string/shift/operand/operand.d.ts.map +0 -1
  283. package/out/parser/string/shift/operand/unenclosed.d.ts.map +0 -1
  284. package/out/parser/string/shift/operator/bounds.d.ts.map +0 -1
  285. package/out/parser/string/shift/operator/divisor.d.ts.map +0 -1
  286. package/out/parser/string/shift/operator/operator.d.ts.map +0 -1
  287. package/out/parser/string/shift/scanner.d.ts.map +0 -1
  288. package/out/parser/string/string.d.ts.map +0 -1
  289. package/out/parser/tuple.d.ts.map +0 -1
  290. package/out/schema.d.ts +0 -175
  291. package/out/schema.d.ts.map +0 -1
  292. package/out/schema.js +0 -73
  293. package/out/schema.js.map +0 -1
  294. package/out/schemaScope.d.ts +0 -180
  295. package/out/schemaScope.d.ts.map +0 -1
  296. package/out/schemaScope.js +0 -235
  297. package/out/schemaScope.js.map +0 -1
  298. package/out/scope.d.ts.map +0 -1
  299. package/out/shared/compile.d.ts +0 -22
  300. package/out/shared/compile.d.ts.map +0 -1
  301. package/out/shared/compile.js +0 -79
  302. package/out/shared/compile.js.map +0 -1
  303. package/out/shared/context.d.ts +0 -54
  304. package/out/shared/context.d.ts.map +0 -1
  305. package/out/shared/context.js +0 -53
  306. package/out/shared/context.js.map +0 -1
  307. package/out/shared/declare.d.ts +0 -69
  308. package/out/shared/declare.d.ts.map +0 -1
  309. package/out/shared/declare.js +0 -2
  310. package/out/shared/declare.js.map +0 -1
  311. package/out/shared/disjoint.d.ts +0 -91
  312. package/out/shared/disjoint.d.ts.map +0 -1
  313. package/out/shared/disjoint.js +0 -110
  314. package/out/shared/disjoint.js.map +0 -1
  315. package/out/shared/errors.d.ts +0 -99
  316. package/out/shared/errors.d.ts.map +0 -1
  317. package/out/shared/errors.js +0 -108
  318. package/out/shared/errors.js.map +0 -1
  319. package/out/shared/implement.d.ts +0 -363
  320. package/out/shared/implement.d.ts.map +0 -1
  321. package/out/shared/implement.js +0 -68
  322. package/out/shared/implement.js.map +0 -1
  323. package/out/shared/inference.d.ts +0 -6
  324. package/out/shared/inference.d.ts.map +0 -1
  325. package/out/shared/inference.js +0 -5
  326. package/out/shared/inference.js.map +0 -1
  327. package/out/shared/intersections.d.ts +0 -60
  328. package/out/shared/intersections.d.ts.map +0 -1
  329. package/out/shared/intersections.js +0 -2
  330. package/out/shared/intersections.js.map +0 -1
  331. package/out/shared/traversal.d.ts +0 -62
  332. package/out/shared/traversal.d.ts.map +0 -1
  333. package/out/shared/traversal.js +0 -97
  334. package/out/shared/traversal.js.map +0 -1
  335. package/out/shared/utils.d.ts +0 -24
  336. package/out/shared/utils.d.ts.map +0 -1
  337. package/out/shared/utils.js +0 -15
  338. package/out/shared/utils.js.map +0 -1
  339. package/out/type.d.ts.map +0 -1
  340. package/out/types/basis.d.ts +0 -47
  341. package/out/types/basis.d.ts.map +0 -1
  342. package/out/types/basis.js +0 -15
  343. package/out/types/basis.js.map +0 -1
  344. package/out/types/discriminate.d.ts +0 -34
  345. package/out/types/discriminate.d.ts.map +0 -1
  346. package/out/types/discriminate.js +0 -120
  347. package/out/types/discriminate.js.map +0 -1
  348. package/out/types/domain.d.ts +0 -57
  349. package/out/types/domain.d.ts.map +0 -1
  350. package/out/types/domain.js +0 -41
  351. package/out/types/domain.js.map +0 -1
  352. package/out/types/intersection.d.ts +0 -127
  353. package/out/types/intersection.d.ts.map +0 -1
  354. package/out/types/intersection.js +0 -379
  355. package/out/types/intersection.js.map +0 -1
  356. package/out/types/morph.d.ts +0 -157
  357. package/out/types/morph.d.ts.map +0 -1
  358. package/out/types/morph.js +0 -99
  359. package/out/types/morph.js.map +0 -1
  360. package/out/types/proto.d.ts +0 -51
  361. package/out/types/proto.d.ts.map +0 -1
  362. package/out/types/proto.js +0 -60
  363. package/out/types/proto.js.map +0 -1
  364. package/out/types/type.d.ts +0 -143
  365. package/out/types/type.d.ts.map +0 -1
  366. package/out/types/type.js +0 -123
  367. package/out/types/type.js.map +0 -1
  368. package/out/types/union.d.ts +0 -71
  369. package/out/types/union.d.ts.map +0 -1
  370. package/out/types/union.js +0 -379
  371. package/out/types/union.js.map +0 -1
  372. package/out/types/unit.d.ts +0 -45
  373. package/out/types/unit.d.ts.map +0 -1
  374. package/out/types/unit.js +0 -56
  375. package/out/types/unit.js.map +0 -1
  376. package/out/util.d.ts +0 -31
  377. package/out/util.d.ts.map +0 -1
  378. package/out/util.js +0 -8
  379. package/out/util.js.map +0 -1
@@ -82,4 +82,15 @@ contextualize(() => {
82
82
  // should give the shallow custom error
83
83
  attest(user(null).toString()).snap("must be a valid user (was null)")
84
84
  })
85
+
86
+ it("jitless", () => {
87
+ const types = scope(
88
+ {
89
+ fast: "false"
90
+ },
91
+ { jitless: true }
92
+ ).export()
93
+
94
+ attest(types.fast.raw.jit).equals(false)
95
+ })
85
96
  })
@@ -1,4 +1,5 @@
1
1
  import { attest, contextualize } from "@arktype/attest"
2
+ import { writeDuplicateAliasError } from "@arktype/schema"
2
3
  import { lazily } from "@arktype/util"
3
4
  import { type Module, scope, type } from "arktype"
4
5
  import { writePrefixedPrivateReferenceMessage } from "../parser/semantic/validate.js"
@@ -39,18 +40,6 @@ contextualize(() => {
39
40
  attest<{ a: 3 | 60 | "no" | "yes" | true }>(imported.infer)
40
41
  })
41
42
 
42
- // TODO: fix, tests for more duplicate scenarios
43
- // it("duplicate alias", () => {
44
- // attest(() =>
45
- // scope({ a: "boolean" })
46
- // .scope(
47
- // // @ts-expect-error
48
- // { a: "string" }
49
- // )
50
- // .export()
51
- // ).throwsAndHasTypeError(writeDuplicateAliasesMessage("a"))
52
- // })
53
-
54
43
  it("import & export", () => {
55
44
  const threeSixtyNoScope = scope({
56
45
  three: "3",
@@ -109,6 +98,23 @@ contextualize(() => {
109
98
  ).throwsAndHasTypeError(writePrefixedPrivateReferenceMessage("#kekw"))
110
99
  })
111
100
 
101
+ it("errors on public and private refrence with same name", () => {
102
+ attest(() =>
103
+ scope({
104
+ kekw: "1",
105
+ // @ts-expect-error
106
+ "#kekw": "1"
107
+ }).export()
108
+ ).throwsAndHasTypeError(writeDuplicateAliasError("kekw"))
109
+ attest(() =>
110
+ scope({
111
+ // @ts-expect-error
112
+ "#kekw": "1",
113
+ kekw: "1"
114
+ }).export()
115
+ ).throwsAndHasTypeError(writeDuplicateAliasError("kekw"))
116
+ })
117
+
112
118
  // TODO: reenable
113
119
  // it("generic", () => {
114
120
  // const types = scope({
@@ -1,5 +1,5 @@
1
1
  import { attest, contextualize } from "@arktype/attest"
2
- import { reference } from "@arktype/util"
2
+ import { printable, registeredReference } from "@arktype/util"
3
3
  import { type } from "arktype"
4
4
 
5
5
  contextualize(
@@ -11,28 +11,44 @@ contextualize(
11
11
  attest(t.json).equals(type("5").json)
12
12
  })
13
13
 
14
- it("non-serializable", () => {
15
- const s = Symbol()
16
- const t = type(["===", s])
14
+ it("symbol with description", () => {
15
+ // if another symbol with the description "ism" is used in a test,
16
+ // the snapshotted errors below could break, but I want to test the
17
+ // actual display format.
18
+ // if you're here for that reason, choose another symbol name :P
19
+ const ism = Symbol("ism")
20
+ const t = type(["===", ism])
21
+ attest(t(ism)).equals(ism)
22
+
23
+ // same with ick- don't use it
24
+ const ick = Symbol("ick")
25
+
26
+ attest(t(ick).toString()).snap("must be Symbol(ism) (was Symbol(ick))")
27
+ })
28
+
29
+ it("anonymous symbol", () => {
30
+ const anon = Symbol()
31
+ // An anonymous symbol will definitely have a suffix so we need to
32
+ // get the name ahead of time
33
+ const anonName = printable(anon)
34
+ const t = type(["===", anon])
17
35
  attest<symbol>(t.infer)
18
- attest(t(s)).equals(s)
19
- attest(t("test").toString()).snap(
20
- 'must be (symbol anonymous) (was "test")'
21
- )
36
+ attest(t(anon)).equals(anon)
37
+ attest(t("test").toString()).equals(`must be ${anonName} (was "test")`)
22
38
  })
23
39
 
24
40
  it("branches", () => {
25
41
  const o = { ark: true }
26
- const oReference = reference(o)
42
+ const oReference = registeredReference(o)
27
43
  const s = Symbol()
28
- const sReference = reference(s)
44
+ const sReference = registeredReference(s)
29
45
  const t = type(["===", true, "foo", 5, 1n, null, undefined, o, s])
30
46
  attest<
31
47
  true | "foo" | 5 | 1n | null | undefined | { ark: boolean } | typeof s
32
48
  >(t.infer)
33
49
  attest(t.json).equals([
34
- { unit: sReference },
35
50
  { unit: oReference },
51
+ { unit: sReference },
36
52
  { unit: "1n" },
37
53
  { unit: "foo" },
38
54
  { unit: "undefined" },
@@ -52,16 +68,16 @@ contextualize(
52
68
 
53
69
  it("branches", () => {
54
70
  const o = { ark: true }
55
- const oReference = reference(o)
71
+ const oReference = registeredReference(o)
56
72
  const s = Symbol()
57
- const sReference = reference(s)
73
+ const sReference = registeredReference(s)
58
74
  const t = type("===", "foo", 5, true, null, 1n, undefined, o, s)
59
75
  attest<
60
76
  true | "foo" | 5 | 1n | null | undefined | { ark: boolean } | typeof s
61
77
  >(t.infer)
62
78
  attest(t.json).equals([
63
- { unit: sReference },
64
79
  { unit: oReference },
80
+ { unit: sReference },
65
81
  { unit: "1n" },
66
82
  { unit: "foo" },
67
83
  { unit: "undefined" },
@@ -1,12 +1,12 @@
1
1
  import { attest, contextualize } from "@arktype/attest"
2
2
  import type { Narrowed, Out, of, string } from "@arktype/schema"
3
- import { reference, type equals } from "@arktype/util"
3
+ import { registeredReference, type equals } from "@arktype/util"
4
4
  import { type, type Type } from "arktype"
5
5
 
6
6
  contextualize(() => {
7
7
  it("implicit problem", () => {
8
8
  const isOdd = (n: number) => n % 2 === 1
9
- const isOddRef = reference(isOdd)
9
+ const isOddRef = registeredReference(isOdd)
10
10
  const odd = type(["number", ":", isOdd])
11
11
  attest<number>(odd.infer)
12
12
  attest(odd.json).equals({ domain: "number", predicate: [isOddRef] })
@@ -4,7 +4,7 @@ import {
4
4
  writeUnboundableMessage,
5
5
  writeUnresolvableMessage
6
6
  } from "@arktype/schema"
7
- import { printable, reference } from "@arktype/util"
7
+ import { printable, registeredReference } from "@arktype/util"
8
8
  import { scope, type } from "arktype"
9
9
  import { writeInvalidSpreadTypeMessage } from "../parser/objectLiteral.js"
10
10
 
@@ -42,7 +42,7 @@ contextualize(
42
42
 
43
43
  it("symbol key", () => {
44
44
  const s = Symbol()
45
- const name = reference(s)
45
+ const name = registeredReference(s)
46
46
  const t = type({
47
47
  [s]: "string"
48
48
  })
@@ -89,9 +89,16 @@ contextualize(
89
89
  attest<{ "a?": string }>(t.infer)
90
90
  })
91
91
 
92
- // TODO: reenable
93
- // it("traverse optional", () => {
94
- // const o = type({ "a?": "string" }).configure({ keys: "strict" })
92
+ it("traverse optional", () => {
93
+ const o = type({ "a?": "string" })
94
+ attest(o({ a: "a" })).snap({ a: "a" })
95
+ attest(o({})).snap({})
96
+ attest(o({ a: 1 }).toString()).snap("a must be a string (was number)")
97
+ })
98
+
99
+ // it("traverse strict optional", () => {
100
+ // // TODO: strict
101
+ // const o = type({ "a?": "string" })
95
102
  // attest(o({ a: "a" })).snap({ a: "a" })
96
103
  // attest(o({})).snap({})
97
104
  // attest(o({ a: 1 }).toString()).snap("a must be a string (was number)")
@@ -217,19 +224,75 @@ contextualize(
217
224
  },
218
225
  "index",
219
226
  () => {
220
- it("index", () => {
227
+ it("string index", () => {
221
228
  const o = type({ "[string]": "string" })
222
229
  attest<{ [x: string]: string }>(o.infer)
230
+ attest(o.json).snap({
231
+ domain: "object",
232
+ index: [{ key: "string", value: "string" }]
233
+ })
234
+
235
+ attest(o({})).equals({})
236
+ attest(o({ a: "a", b: "b" })).equals({ a: "a", b: "b" })
237
+
238
+ const validWithSymbol = { a: "a", [Symbol()]: null }
239
+ attest(validWithSymbol).equals(validWithSymbol)
240
+
241
+ attest(o({ a: 1 }).toString()).snap("a must be a string (was number)")
242
+ attest(o({ a: true, b: false }).toString())
243
+ .snap(`a must be a string (was true)
244
+ b must be a string (was false)`)
245
+ })
246
+
247
+ it("symbol index", () => {
248
+ const o = type({ "[symbol]": "1" })
249
+ attest<{ [x: symbol]: 1 }>(o.infer)
250
+ attest(o.json).snap({
251
+ domain: "object",
252
+ index: [{ key: "symbol", value: { unit: 1 } }]
253
+ })
254
+
255
+ attest(o({})).equals({})
256
+
257
+ attest(o({ a: 999 })).unknown.snap({ a: 999 })
258
+
259
+ const zildjian = Symbol()
260
+ const zildjianName = printable(zildjian)
261
+
262
+ // I've been dope, suspenseful with a pencil
263
+ // Ever since...
264
+ const prince = Symbol()
265
+ const princeName = printable(prince)
266
+
267
+ attest(o({ [zildjian]: 1, [prince]: 1 })).equals({
268
+ [zildjian]: 1,
269
+ [prince]: 1
270
+ })
271
+
272
+ attest({ a: 0, [zildjian]: 1 }).equals({ a: 0, [zildjian]: 1 })
273
+
274
+ attest(o({ [zildjian]: 0 }).toString()).equals(
275
+ `value at [${zildjianName}] must be 1 (was 0)`
276
+ )
277
+ attest(o({ [prince]: null, [zildjian]: undefined }).toString())
278
+ .snap(`value at [${princeName}] must be 1 (was null)
279
+ value at [${zildjianName}] must be 1 (was undefined)`)
223
280
  })
224
281
 
225
282
  it("enumerable indexed union", () => {
226
283
  const o = type({ "['foo' | 'bar']": "string" })
227
- attest<{ foo: string; bar: string }>(o.infer)
284
+ const expected = type({ foo: "string", bar: "string" })
285
+ attest<typeof expected>(o)
286
+ attest(o.json).equals(expected.json)
228
287
  })
229
288
 
230
289
  it("non-enumerable indexed union", () => {
231
290
  const o = type({ "[string | symbol]": "string" })
232
291
  attest<{ [x: string]: string; [x: symbol]: string }>(o.infer)
292
+ attest(o.json).snap({
293
+ domain: "object",
294
+ index: [{ key: ["string", "symbol"], value: "string" }]
295
+ })
233
296
  })
234
297
 
235
298
  it("multiple indexed", () => {
@@ -238,6 +301,35 @@ contextualize(
238
301
  "[symbol]": "number"
239
302
  })
240
303
  attest<{ [x: string]: string; [x: symbol]: number }>(o.infer)
304
+ attest(o.json).snap({
305
+ domain: "object",
306
+ index: [
307
+ { key: "string", value: "string" },
308
+ { key: "symbol", value: "number" }
309
+ ]
310
+ })
311
+
312
+ attest(o({})).equals({})
313
+ attest(o({ foo: "f" })).equals({ foo: "f" })
314
+
315
+ const sym = Symbol()
316
+
317
+ const symName = printable(sym)
318
+
319
+ const validWithStringsAndSymbols = {
320
+ str: "string",
321
+ [sym]: 8675309
322
+ }
323
+
324
+ attest(o(validWithStringsAndSymbols)).equals(validWithStringsAndSymbols)
325
+
326
+ attest(
327
+ o({
328
+ str: 100,
329
+ [sym]: "💯"
330
+ }).toString()
331
+ ).snap(`str must be a string (was number)
332
+ value at [${symName}] must be a number (was string)`)
241
333
  })
242
334
 
243
335
  it("all key kinds", () => {
@@ -249,6 +341,25 @@ contextualize(
249
341
  attest<{ [x: string]: string; required: "foo"; optional?: "bar" }>(
250
342
  o.infer
251
343
  )
344
+ attest(o.json).snap({
345
+ domain: "object",
346
+ prop: [
347
+ { key: "optional", optional: true, value: { unit: "bar" } },
348
+ { key: "required", value: { unit: "foo" } }
349
+ ],
350
+ index: [{ key: "string", value: "string" }]
351
+ })
352
+
353
+ const valid: typeof o.infer = { required: "foo", other: "bar" }
354
+ attest(o(valid)).equals(valid)
355
+ attest(
356
+ o({
357
+ optional: "wrongString",
358
+ other: 0n
359
+ }).toString()
360
+ ).snap(`optional must be "bar" (was "wrongString")
361
+ required must be "foo" (was missing)
362
+ other must be a string (was bigint)`)
252
363
  })
253
364
 
254
365
  it("index key from scope", () => {
@@ -261,6 +372,14 @@ contextualize(
261
372
  type Key = symbol | "foo" | "bar" | "baz"
262
373
  attest<Key>(types.key.infer)
263
374
  attest<Record<Key, string>>(types.obj.infer)
375
+
376
+ const expected = type({ "[symbol]": "string" }).and({
377
+ foo: "string",
378
+ bar: "string",
379
+ baz: "string"
380
+ })
381
+
382
+ attest(types.obj.json).snap(expected.json)
264
383
  })
265
384
 
266
385
  it("syntax error in index definition", () => {
@@ -314,6 +433,10 @@ contextualize(
314
433
  it("escaped index", () => {
315
434
  const o = type({ "\\[string]": "string" })
316
435
  attest<{ "[string]": string }>(o.infer)
436
+ attest(o.json).snap({
437
+ domain: "object",
438
+ prop: [{ key: "[string]", value: "string" }]
439
+ })
317
440
  })
318
441
  }
319
442
  )
@@ -41,7 +41,7 @@ contextualize(() => {
41
41
  attest(parsedUser(JSON.stringify(validUser))).equals(validUser)
42
42
  const missingKey = { name: "David" }
43
43
  attest(parsedUser(JSON.stringify(missingKey)).toString()).snap(
44
- "age must be defined"
44
+ "age must be a number (was missing)"
45
45
  )
46
46
  })
47
47
 
@@ -174,4 +174,201 @@ contextualize(() => {
174
174
  )
175
175
  })
176
176
  })
177
+ describe("cyclic", () => {
178
+ it("base", () => {
179
+ const types = scope({ a: { b: "b" }, b: { a: "a" } }).export()
180
+
181
+ const a = {} as { b: typeof b }
182
+ const b = { a }
183
+ a.b = b
184
+
185
+ attest(types.a(a)).equals(a)
186
+ attest(types.a({ b: { a: { b: { a: 5 } } } }).toString()).snap(
187
+ "b.a.b.a must be an object (was number)"
188
+ )
189
+
190
+ // Type hint displays as "..." on hitting cycle (or any if "noErrorTruncation" is true)
191
+ attest({} as typeof types.a.infer).type.toString.snap()
192
+ attest({} as typeof types.b.infer.a.b.a.b.a.b.a).type.toString.snap()
193
+
194
+ // @ts-expect-error
195
+ attest({} as typeof types.a.infer.b.a.b.c).type.errors.snap(
196
+ `Property 'c' does not exist on type '{ a: { b: ...; }; }'.`
197
+ )
198
+ })
199
+
200
+ const getCyclicScope = () =>
201
+ scope({
202
+ package: {
203
+ name: "string",
204
+ "dependencies?": "package[]",
205
+ "contributors?": "contributor[]"
206
+ },
207
+ contributor: {
208
+ email: "email",
209
+ "packages?": "package[]"
210
+ }
211
+ })
212
+
213
+ type Package = ReturnType<typeof getCyclicScope>["infer"]["package"]
214
+
215
+ const getCyclicData = () => {
216
+ const packageData = {
217
+ name: "arktype",
218
+ dependencies: [{ name: "typescript" }],
219
+ contributors: [{ email: "david@arktype.io" }]
220
+ } satisfies Package
221
+ packageData.dependencies.push(packageData)
222
+ return packageData
223
+ }
224
+
225
+ it("cyclic union", () => {
226
+ const $ = scope({
227
+ a: { b: "b|false" },
228
+ b: { a: "a|true" }
229
+ })
230
+ attest($.infer).type.toString.snap(
231
+ "{ a: { b: false | { a: true | any; }; }; b: { a: true | { b: false | any; }; }; }"
232
+ )
233
+ })
234
+
235
+ it("cyclic intersection", () => {
236
+ const $ = scope({
237
+ a: { b: "b&a" },
238
+ b: { a: "a&b" }
239
+ })
240
+ attest($.infer).type.toString.snap(
241
+ "{ a: { b: { a: { b: any; a: any; }; b: any; }; }; b: { a: { b: { a: any; b: any; }; a: any; }; }; }"
242
+ )
243
+ })
244
+
245
+ it("allows valid", () => {
246
+ const types = getCyclicScope().export()
247
+ const data = getCyclicData()
248
+ attest(types.package(data)).snap({
249
+ name: "arktype",
250
+ dependencies: [{ name: "typescript" }, "(cycle)" as never],
251
+ contributors: [{ email: "david@arktype.io" }]
252
+ })
253
+ })
254
+
255
+ it("adds errors on invalid", () => {
256
+ const types = getCyclicScope().export()
257
+ const data = getCyclicData()
258
+ data.contributors[0].email = "ssalbdivad"
259
+ attest(types.package(data).toString()).snap(
260
+ 'contributors[0].email must be a valid email (was "ssalbdivad")'
261
+ )
262
+ })
263
+
264
+ it("can include cyclic data in message", () => {
265
+ const data = getCyclicData()
266
+ const nonSelfDependent = getCyclicScope().type([
267
+ "package",
268
+ ":",
269
+ p => !p.dependencies?.some(d => d.name === p.name)
270
+ ])
271
+ attest(nonSelfDependent(data).toString()).snap(
272
+ 'must be valid according to an anonymous predicate (was {"name":"arktype","dependencies":[{"name":"typescript"},"(cycle)"],"contributors":[{"email":"david@arktype.io"}]})'
273
+ )
274
+ })
275
+
276
+ it("union cyclic reference", () => {
277
+ const types = scope({
278
+ a: {
279
+ b: "b"
280
+ },
281
+ b: {
282
+ a: "a|3"
283
+ }
284
+ }).export()
285
+ attest(types.a.infer).type.toString.snap("{ b: { a: 3 | any; }")
286
+
287
+ attest(types.a.json).snap({
288
+ domain: "object",
289
+ prop: [
290
+ {
291
+ key: "b",
292
+ value: {
293
+ domain: "object",
294
+ prop: [{ key: "a", value: ["$a", { unit: 3 }] }]
295
+ }
296
+ }
297
+ ]
298
+ })
299
+
300
+ const valid: typeof types.a.infer = { b: { a: 3 } }
301
+
302
+ attest(types.a(valid)).equals(valid)
303
+
304
+ valid.b.a = valid
305
+
306
+ // check cyclic
307
+ attest(types.a(valid)).equals(valid)
308
+
309
+ attest(types.a({ b: { a: { b: { a: 4 } } } }).toString()).snap(
310
+ 'b.a.b.a must be an object or 3 (was number, 4) or b.a must be 3 (was {"b":{"a":4}})'
311
+ )
312
+
313
+ attest(types.b.infer).type.toString.snap("{ a: 3 | { b: any; }; }")
314
+ attest(types.b.json).snap({
315
+ domain: "object",
316
+ prop: [{ key: "a", value: ["$a", { unit: 3 }] }]
317
+ })
318
+ })
319
+
320
+ it("intersect cyclic reference", () => {
321
+ const types = scope({
322
+ a: {
323
+ b: "b"
324
+ },
325
+ b: {
326
+ c: "a&b"
327
+ }
328
+ }).export()
329
+ attest(types.a.infer).type.toString.snap()
330
+ attest(types.b.infer).type.toString.snap()
331
+
332
+ const expectedCyclicJson =
333
+ types.a.raw.firstReferenceOfKindOrThrow("alias").json
334
+
335
+ attest(types.a.json).snap({
336
+ domain: "object",
337
+ prop: [
338
+ {
339
+ key: "b",
340
+ value: {
341
+ domain: "object",
342
+ prop: [
343
+ {
344
+ key: "c",
345
+ value: expectedCyclicJson
346
+ }
347
+ ]
348
+ }
349
+ }
350
+ ]
351
+ })
352
+ const a = {} as typeof types.a.infer
353
+ const b = { c: {} } as typeof types.b.infer
354
+ a.b = b
355
+ b.c.b = b
356
+ b.c.c = b.c
357
+
358
+ attest(types.a(a)).equals(a)
359
+ attest(types.a({ b: { c: {} } }).toString())
360
+ .snap(`b.c.b must be { c: a&b } (was missing)
361
+ b.c.c must be a&b (was missing)`)
362
+
363
+ attest(types.b.json).snap({
364
+ domain: "object",
365
+ prop: [
366
+ {
367
+ key: "c",
368
+ value: expectedCyclicJson
369
+ }
370
+ ]
371
+ })
372
+ })
373
+ })
177
374
  })
@@ -38,7 +38,9 @@ contextualize(() => {
38
38
  name: "Shawn",
39
39
  age: 99
40
40
  })
41
- attest(t({ name: "Shawn" }).toString()).snap("age must be defined")
41
+ attest(t({ name: "Shawn" }).toString()).snap(
42
+ "age must be a number (was missing)"
43
+ )
42
44
  })
43
45
 
44
46
  it("customized builtin problem", () => {
@@ -74,7 +76,9 @@ contextualize(() => {
74
76
  const t = type({ bar: "boolean" }, "|", { foo: "string" })
75
77
  attest(t({ foo: "ok" })).snap({ foo: "ok" })
76
78
  attest(t({ bar: true })).snap({ bar: true })
77
- attest(t({}).toString()).snap("bar must be defined or foo must be defined")
79
+ attest(t({}).toString()).snap(
80
+ "bar must be boolean (was missing) or foo must be a string (was missing)"
81
+ )
78
82
  attest(t({ bar: "swapped", foo: true }).toString()).snap(
79
83
  'bar must be boolean (was "swapped") or foo must be a string (was true)'
80
84
  )
@@ -85,7 +89,7 @@ contextualize(() => {
85
89
  attest(t({ key: { a: "ok" } })).snap({ key: { a: "ok" } })
86
90
  attest(t({ key: { b: true } })).snap({ key: { b: true } })
87
91
  attest(t({ key: {} }).toString()).snap(
88
- "key.a must be defined or key.b must be defined"
92
+ "key.a must be a string (was missing) or key.b must be boolean (was missing)"
89
93
  )
90
94
  })
91
95
 
@@ -94,7 +98,9 @@ contextualize(() => {
94
98
  attest(t({ a: "ok" })).snap({ a: "ok" })
95
99
  attest(t({ a: 5 })).snap({ a: 5 })
96
100
  // value isn't present
97
- attest(t({}).toString()).snap("a must be defined")
101
+ attest(t({}).toString()).snap(
102
+ "a must be a number, a string or null (was missing)"
103
+ )
98
104
  // unsatisfying value
99
105
  attest(t({ a: false }).toString()).snap(
100
106
  "a must be a number, a string or null (was false)"
@@ -108,7 +114,9 @@ contextualize(() => {
108
114
  c: { foo: "Function" },
109
115
  d: "a|b|c"
110
116
  }).export()
111
- attest(types.d({}).toString()).snap("foo must be defined")
117
+ attest(types.d({}).toString()).snap(
118
+ "foo must be a function, a number or a string (was missing)"
119
+ )
112
120
  attest(types.d({ foo: null }).toString()).snap(
113
121
  "foo must be a function, a number or a string (was null)"
114
122
  )
package/out/ark.d.ts CHANGED
@@ -12,7 +12,7 @@ type TsGenericsExports<$ = Ark> = {
12
12
  "[K]": "V";
13
13
  }, $>;
14
14
  };
15
- export declare const tsGenerics: Module<TsGenericsExports<Ark>>;
15
+ export declare const tsGenerics: Module<TsGenericsExports>;
16
16
  export declare const ambient: Scope<Ark>;
17
17
  export declare const ark: Module<Ark>;
18
18
  export declare const type: TypeParser<{}>;
@@ -26,4 +26,3 @@ export declare const match: MatchParser<{}>;
26
26
  export declare const define: DefinitionParser<{}>;
27
27
  export declare const declare: DeclarationParser<{}>;
28
28
  export {};
29
- //# sourceMappingURL=ark.d.ts.map
package/out/ark.js CHANGED
@@ -8,4 +8,3 @@ export const type = ambient.type;
8
8
  export const match = ambient.match;
9
9
  export const define = ambient.define;
10
10
  export const declare = ambient.declare;
11
- //# sourceMappingURL=ark.js.map
package/out/generic.d.ts CHANGED
@@ -19,4 +19,3 @@ export declare class Generic<params extends string[] = string[], def = unknown,
19
19
  constructor(params: params, def: def, $: SchemaScope<$>);
20
20
  }
21
21
  export {};
22
- //# sourceMappingURL=generic.d.ts.map
package/out/generic.js CHANGED
@@ -22,4 +22,3 @@ export class Generic extends Callable {
22
22
  this.$ = $;
23
23
  }
24
24
  }
25
- //# sourceMappingURL=generic.js.map
package/out/main.d.ts CHANGED
@@ -4,4 +4,3 @@ export { ambient, ark, declare, define, match, type } from "./ark.js";
4
4
  export { Module } from "./module.js";
5
5
  export { scope, type Scope } from "./scope.js";
6
6
  export { Type, type inferTypeRoot, type validateTypeRoot } from "./type.js";
7
- //# sourceMappingURL=main.d.ts.map
package/out/main.js CHANGED
@@ -3,4 +3,3 @@ export { ambient, ark, declare, define, match, type } from "./ark.js";
3
3
  export { Module } from "./module.js";
4
4
  export { scope } from "./scope.js";
5
5
  export { Type } from "./type.js";
6
- //# sourceMappingURL=main.js.map
package/out/match.d.ts CHANGED
@@ -69,4 +69,3 @@ export type MatchInvocation<ctx extends MatchInvocationContext> = <data extends
69
69
  }[numericStringKeyOf<ctx["thens"]>];
70
70
  export declare const createMatchParser: <$>($: Scope) => MatchParser<$>;
71
71
  export {};
72
- //# sourceMappingURL=match.d.ts.map
package/out/match.js CHANGED
@@ -50,4 +50,3 @@ export const createMatchParser = ($) => {
50
50
  // only: () => matchParser(true)
51
51
  // }) as never
52
52
  };
53
- //# sourceMappingURL=match.js.map