@depup/typebox 1.1.23-depup.0 → 1.3.8-depup.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 (952) hide show
  1. package/README.md +2 -2
  2. package/build/compile/code.mjs +2 -2
  3. package/build/compile/validator.d.mts +7 -14
  4. package/build/compile/validator.mjs +32 -57
  5. package/build/error/errors.d.mts +1 -7
  6. package/build/format/_idna.mjs +36 -6
  7. package/build/format/_puny.mjs +4 -1
  8. package/build/format/_registry.mjs +9 -9
  9. package/build/format/format.d.mts +9 -9
  10. package/build/format/format.mjs +9 -9
  11. package/build/format/uuid.d.mts +2 -2
  12. package/build/format/uuid.mjs +3 -3
  13. package/build/guard/emit.d.mts +3 -5
  14. package/build/guard/emit.mjs +12 -13
  15. package/build/guard/guard.d.mts +15 -7
  16. package/build/guard/guard.mjs +40 -15
  17. package/build/guard/string.mjs +16 -4
  18. package/build/schema/build.d.mts +11 -7
  19. package/build/schema/build.mjs +28 -9
  20. package/build/schema/check.d.mts +3 -3
  21. package/build/schema/compile.d.mts +4 -4
  22. package/build/schema/compile.mjs +9 -9
  23. package/build/schema/engine/_context.mjs +3 -3
  24. package/build/schema/engine/_functions.mjs +34 -16
  25. package/build/schema/engine/_refine.mjs +4 -4
  26. package/build/schema/engine/_stack.d.mts +4 -4
  27. package/build/schema/engine/_stack.mjs +52 -18
  28. package/build/schema/engine/additionalItems.mjs +17 -7
  29. package/build/schema/engine/additionalProperties.mjs +1 -1
  30. package/build/schema/engine/boolean.d.mts +3 -3
  31. package/build/schema/engine/boolean.mjs +4 -4
  32. package/build/schema/engine/contains.mjs +18 -6
  33. package/build/schema/engine/dynamicRef.d.mts +6 -0
  34. package/build/schema/engine/dynamicRef.mjs +25 -0
  35. package/build/schema/engine/enum.mjs +1 -1
  36. package/build/schema/engine/index.d.mts +0 -1
  37. package/build/schema/engine/index.mjs +0 -1
  38. package/build/schema/engine/items.mjs +26 -6
  39. package/build/schema/engine/maxContains.mjs +3 -3
  40. package/build/schema/engine/minContains.mjs +14 -4
  41. package/build/schema/engine/not.mjs +4 -2
  42. package/build/schema/engine/oneOf.mjs +7 -6
  43. package/build/schema/engine/recursiveRef.mjs +3 -3
  44. package/build/schema/engine/ref.mjs +4 -10
  45. package/build/schema/engine/schema.mjs +15 -15
  46. package/build/schema/engine/type.mjs +15 -19
  47. package/build/schema/parse.d.mts +3 -3
  48. package/build/schema/pointer/index.d.mts +1 -1
  49. package/build/schema/pointer/index.mjs +1 -1
  50. package/build/schema/pointer/pointer.mjs +11 -1
  51. package/build/schema/resolve/ref.d.mts +1 -0
  52. package/build/schema/resolve/ref.mjs +61 -11
  53. package/build/schema/static/_canonical.d.mts +7 -0
  54. package/build/schema/static/{~elements.d.mts → _elements.d.mts} +3 -3
  55. package/build/schema/static/items.d.mts +1 -1
  56. package/build/schema/static/prefixItems.d.mts +1 -1
  57. package/build/schema/static/properties.d.mts +27 -6
  58. package/build/schema/static/ref.d.mts +1 -1
  59. package/build/schema/static/required.d.mts +1 -11
  60. package/build/schema/static/schema.d.mts +3 -2
  61. package/build/schema/static/static.d.mts +2 -2
  62. package/build/schema/types/_refine.d.mts +2 -2
  63. package/build/schema/types/_refine.mjs +4 -4
  64. package/build/schema/types/dependencies.mjs +1 -1
  65. package/build/schema/types/index.d.mts +0 -1
  66. package/build/schema/types/index.mjs +0 -1
  67. package/build/schema/types/schema.d.mts +1 -1
  68. package/build/schema/types/schema.mjs +2 -2
  69. package/build/system/locale/_config.d.mts +1 -1
  70. package/build/system/locale/ar_001.d.mts +1 -1
  71. package/build/system/locale/ar_001.mjs +0 -1
  72. package/build/system/locale/bn_BD.d.mts +1 -1
  73. package/build/system/locale/bn_BD.mjs +0 -1
  74. package/build/system/locale/cs_CZ.d.mts +1 -1
  75. package/build/system/locale/cs_CZ.mjs +0 -1
  76. package/build/system/locale/de_DE.d.mts +1 -1
  77. package/build/system/locale/de_DE.mjs +0 -1
  78. package/build/system/locale/el_GR.d.mts +1 -1
  79. package/build/system/locale/el_GR.mjs +0 -1
  80. package/build/system/locale/en_US.d.mts +1 -1
  81. package/build/system/locale/en_US.mjs +0 -1
  82. package/build/system/locale/es_419.d.mts +1 -1
  83. package/build/system/locale/es_419.mjs +0 -1
  84. package/build/system/locale/es_AR.d.mts +1 -1
  85. package/build/system/locale/es_AR.mjs +0 -1
  86. package/build/system/locale/es_ES.d.mts +1 -1
  87. package/build/system/locale/es_ES.mjs +0 -1
  88. package/build/system/locale/es_MX.d.mts +1 -1
  89. package/build/system/locale/es_MX.mjs +0 -1
  90. package/build/system/locale/fa_IR.d.mts +1 -1
  91. package/build/system/locale/fa_IR.mjs +0 -1
  92. package/build/system/locale/fil_PH.d.mts +1 -1
  93. package/build/system/locale/fil_PH.mjs +0 -1
  94. package/build/system/locale/fr_CA.d.mts +1 -1
  95. package/build/system/locale/fr_CA.mjs +0 -1
  96. package/build/system/locale/fr_FR.d.mts +1 -1
  97. package/build/system/locale/fr_FR.mjs +0 -1
  98. package/build/system/locale/ha_NG.d.mts +1 -1
  99. package/build/system/locale/ha_NG.mjs +0 -1
  100. package/build/system/locale/hi_IN.d.mts +1 -1
  101. package/build/system/locale/hi_IN.mjs +0 -1
  102. package/build/system/locale/hu_HU.d.mts +1 -1
  103. package/build/system/locale/hu_HU.mjs +0 -1
  104. package/build/system/locale/id_ID.d.mts +1 -1
  105. package/build/system/locale/id_ID.mjs +0 -1
  106. package/build/system/locale/it_IT.d.mts +1 -1
  107. package/build/system/locale/it_IT.mjs +0 -1
  108. package/build/system/locale/ja_JP.d.mts +1 -1
  109. package/build/system/locale/ja_JP.mjs +0 -1
  110. package/build/system/locale/ko_KR.d.mts +1 -1
  111. package/build/system/locale/ko_KR.mjs +0 -1
  112. package/build/system/locale/ms_MY.d.mts +1 -1
  113. package/build/system/locale/ms_MY.mjs +0 -1
  114. package/build/system/locale/nl_NL.d.mts +1 -1
  115. package/build/system/locale/nl_NL.mjs +0 -1
  116. package/build/system/locale/pl_PL.d.mts +1 -1
  117. package/build/system/locale/pl_PL.mjs +0 -1
  118. package/build/system/locale/pt_BR.d.mts +1 -1
  119. package/build/system/locale/pt_BR.mjs +0 -1
  120. package/build/system/locale/pt_PT.d.mts +1 -1
  121. package/build/system/locale/pt_PT.mjs +0 -1
  122. package/build/system/locale/ro_RO.d.mts +1 -1
  123. package/build/system/locale/ro_RO.mjs +0 -1
  124. package/build/system/locale/ru_RU.d.mts +1 -1
  125. package/build/system/locale/ru_RU.mjs +0 -1
  126. package/build/system/locale/sv_SE.d.mts +1 -1
  127. package/build/system/locale/sv_SE.mjs +0 -1
  128. package/build/system/locale/sw_TZ.d.mts +1 -1
  129. package/build/system/locale/sw_TZ.mjs +0 -1
  130. package/build/system/locale/th_TH.d.mts +1 -1
  131. package/build/system/locale/th_TH.mjs +0 -1
  132. package/build/system/locale/tr_TR.d.mts +1 -1
  133. package/build/system/locale/tr_TR.mjs +0 -1
  134. package/build/system/locale/uk_UA.d.mts +1 -1
  135. package/build/system/locale/uk_UA.mjs +0 -1
  136. package/build/system/locale/ur_PK.d.mts +1 -1
  137. package/build/system/locale/ur_PK.mjs +0 -1
  138. package/build/system/locale/vi_VN.d.mts +1 -1
  139. package/build/system/locale/vi_VN.mjs +0 -1
  140. package/build/system/locale/yo_NG.d.mts +1 -1
  141. package/build/system/locale/yo_NG.mjs +0 -1
  142. package/build/system/locale/zh_Hans.d.mts +1 -1
  143. package/build/system/locale/zh_Hans.mjs +0 -1
  144. package/build/system/locale/zh_Hant.d.mts +1 -1
  145. package/build/system/locale/zh_Hant.mjs +0 -1
  146. package/build/system/memory/clone.d.mts +2 -3
  147. package/build/system/memory/clone.mjs +73 -26
  148. package/build/system/settings/settings.d.mts +15 -0
  149. package/build/system/settings/settings.mjs +3 -1
  150. package/build/type/action/_add_immutable.d.mts +11 -0
  151. package/build/type/action/_add_immutable.mjs +11 -0
  152. package/build/type/action/_add_optional.d.mts +11 -0
  153. package/build/type/action/_add_optional.mjs +11 -0
  154. package/build/type/action/_add_readonly.d.mts +11 -0
  155. package/build/type/action/_add_readonly.mjs +11 -0
  156. package/build/type/action/_remove_immutable.d.mts +11 -0
  157. package/build/type/action/_remove_immutable.mjs +11 -0
  158. package/build/type/action/_remove_optional.d.mts +11 -0
  159. package/build/type/action/_remove_optional.mjs +11 -0
  160. package/build/type/action/_remove_readonly.d.mts +11 -0
  161. package/build/type/action/_remove_readonly.mjs +11 -0
  162. package/build/type/action/capitalize.d.mts +2 -2
  163. package/build/type/action/capitalize.mjs +2 -3
  164. package/build/type/action/conditional.d.mts +3 -2
  165. package/build/type/action/conditional.mjs +3 -2
  166. package/build/type/action/{constructor-parameters.d.mts → constructor_parameters.d.mts} +2 -2
  167. package/build/type/action/{constructor-parameters.mjs → constructor_parameters.mjs} +2 -3
  168. package/build/type/action/evaluate.d.mts +2 -2
  169. package/build/type/action/evaluate.mjs +2 -3
  170. package/build/type/action/exclude.d.mts +2 -2
  171. package/build/type/action/exclude.mjs +2 -3
  172. package/build/type/action/extract.d.mts +2 -2
  173. package/build/type/action/extract.mjs +2 -3
  174. package/build/type/action/index.d.mts +12 -9
  175. package/build/type/action/index.mjs +12 -9
  176. package/build/type/action/indexed.d.mts +3 -3
  177. package/build/type/action/indexed.mjs +3 -4
  178. package/build/type/action/{instance-type.d.mts → instance_type.d.mts} +2 -2
  179. package/build/type/action/{instance-type.mjs → instance_type.mjs} +2 -3
  180. package/build/type/action/interface.d.mts +2 -2
  181. package/build/type/action/interface.mjs +5 -3
  182. package/build/type/action/keyof.d.mts +2 -2
  183. package/build/type/action/keyof.mjs +2 -3
  184. package/build/type/action/lowercase.d.mts +2 -2
  185. package/build/type/action/lowercase.mjs +2 -3
  186. package/build/type/action/mapped.d.mts +3 -2
  187. package/build/type/action/mapped.mjs +3 -2
  188. package/build/type/action/module.d.mts +8 -7
  189. package/build/type/action/module.mjs +7 -6
  190. package/build/type/action/{non-nullable.d.mts → non_nullable.d.mts} +2 -2
  191. package/build/type/action/{non-nullable.mjs → non_nullable.mjs} +2 -3
  192. package/build/type/action/omit.d.mts +3 -3
  193. package/build/type/action/omit.mjs +3 -4
  194. package/build/type/action/parameters.d.mts +2 -2
  195. package/build/type/action/parameters.mjs +2 -3
  196. package/build/type/action/partial.d.mts +3 -3
  197. package/build/type/action/partial.mjs +2 -3
  198. package/build/type/action/pick.d.mts +3 -3
  199. package/build/type/action/pick.mjs +3 -4
  200. package/build/type/action/readonly_object.d.mts +16 -0
  201. package/build/type/action/readonly_object.mjs +19 -0
  202. package/build/type/action/required.d.mts +2 -2
  203. package/build/type/action/required.mjs +2 -3
  204. package/build/type/action/{return-type.d.mts → return_type.d.mts} +2 -2
  205. package/build/type/action/{return-type.mjs → return_type.mjs} +2 -3
  206. package/build/type/action/uncapitalize.d.mts +2 -2
  207. package/build/type/action/uncapitalize.mjs +2 -3
  208. package/build/type/action/uppercase.d.mts +2 -2
  209. package/build/type/action/uppercase.mjs +2 -3
  210. package/build/type/action/with.d.mts +11 -0
  211. package/build/type/action/with.mjs +11 -0
  212. package/build/type/engine/call/{distribute-arguments.mjs → distribute_arguments.mjs} +1 -7
  213. package/build/type/engine/call/instantiate.d.mts +4 -6
  214. package/build/type/engine/call/instantiate.mjs +6 -5
  215. package/build/type/engine/call/{resolve-arguments.mjs → resolve_arguments.mjs} +3 -9
  216. package/build/type/engine/conditional/instantiate.d.mts +4 -2
  217. package/build/type/engine/conditional/instantiate.mjs +13 -9
  218. package/build/type/engine/constructor_parameters/instantiate.d.mts +14 -0
  219. package/build/type/engine/constructor_parameters/instantiate.mjs +25 -0
  220. package/build/type/engine/cyclic/candidates.d.mts +3 -4
  221. package/build/type/engine/cyclic/candidates.mjs +3 -6
  222. package/build/type/engine/cyclic/check.d.mts +6 -9
  223. package/build/type/engine/cyclic/check.mjs +13 -22
  224. package/build/type/engine/cyclic/dependencies.d.mts +1 -4
  225. package/build/type/engine/cyclic/dependencies.mjs +9 -15
  226. package/build/type/engine/cyclic/extends.d.mts +1 -4
  227. package/build/type/engine/cyclic/extends.mjs +8 -14
  228. package/build/type/engine/cyclic/instantiate.d.mts +2 -5
  229. package/build/type/engine/cyclic/instantiate.mjs +3 -2
  230. package/build/type/engine/enum/index.d.mts +1 -2
  231. package/build/type/engine/enum/index.mjs +1 -2
  232. package/build/type/engine/evaluate/broaden.d.mts +1 -2
  233. package/build/type/engine/evaluate/broaden.mjs +2 -6
  234. package/build/type/engine/evaluate/composite.d.mts +11 -7
  235. package/build/type/engine/evaluate/composite.mjs +11 -7
  236. package/build/type/engine/evaluate/distribute.d.mts +2 -1
  237. package/build/type/engine/evaluate/distribute.mjs +7 -17
  238. package/build/type/engine/evaluate/evaluate.d.mts +17 -5
  239. package/build/type/engine/evaluate/evaluate.mjs +34 -8
  240. package/build/type/engine/evaluate/flatten.d.mts +1 -1
  241. package/build/type/engine/evaluate/instantiate.d.mts +3 -3
  242. package/build/type/engine/evaluate/instantiate.mjs +5 -10
  243. package/build/type/engine/evaluate/narrow.d.mts +3 -3
  244. package/build/type/engine/exclude/instantiate.d.mts +4 -11
  245. package/build/type/engine/exclude/instantiate.mjs +7 -28
  246. package/build/type/engine/exclude/operation.d.mts +10 -0
  247. package/build/type/engine/exclude/operation.mjs +23 -0
  248. package/build/type/engine/extract/instantiate.d.mts +4 -11
  249. package/build/type/engine/extract/instantiate.mjs +7 -28
  250. package/build/type/engine/extract/operation.d.mts +10 -0
  251. package/build/type/engine/extract/operation.mjs +23 -0
  252. package/build/type/engine/helpers/index.d.mts +1 -1
  253. package/build/type/engine/helpers/index.mjs +1 -1
  254. package/build/type/engine/immutable/instantiate_add.d.mts +10 -0
  255. package/build/type/engine/immutable/instantiate_add.mjs +14 -0
  256. package/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
  257. package/build/type/engine/immutable/instantiate_remove.mjs +14 -0
  258. package/build/type/engine/index.d.mts +8 -8
  259. package/build/type/engine/index.mjs +8 -8
  260. package/build/type/engine/indexable/{from-cyclic.d.mts → from_cyclic.d.mts} +1 -1
  261. package/build/type/engine/{object/from-cyclic.mjs → indexable/from_cyclic.mjs} +1 -1
  262. package/build/type/engine/indexable/from_dependent.d.mts +5 -0
  263. package/build/type/engine/indexable/from_dependent.mjs +8 -0
  264. package/build/type/engine/indexable/from_enum.d.mts +6 -0
  265. package/build/type/engine/indexable/from_enum.mjs +8 -0
  266. package/build/type/engine/indexable/{from-intersect.d.mts → from_intersect.d.mts} +1 -1
  267. package/build/type/engine/indexable/{from-intersect.mjs → from_intersect.mjs} +1 -1
  268. package/build/type/engine/indexable/{from-literal.d.mts → from_literal.d.mts} +1 -1
  269. package/build/type/engine/indexable/from_template_literal.d.mts +5 -0
  270. package/build/type/engine/indexable/from_template_literal.mjs +8 -0
  271. package/build/type/engine/indexable/from_type.d.mts +19 -0
  272. package/build/type/engine/indexable/from_type.mjs +25 -0
  273. package/build/type/engine/indexable/{from-union.d.mts → from_union.d.mts} +1 -1
  274. package/build/type/engine/indexable/{from-union.mjs → from_union.mjs} +1 -1
  275. package/build/type/engine/indexable/{to-indexable-keys.d.mts → to_indexable_keys.d.mts} +1 -1
  276. package/build/type/engine/indexable/{to-indexable-keys.mjs → to_indexable_keys.mjs} +1 -1
  277. package/build/type/engine/indexed/from_object.d.mts +16 -0
  278. package/build/type/engine/indexed/from_object.mjs +40 -0
  279. package/build/type/engine/indexed/{from-tuple.d.mts → from_tuple.d.mts} +1 -1
  280. package/build/type/engine/indexed/{from-tuple.mjs → from_tuple.mjs} +1 -1
  281. package/build/type/engine/indexed/from_type.d.mts +11 -0
  282. package/build/type/engine/indexed/from_type.mjs +14 -0
  283. package/build/type/engine/indexed/instantiate.d.mts +7 -12
  284. package/build/type/engine/indexed/instantiate.mjs +13 -22
  285. package/build/type/engine/instance_type/instantiate.d.mts +12 -0
  286. package/build/type/engine/{instance-type → instance_type}/instantiate.mjs +10 -9
  287. package/build/type/engine/instantiate.d.mts +53 -42
  288. package/build/type/engine/instantiate.mjs +92 -106
  289. package/build/type/engine/interface/instantiate.d.mts +6 -7
  290. package/build/type/engine/interface/instantiate.mjs +12 -8
  291. package/build/type/engine/intrinsics/{from-template-literal.d.mts → from_template_literal.d.mts} +3 -3
  292. package/build/type/engine/intrinsics/from_template_literal.mjs +8 -0
  293. package/build/type/engine/intrinsics/{from-type.d.mts → from_type.d.mts} +4 -4
  294. package/build/type/engine/intrinsics/{from-type.mjs → from_type.mjs} +4 -4
  295. package/build/type/engine/intrinsics/{from-union.d.mts → from_union.d.mts} +1 -1
  296. package/build/type/engine/intrinsics/{from-union.mjs → from_union.mjs} +1 -1
  297. package/build/type/engine/intrinsics/instantiate.d.mts +13 -9
  298. package/build/type/engine/intrinsics/instantiate.mjs +29 -25
  299. package/build/type/engine/keyof/from_type.d.mts +15 -0
  300. package/build/type/engine/keyof/from_type.mjs +23 -0
  301. package/build/type/engine/keyof/instantiate.d.mts +6 -17
  302. package/build/type/engine/keyof/instantiate.mjs +12 -28
  303. package/build/type/engine/mapped/instantiate.d.mts +4 -19
  304. package/build/type/engine/mapped/instantiate.mjs +7 -42
  305. package/build/type/engine/mapped/mapped_operation.d.mts +22 -0
  306. package/build/type/engine/mapped/mapped_operation.mjs +42 -0
  307. package/build/type/engine/mapped/mapped_variants.d.mts +17 -0
  308. package/build/type/engine/mapped/mapped_variants.mjs +39 -0
  309. package/build/type/engine/module/instantiate.d.mts +7 -9
  310. package/build/type/engine/module/instantiate.mjs +17 -15
  311. package/build/type/engine/non_nullable/instantiate.d.mts +14 -0
  312. package/build/type/engine/non_nullable/instantiate.mjs +22 -0
  313. package/build/type/engine/object/collapse.d.mts +1 -1
  314. package/build/type/engine/object/collapse.mjs +1 -1
  315. package/build/type/engine/object/{from-cyclic.d.mts → from_cyclic.d.mts} +1 -1
  316. package/build/type/engine/{indexable/from-cyclic.mjs → object/from_cyclic.mjs} +1 -1
  317. package/build/type/engine/object/from_dependent.d.mts +5 -0
  318. package/build/type/engine/object/from_dependent.mjs +8 -0
  319. package/build/type/engine/object/{from-intersect.d.mts → from_intersect.d.mts} +1 -1
  320. package/build/type/engine/object/{from-intersect.mjs → from_intersect.mjs} +1 -1
  321. package/build/type/engine/object/{from-tuple.d.mts → from_tuple.d.mts} +2 -2
  322. package/build/type/engine/object/{from-tuple.mjs → from_tuple.mjs} +2 -2
  323. package/build/type/engine/object/from_type.d.mts +16 -0
  324. package/build/type/engine/object/from_type.mjs +23 -0
  325. package/build/type/engine/object/{from-union.d.mts → from_union.d.mts} +1 -1
  326. package/build/type/engine/object/{from-union.mjs → from_union.mjs} +4 -11
  327. package/build/type/engine/omit/from_type.d.mts +12 -0
  328. package/build/type/engine/omit/from_type.mjs +18 -0
  329. package/build/type/engine/omit/instantiate.d.mts +4 -11
  330. package/build/type/engine/omit/instantiate.mjs +7 -22
  331. package/build/type/engine/optional/instantiate_add.d.mts +10 -0
  332. package/build/type/engine/optional/instantiate_add.mjs +14 -0
  333. package/build/type/engine/optional/instantiate_remove.d.mts +10 -0
  334. package/build/type/engine/optional/instantiate_remove.mjs +14 -0
  335. package/build/type/engine/parameters/instantiate.d.mts +7 -7
  336. package/build/type/engine/parameters/instantiate.mjs +14 -11
  337. package/build/type/engine/{readonly-type/from-cyclic.d.mts → partial/from_cyclic.d.mts} +1 -1
  338. package/build/type/engine/partial/{from-cyclic.mjs → from_cyclic.mjs} +1 -1
  339. package/build/type/engine/partial/from_dependent.d.mts +5 -0
  340. package/build/type/engine/partial/from_dependent.mjs +8 -0
  341. package/build/type/engine/partial/from_intersect.d.mts +5 -0
  342. package/build/type/engine/partial/from_intersect.mjs +8 -0
  343. package/build/type/engine/{readonly-type/from-object.d.mts → partial/from_object.d.mts} +2 -2
  344. package/build/type/engine/partial/{from-object.mjs → from_object.mjs} +2 -2
  345. package/build/type/engine/partial/from_type.d.mts +14 -0
  346. package/build/type/engine/partial/from_type.mjs +20 -0
  347. package/build/type/engine/{readonly-type/from-union.d.mts → partial/from_union.d.mts} +1 -1
  348. package/build/type/engine/{readonly-type/from-union.mjs → partial/from_union.mjs} +1 -1
  349. package/build/type/engine/partial/instantiate.d.mts +4 -4
  350. package/build/type/engine/partial/instantiate.mjs +8 -7
  351. package/build/type/engine/pick/from_type.d.mts +13 -0
  352. package/build/type/engine/pick/from_type.mjs +20 -0
  353. package/build/type/engine/pick/instantiate.d.mts +4 -12
  354. package/build/type/engine/pick/instantiate.mjs +7 -23
  355. package/build/type/engine/priority/index.d.mts +1 -0
  356. package/build/type/engine/priority/index.mjs +1 -0
  357. package/build/type/engine/priority/priority.d.mts +20 -0
  358. package/build/type/engine/priority/priority.mjs +28 -0
  359. package/build/type/engine/readonly/instantiate_add.d.mts +10 -0
  360. package/build/type/engine/readonly/instantiate_add.mjs +14 -0
  361. package/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
  362. package/build/type/engine/readonly/instantiate_remove.mjs +14 -0
  363. package/build/type/engine/{readonly-type/from-array.d.mts → readonly_object/from_array.d.mts} +2 -2
  364. package/build/type/engine/{readonly-type/from-array.mjs → readonly_object/from_array.mjs} +2 -2
  365. package/build/type/engine/{partial/from-cyclic.d.mts → readonly_object/from_cyclic.d.mts} +1 -1
  366. package/build/type/engine/{required/from-cyclic.mjs → readonly_object/from_cyclic.mjs} +1 -1
  367. package/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
  368. package/build/type/engine/readonly_object/from_dependent.mjs +8 -0
  369. package/build/type/engine/readonly_object/from_intersect.d.mts +5 -0
  370. package/build/type/engine/readonly_object/from_intersect.mjs +8 -0
  371. package/build/type/engine/{partial/from-object.d.mts → readonly_object/from_object.d.mts} +2 -2
  372. package/build/type/engine/{readonly-type/from-object.mjs → readonly_object/from_object.mjs} +2 -2
  373. package/build/type/engine/{readonly-type/from-tuple.d.mts → readonly_object/from_tuple.d.mts} +2 -2
  374. package/build/type/engine/{readonly-type/from-tuple.mjs → readonly_object/from_tuple.mjs} +2 -2
  375. package/build/type/engine/readonly_object/from_type.d.mts +18 -0
  376. package/build/type/engine/readonly_object/from_type.mjs +25 -0
  377. package/build/type/engine/{partial/from-union.d.mts → readonly_object/from_union.d.mts} +1 -1
  378. package/build/type/engine/{partial/from-union.mjs → readonly_object/from_union.mjs} +1 -1
  379. package/build/type/engine/readonly_object/instantiate.d.mts +9 -0
  380. package/build/type/engine/readonly_object/instantiate.mjs +15 -0
  381. package/build/type/engine/record/{from-key.d.mts → from_key.d.mts} +11 -11
  382. package/build/type/engine/record/{from-key.mjs → from_key.mjs} +11 -11
  383. package/build/type/engine/record/{from-key-any.mjs → from_key_any.mjs} +1 -1
  384. package/build/type/engine/record/{from-key-enum.d.mts → from_key_enum.d.mts} +3 -3
  385. package/build/type/engine/record/from_key_enum.mjs +8 -0
  386. package/build/type/engine/record/{from-key-integer.mjs → from_key_integer.mjs} +1 -1
  387. package/build/type/engine/record/{from-key-intersect.d.mts → from_key_intersect.d.mts} +1 -1
  388. package/build/type/engine/record/{from-key-intersect.mjs → from_key_intersect.mjs} +1 -1
  389. package/build/type/engine/record/{from-key-number.mjs → from_key_number.mjs} +1 -1
  390. package/build/type/engine/record/{from-key-string.mjs → from_key_string.mjs} +1 -1
  391. package/build/type/engine/record/{from-key-template-literal.d.mts → from_key_template_literal.d.mts} +4 -4
  392. package/build/type/engine/record/from_key_template_literal.mjs +12 -0
  393. package/build/type/engine/record/{from-key-union.mjs → from_key_union.mjs} +1 -1
  394. package/build/type/engine/record/instantiate.d.mts +4 -4
  395. package/build/type/engine/record/instantiate.mjs +9 -8
  396. package/build/type/engine/ref/instantiate.d.mts +4 -4
  397. package/build/type/engine/ref/instantiate.mjs +6 -6
  398. package/build/type/engine/required/{from-cyclic.d.mts → from_cyclic.d.mts} +1 -1
  399. package/build/type/engine/{readonly-type/from-cyclic.mjs → required/from_cyclic.mjs} +1 -1
  400. package/build/type/engine/required/from_dependent.d.mts +5 -0
  401. package/build/type/engine/required/from_dependent.mjs +8 -0
  402. package/build/type/engine/required/from_intersect.d.mts +5 -0
  403. package/build/type/engine/required/from_intersect.mjs +8 -0
  404. package/build/type/engine/required/{from-object.d.mts → from_object.d.mts} +2 -2
  405. package/build/type/engine/required/{from-object.mjs → from_object.mjs} +2 -2
  406. package/build/type/engine/required/from_type.d.mts +14 -0
  407. package/build/type/engine/required/from_type.mjs +20 -0
  408. package/build/type/engine/required/{from-union.d.mts → from_union.d.mts} +1 -1
  409. package/build/type/engine/required/{from-union.mjs → from_union.mjs} +1 -1
  410. package/build/type/engine/required/instantiate.d.mts +4 -4
  411. package/build/type/engine/required/instantiate.mjs +8 -7
  412. package/build/type/engine/return_type/instantiate.d.mts +12 -0
  413. package/build/type/engine/return_type/instantiate.mjs +21 -0
  414. package/build/type/engine/{template-literal → template_literal}/decode.d.mts +4 -4
  415. package/build/type/engine/{template-literal → template_literal}/decode.mjs +6 -12
  416. package/build/type/engine/{template-literal → template_literal}/encode.d.mts +6 -4
  417. package/build/type/engine/{template-literal → template_literal}/encode.mjs +17 -16
  418. package/build/type/engine/{template-literal → template_literal}/index.d.mts +2 -2
  419. package/build/type/engine/{template-literal → template_literal}/index.mjs +2 -2
  420. package/build/type/engine/{template-literal → template_literal}/instantiate.d.mts +4 -4
  421. package/build/type/engine/template_literal/instantiate.mjs +15 -0
  422. package/build/type/engine/{template-literal/is-finite.mjs → template_literal/is_finite.mjs} +3 -7
  423. package/build/type/engine/{template-literal/is-pattern.mjs → template_literal/is_pattern.mjs} +1 -0
  424. package/build/type/engine/this/expand_this.d.mts +16 -0
  425. package/build/type/engine/this/expand_this.mjs +26 -0
  426. package/build/type/engine/with/instantiate.d.mts +8 -0
  427. package/build/type/engine/with/instantiate.mjs +14 -0
  428. package/build/type/extends/any.d.mts +1 -1
  429. package/build/type/extends/any.mjs +1 -1
  430. package/build/type/extends/array.d.mts +2 -2
  431. package/build/type/extends/array.mjs +2 -2
  432. package/build/type/extends/bigint.d.mts +1 -1
  433. package/build/type/extends/bigint.mjs +1 -1
  434. package/build/type/extends/boolean.d.mts +1 -1
  435. package/build/type/extends/boolean.mjs +1 -1
  436. package/build/type/extends/constructor.d.mts +1 -1
  437. package/build/type/extends/constructor.mjs +1 -1
  438. package/build/type/extends/dependent.d.mts +6 -0
  439. package/build/type/extends/dependent.mjs +6 -0
  440. package/build/type/extends/enum.d.mts +5 -5
  441. package/build/type/extends/enum.mjs +4 -3
  442. package/build/type/extends/extends.d.mts +5 -3
  443. package/build/type/extends/extends.mjs +10 -8
  444. package/build/type/extends/{extends-left.d.mts → extends_left.d.mts} +7 -9
  445. package/build/type/extends/{extends-left.mjs → extends_left.mjs} +26 -29
  446. package/build/type/extends/{extends-right.d.mts → extends_right.d.mts} +9 -7
  447. package/build/type/extends/extends_right.mjs +49 -0
  448. package/build/type/extends/function.d.mts +1 -1
  449. package/build/type/extends/function.mjs +1 -1
  450. package/build/type/extends/inference.d.mts +1 -1
  451. package/build/type/extends/inference.mjs +2 -2
  452. package/build/type/extends/integer.d.mts +1 -1
  453. package/build/type/extends/integer.mjs +1 -1
  454. package/build/type/extends/intersect.d.mts +1 -1
  455. package/build/type/extends/intersect.mjs +1 -1
  456. package/build/type/extends/literal.d.mts +2 -2
  457. package/build/type/extends/literal.mjs +2 -2
  458. package/build/type/extends/never.d.mts +1 -1
  459. package/build/type/extends/never.mjs +1 -1
  460. package/build/type/extends/null.d.mts +1 -1
  461. package/build/type/extends/null.mjs +1 -1
  462. package/build/type/extends/number.d.mts +1 -1
  463. package/build/type/extends/number.mjs +1 -1
  464. package/build/type/extends/object.d.mts +10 -3
  465. package/build/type/extends/object.mjs +27 -5
  466. package/build/type/extends/parameters.d.mts +1 -1
  467. package/build/type/extends/parameters.mjs +4 -3
  468. package/build/type/extends/record.d.mts +13 -0
  469. package/build/type/extends/record.mjs +23 -0
  470. package/build/type/extends/result.d.mts +1 -4
  471. package/build/type/extends/result.mjs +0 -3
  472. package/build/type/extends/{return-type.d.mts → return_type.d.mts} +1 -1
  473. package/build/type/extends/{return-type.mjs → return_type.mjs} +1 -1
  474. package/build/type/extends/string.d.mts +1 -1
  475. package/build/type/extends/string.mjs +1 -1
  476. package/build/type/extends/symbol.d.mts +1 -1
  477. package/build/type/extends/symbol.mjs +1 -1
  478. package/build/type/extends/template_literal.d.mts +6 -0
  479. package/build/type/extends/template_literal.mjs +7 -0
  480. package/build/type/extends/tuple.d.mts +5 -8
  481. package/build/type/extends/tuple.mjs +8 -7
  482. package/build/type/extends/undefined.d.mts +1 -1
  483. package/build/type/extends/undefined.mjs +1 -1
  484. package/build/type/extends/union.d.mts +1 -1
  485. package/build/type/extends/union.mjs +4 -3
  486. package/build/type/extends/unknown.d.mts +1 -1
  487. package/build/type/extends/unknown.mjs +1 -1
  488. package/build/type/extends/void.d.mts +1 -1
  489. package/build/type/extends/void.mjs +1 -1
  490. package/build/type/script/mapping.d.mts +86 -98
  491. package/build/type/script/mapping.mjs +95 -92
  492. package/build/type/script/parser.d.mts +42 -40
  493. package/build/type/script/parser.mjs +23 -22
  494. package/build/type/script/script.d.mts +3 -4
  495. package/build/type/script/script.mjs +3 -2
  496. package/build/type/script/token/internal/guard.d.mts +1 -1
  497. package/build/type/script/token/internal/guard.mjs +1 -1
  498. package/build/type/script/token/internal/take.mjs +5 -9
  499. package/build/type/script/token/until.mjs +4 -7
  500. package/build/type/types/_codec.d.mts +12 -12
  501. package/build/type/types/_codec.mjs +0 -1
  502. package/build/type/types/_immutable.d.mts +2 -9
  503. package/build/type/types/_immutable.mjs +2 -10
  504. package/build/type/types/_optional.d.mts +2 -9
  505. package/build/type/types/_optional.mjs +2 -11
  506. package/build/type/types/_readonly.d.mts +2 -9
  507. package/build/type/types/_readonly.mjs +2 -10
  508. package/build/type/types/_refine.d.mts +13 -8
  509. package/build/type/types/_refine.mjs +20 -4
  510. package/build/type/types/array.d.mts +2 -1
  511. package/build/type/types/array.mjs +2 -1
  512. package/build/type/types/call.d.mts +3 -3
  513. package/build/type/types/call.mjs +3 -2
  514. package/build/type/types/deferred.d.mts +1 -0
  515. package/build/type/types/deferred.mjs +1 -1
  516. package/build/type/types/dependent.d.mts +17 -0
  517. package/build/type/types/{iterator.mjs → dependent.mjs} +9 -9
  518. package/build/type/types/enum.d.mts +5 -3
  519. package/build/type/types/enum.mjs +7 -2
  520. package/build/type/types/function.mjs +1 -1
  521. package/build/type/types/index.d.mts +2 -5
  522. package/build/type/types/index.mjs +2 -5
  523. package/build/type/types/number.d.mts +1 -1
  524. package/build/type/types/number.mjs +1 -1
  525. package/build/type/types/object.mjs +1 -1
  526. package/build/type/types/properties.d.mts +2 -1
  527. package/build/type/types/record.d.mts +19 -15
  528. package/build/type/types/record.mjs +19 -17
  529. package/build/type/types/static.d.mts +3 -6
  530. package/build/type/types/{template-literal.d.mts → template_literal.d.mts} +6 -4
  531. package/build/type/types/{template-literal.mjs → template_literal.mjs} +10 -4
  532. package/build/type/types/unsafe.d.mts +1 -2
  533. package/build/type/types/unsafe.mjs +5 -3
  534. package/build/typebox.d.mts +11 -15
  535. package/build/typebox.mjs +10 -14
  536. package/build/value/clean/clean.mjs +5 -3
  537. package/build/value/clean/{from-array.mjs → from_array.mjs} +1 -1
  538. package/build/value/clean/{from-cyclic.mjs → from_cyclic.mjs} +1 -1
  539. package/build/value/clean/{from-intersect.mjs → from_intersect.mjs} +3 -3
  540. package/build/value/clean/{from-object.mjs → from_object.mjs} +1 -1
  541. package/build/value/clean/{from-record.mjs → from_record.mjs} +1 -1
  542. package/build/value/clean/{from-ref.mjs → from_ref.mjs} +1 -1
  543. package/build/value/clean/{from-tuple.mjs → from_tuple.mjs} +1 -1
  544. package/build/value/clean/from_type.mjs +21 -0
  545. package/build/value/clean/{from-union.mjs → from_union.mjs} +2 -3
  546. package/build/value/clone/clone.mjs +2 -72
  547. package/build/value/codec/decode.mjs +5 -3
  548. package/build/value/codec/encode.mjs +5 -3
  549. package/build/value/codec/{from-array.mjs → from_array.mjs} +2 -5
  550. package/build/value/codec/{from-cyclic.mjs → from_cyclic.mjs} +1 -1
  551. package/build/value/codec/{from-intersect.mjs → from_intersect.mjs} +1 -1
  552. package/build/value/codec/{from-object.mjs → from_object.mjs} +3 -6
  553. package/build/value/codec/{from-record.mjs → from_record.mjs} +3 -8
  554. package/build/value/codec/{from-ref.mjs → from_ref.mjs} +1 -1
  555. package/build/value/codec/{from-tuple.mjs → from_tuple.mjs} +2 -5
  556. package/build/value/codec/{from-type.mjs → from_type.mjs} +8 -8
  557. package/build/value/codec/{from-union.mjs → from_union.mjs} +3 -4
  558. package/build/value/convert/convert.mjs +1 -1
  559. package/build/value/convert/{from-additional.mjs → from_additional.mjs} +1 -1
  560. package/build/value/convert/{from-array.mjs → from_array.mjs} +1 -1
  561. package/build/value/convert/{from-cyclic.mjs → from_cyclic.mjs} +1 -1
  562. package/build/value/convert/from_enum.mjs +6 -0
  563. package/build/value/convert/{from-intersect.mjs → from_intersect.mjs} +1 -1
  564. package/build/value/convert/{from-literal.d.mts → from_literal.d.mts} +1 -1
  565. package/build/value/convert/{from-object.mjs → from_object.mjs} +3 -3
  566. package/build/value/convert/{from-record.mjs → from_record.mjs} +2 -2
  567. package/build/value/convert/{from-ref.mjs → from_ref.mjs} +1 -1
  568. package/build/value/convert/{from-template-literal.d.mts → from_template_literal.d.mts} +1 -1
  569. package/build/value/convert/from_template_literal.mjs +6 -0
  570. package/build/value/convert/{from-tuple.mjs → from_tuple.mjs} +1 -1
  571. package/build/value/convert/from_type.mjs +43 -0
  572. package/build/value/convert/{from-union.mjs → from_union.mjs} +1 -1
  573. package/build/value/convert/try/try.d.mts +8 -8
  574. package/build/value/convert/try/try.mjs +8 -8
  575. package/build/value/convert/try/{try-array.d.mts → try_array.d.mts} +1 -1
  576. package/build/value/convert/try/{try-array.mjs → try_array.mjs} +1 -1
  577. package/build/value/convert/try/{try-bigint.d.mts → try_bigint.d.mts} +1 -1
  578. package/build/value/convert/try/{try-bigint.mjs → try_bigint.mjs} +1 -1
  579. package/build/value/convert/try/{try-boolean.d.mts → try_boolean.d.mts} +1 -1
  580. package/build/value/convert/try/{try-boolean.mjs → try_boolean.mjs} +1 -1
  581. package/build/value/convert/try/{try-null.d.mts → try_null.d.mts} +1 -1
  582. package/build/value/convert/try/{try-null.mjs → try_null.mjs} +1 -1
  583. package/build/value/convert/try/{try-number.d.mts → try_number.d.mts} +1 -1
  584. package/build/value/convert/try/{try-number.mjs → try_number.mjs} +2 -2
  585. package/build/value/convert/try/{try-string.d.mts → try_string.d.mts} +1 -1
  586. package/build/value/convert/try/{try-string.mjs → try_string.mjs} +1 -1
  587. package/build/value/convert/try/{try-undefined.d.mts → try_undefined.d.mts} +1 -1
  588. package/build/value/convert/try/{try-undefined.mjs → try_undefined.mjs} +1 -1
  589. package/build/value/create/create.mjs +1 -1
  590. package/build/value/create/{from-array.mjs → from_array.mjs} +1 -1
  591. package/build/value/create/{from-constructor.mjs → from_constructor.mjs} +1 -1
  592. package/build/value/create/{from-cyclic.mjs → from_cyclic.mjs} +1 -1
  593. package/build/value/create/from_enum.mjs +6 -0
  594. package/build/value/create/{from-function.mjs → from_function.mjs} +1 -1
  595. package/build/value/create/{from-intersect.mjs → from_intersect.mjs} +1 -1
  596. package/build/value/create/{from-object.mjs → from_object.mjs} +1 -1
  597. package/build/value/create/{from-ref.mjs → from_ref.mjs} +1 -1
  598. package/build/value/create/{from-template-literal.mjs → from_template_literal.mjs} +2 -2
  599. package/build/value/create/{from-tuple.mjs → from_tuple.mjs} +1 -1
  600. package/build/value/create/from_type.mjs +61 -0
  601. package/build/value/create/{from-union.mjs → from_union.mjs} +1 -1
  602. package/build/value/default/default.mjs +1 -1
  603. package/build/value/default/{from-array.mjs → from_array.mjs} +1 -1
  604. package/build/value/{clean/from-cyclic.d.mts → default/from_cyclic.d.mts} +1 -1
  605. package/build/value/default/{from-cyclic.mjs → from_cyclic.mjs} +1 -1
  606. package/build/value/default/{from-intersect.mjs → from_intersect.mjs} +1 -1
  607. package/build/value/default/{from-object.mjs → from_object.mjs} +2 -2
  608. package/build/value/default/{from-record.mjs → from_record.mjs} +1 -1
  609. package/build/value/default/{from-ref.mjs → from_ref.mjs} +1 -1
  610. package/build/value/default/{from-tuple.mjs → from_tuple.mjs} +1 -1
  611. package/build/value/default/from_type.mjs +25 -0
  612. package/build/value/default/{from-union.mjs → from_union.mjs} +1 -1
  613. package/build/value/delta/diff.mjs +6 -0
  614. package/build/value/errors/errors.d.mts +2 -2
  615. package/build/value/errors/errors.mjs +1 -1
  616. package/build/value/index.d.mts +0 -1
  617. package/build/value/index.mjs +0 -1
  618. package/build/value/repair/{from-array.mjs → from_array.mjs} +1 -1
  619. package/build/value/repair/from_enum.mjs +6 -0
  620. package/build/value/repair/from_intersect.d.mts +2 -0
  621. package/build/value/repair/{from-intersect.mjs → from_intersect.mjs} +1 -1
  622. package/build/value/repair/{from-object.mjs → from_object.mjs} +1 -1
  623. package/build/value/repair/{from-record.mjs → from_record.mjs} +1 -1
  624. package/build/value/repair/{from-ref.mjs → from_ref.mjs} +1 -1
  625. package/build/value/{convert/from-template-literal.mjs → repair/from_template_literal.mjs} +2 -2
  626. package/build/value/repair/{from-tuple.mjs → from_tuple.mjs} +1 -1
  627. package/build/value/repair/{from-type.mjs → from_type.mjs} +34 -32
  628. package/build/value/{clean/from-union.d.mts → repair/from_union.d.mts} +1 -1
  629. package/build/value/repair/{from-union.mjs → from_union.mjs} +2 -2
  630. package/build/value/repair/repair.mjs +1 -1
  631. package/build/value/shared/index.d.mts +3 -3
  632. package/build/value/shared/index.mjs +3 -3
  633. package/build/value/shared/union_priority_sort.d.mts +7 -0
  634. package/build/value/shared/union_priority_sort.mjs +72 -0
  635. package/build/value/value.d.mts +0 -1
  636. package/build/value/value.mjs +0 -1
  637. package/changes.json +1 -1
  638. package/package.json +27 -27
  639. package/readme.md +214 -95
  640. package/build/schema/engine/_guard.d.mts +0 -6
  641. package/build/schema/engine/_guard.mjs +0 -26
  642. package/build/schema/static/~non-readonly.d.mts +0 -7
  643. package/build/schema/static/~readonly.d.mts +0 -6
  644. package/build/schema/static/~readonly.mjs +0 -2
  645. package/build/schema/types/_guard.d.mts +0 -10
  646. package/build/schema/types/_guard.mjs +0 -16
  647. package/build/type/action/_optional.d.mts +0 -19
  648. package/build/type/action/_optional.mjs +0 -40
  649. package/build/type/action/_readonly.d.mts +0 -19
  650. package/build/type/action/_readonly.mjs +0 -40
  651. package/build/type/action/awaited.d.mts +0 -11
  652. package/build/type/action/awaited.mjs +0 -12
  653. package/build/type/action/options.d.mts +0 -12
  654. package/build/type/action/options.mjs +0 -12
  655. package/build/type/action/readonly-type.d.mts +0 -11
  656. package/build/type/action/readonly-type.mjs +0 -12
  657. package/build/type/engine/awaited/instantiate.d.mts +0 -10
  658. package/build/type/engine/awaited/instantiate.mjs +0 -19
  659. package/build/type/engine/constructor-parameters/instantiate.d.mts +0 -14
  660. package/build/type/engine/constructor-parameters/instantiate.mjs +0 -22
  661. package/build/type/engine/enum/enum-to-union.d.mts +0 -14
  662. package/build/type/engine/enum/enum-to-union.mjs +0 -24
  663. package/build/type/engine/indexable/from-enum.d.mts +0 -6
  664. package/build/type/engine/indexable/from-enum.mjs +0 -8
  665. package/build/type/engine/indexable/from-template-literal.d.mts +0 -5
  666. package/build/type/engine/indexable/from-template-literal.mjs +0 -8
  667. package/build/type/engine/indexable/from-type.d.mts +0 -17
  668. package/build/type/engine/indexable/from-type.mjs +0 -22
  669. package/build/type/engine/indexed/from-object.d.mts +0 -9
  670. package/build/type/engine/indexed/from-object.mjs +0 -18
  671. package/build/type/engine/instance-type/instantiate.d.mts +0 -12
  672. package/build/type/engine/intrinsics/from-template-literal.mjs +0 -8
  673. package/build/type/engine/mapped/mapped-variants.d.mts +0 -15
  674. package/build/type/engine/mapped/mapped-variants.mjs +0 -29
  675. package/build/type/engine/non-nullable/instantiate.d.mts +0 -15
  676. package/build/type/engine/non-nullable/instantiate.mjs +0 -22
  677. package/build/type/engine/object/from-type.d.mts +0 -14
  678. package/build/type/engine/object/from-type.mjs +0 -20
  679. package/build/type/engine/options/instantiate.d.mts +0 -8
  680. package/build/type/engine/options/instantiate.mjs +0 -13
  681. package/build/type/engine/partial/from-intersect.d.mts +0 -5
  682. package/build/type/engine/partial/from-intersect.mjs +0 -7
  683. package/build/type/engine/partial/from-type.d.mts +0 -12
  684. package/build/type/engine/partial/from-type.mjs +0 -17
  685. package/build/type/engine/readonly-type/from-intersect.d.mts +0 -5
  686. package/build/type/engine/readonly-type/from-intersect.mjs +0 -7
  687. package/build/type/engine/readonly-type/from-type.d.mts +0 -16
  688. package/build/type/engine/readonly-type/from-type.mjs +0 -22
  689. package/build/type/engine/readonly-type/instantiate.d.mts +0 -9
  690. package/build/type/engine/readonly-type/instantiate.mjs +0 -14
  691. package/build/type/engine/record/from-key-enum.mjs +0 -8
  692. package/build/type/engine/record/from-key-template-literal.mjs +0 -12
  693. package/build/type/engine/required/from-intersect.d.mts +0 -5
  694. package/build/type/engine/required/from-intersect.mjs +0 -7
  695. package/build/type/engine/required/from-type.d.mts +0 -12
  696. package/build/type/engine/required/from-type.mjs +0 -17
  697. package/build/type/engine/return-type/index.d.mts +0 -1
  698. package/build/type/engine/return-type/index.mjs +0 -1
  699. package/build/type/engine/return-type/instantiate.d.mts +0 -11
  700. package/build/type/engine/return-type/instantiate.mjs +0 -18
  701. package/build/type/engine/template-literal/instantiate.mjs +0 -14
  702. package/build/type/extends/async-iterator.d.mts +0 -7
  703. package/build/type/extends/async-iterator.mjs +0 -9
  704. package/build/type/extends/extends-right.mjs +0 -43
  705. package/build/type/extends/iterator.d.mts +0 -7
  706. package/build/type/extends/iterator.mjs +0 -9
  707. package/build/type/extends/promise.d.mts +0 -7
  708. package/build/type/extends/promise.mjs +0 -9
  709. package/build/type/extends/template-literal.d.mts +0 -6
  710. package/build/type/extends/template-literal.mjs +0 -7
  711. package/build/type/types/async-iterator.d.mts +0 -16
  712. package/build/type/types/async-iterator.mjs +0 -24
  713. package/build/type/types/base.d.mts +0 -50
  714. package/build/type/types/base.mjs +0 -84
  715. package/build/type/types/iterator.d.mts +0 -16
  716. package/build/type/types/promise.d.mts +0 -16
  717. package/build/type/types/promise.mjs +0 -24
  718. package/build/value/clean/from-base.d.mts +0 -2
  719. package/build/value/clean/from-base.mjs +0 -4
  720. package/build/value/clean/from-type.mjs +0 -23
  721. package/build/value/convert/from-base.d.mts +0 -2
  722. package/build/value/convert/from-base.mjs +0 -4
  723. package/build/value/convert/from-enum.mjs +0 -7
  724. package/build/value/convert/from-type.mjs +0 -45
  725. package/build/value/create/from-async-iterator.d.mts +0 -2
  726. package/build/value/create/from-async-iterator.mjs +0 -5
  727. package/build/value/create/from-base.d.mts +0 -2
  728. package/build/value/create/from-base.mjs +0 -4
  729. package/build/value/create/from-enum.mjs +0 -6
  730. package/build/value/create/from-iterator.d.mts +0 -2
  731. package/build/value/create/from-iterator.mjs +0 -5
  732. package/build/value/create/from-promise.d.mts +0 -2
  733. package/build/value/create/from-promise.mjs +0 -5
  734. package/build/value/create/from-type.mjs +0 -69
  735. package/build/value/default/from-base.d.mts +0 -2
  736. package/build/value/default/from-base.mjs +0 -5
  737. package/build/value/default/from-intersect.d.mts +0 -2
  738. package/build/value/default/from-type.mjs +0 -27
  739. package/build/value/mutate/error.d.mts +0 -3
  740. package/build/value/mutate/error.mjs +0 -6
  741. package/build/value/mutate/from-array.d.mts +0 -2
  742. package/build/value/mutate/from-array.mjs +0 -16
  743. package/build/value/mutate/from-object.d.mts +0 -2
  744. package/build/value/mutate/from-object.mjs +0 -27
  745. package/build/value/mutate/from-unknown.d.mts +0 -2
  746. package/build/value/mutate/from-unknown.mjs +0 -7
  747. package/build/value/mutate/from-value.d.mts +0 -2
  748. package/build/value/mutate/from-value.mjs +0 -12
  749. package/build/value/mutate/index.d.mts +0 -1
  750. package/build/value/mutate/index.mjs +0 -1
  751. package/build/value/mutate/mutate.d.mts +0 -9
  752. package/build/value/mutate/mutate.mjs +0 -39
  753. package/build/value/repair/from-base.d.mts +0 -2
  754. package/build/value/repair/from-base.mjs +0 -8
  755. package/build/value/repair/from-enum.mjs +0 -7
  756. package/build/value/repair/from-template-literal.mjs +0 -7
  757. package/build/value/shared/union-priority-sort.d.mts +0 -3
  758. package/build/value/shared/union-priority-sort.mjs +0 -36
  759. /package/build/format/{date-time.d.mts → date_time.d.mts} +0 -0
  760. /package/build/format/{date-time.mjs → date_time.mjs} +0 -0
  761. /package/build/format/{idn-email.d.mts → idn_email.d.mts} +0 -0
  762. /package/build/format/{idn-email.mjs → idn_email.mjs} +0 -0
  763. /package/build/format/{idn-hostname.d.mts → idn_hostname.d.mts} +0 -0
  764. /package/build/format/{idn-hostname.mjs → idn_hostname.mjs} +0 -0
  765. /package/build/format/{iri-reference.d.mts → iri_reference.d.mts} +0 -0
  766. /package/build/format/{iri-reference.mjs → iri_reference.mjs} +0 -0
  767. /package/build/format/{json-pointer.d.mts → json_pointer.d.mts} +0 -0
  768. /package/build/format/{json-pointer.mjs → json_pointer.mjs} +0 -0
  769. /package/build/format/{json-pointer-uri-fragment.d.mts → json_pointer_uri_fragment.d.mts} +0 -0
  770. /package/build/format/{json-pointer-uri-fragment.mjs → json_pointer_uri_fragment.mjs} +0 -0
  771. /package/build/format/{relative-json-pointer.d.mts → relative_json_pointer.d.mts} +0 -0
  772. /package/build/format/{relative-json-pointer.mjs → relative_json_pointer.mjs} +0 -0
  773. /package/build/format/{uri-reference.d.mts → uri_reference.d.mts} +0 -0
  774. /package/build/format/{uri-reference.mjs → uri_reference.mjs} +0 -0
  775. /package/build/format/{uri-template.d.mts → uri_template.d.mts} +0 -0
  776. /package/build/format/{uri-template.mjs → uri_template.mjs} +0 -0
  777. /package/build/schema/pointer/{pointer-get.d.mts → pointer_get.d.mts} +0 -0
  778. /package/build/schema/pointer/{pointer-get.mjs → pointer_get.mjs} +0 -0
  779. /package/build/schema/static/{~comparer.mjs → _canonical.mjs} +0 -0
  780. /package/build/schema/static/{~comparer.d.mts → _comparer.d.mts} +0 -0
  781. /package/build/schema/static/{~elements.mjs → _comparer.mjs} +0 -0
  782. /package/build/schema/static/{~non-readonly.mjs → _elements.mjs} +0 -0
  783. /package/build/type/engine/call/{distribute-arguments.d.mts → distribute_arguments.d.mts} +0 -0
  784. /package/build/type/engine/call/{resolve-arguments.d.mts → resolve_arguments.d.mts} +0 -0
  785. /package/build/type/engine/call/{resolve-target.d.mts → resolve_target.d.mts} +0 -0
  786. /package/build/type/engine/call/{resolve-target.mjs → resolve_target.mjs} +0 -0
  787. /package/build/type/engine/{awaited → constructor_parameters}/index.d.mts +0 -0
  788. /package/build/type/engine/{awaited → constructor_parameters}/index.mjs +0 -0
  789. /package/build/type/engine/enum/{typescript-enum-to-enum-values.d.mts → typescript_enum_to_enum_values.d.mts} +0 -0
  790. /package/build/type/engine/enum/{typescript-enum-to-enum-values.mjs → typescript_enum_to_enum_values.mjs} +0 -0
  791. /package/build/type/engine/helpers/{keys-to-indexer.d.mts → keys_to_indexer.d.mts} +0 -0
  792. /package/build/type/engine/helpers/{keys-to-indexer.mjs → keys_to_indexer.mjs} +0 -0
  793. /package/build/type/engine/indexable/{from-literal.mjs → from_literal.mjs} +0 -0
  794. /package/build/type/engine/indexable/{to-indexable.d.mts → to_indexable.d.mts} +0 -0
  795. /package/build/type/engine/indexable/{to-indexable.mjs → to_indexable.mjs} +0 -0
  796. /package/build/type/engine/indexed/{array-indexer.d.mts → array_indexer.d.mts} +0 -0
  797. /package/build/type/engine/indexed/{array-indexer.mjs → array_indexer.mjs} +0 -0
  798. /package/build/type/engine/indexed/{from-array.d.mts → from_array.d.mts} +0 -0
  799. /package/build/type/engine/indexed/{from-array.mjs → from_array.mjs} +0 -0
  800. /package/build/type/engine/{constructor-parameters → instance_type}/index.d.mts +0 -0
  801. /package/build/type/engine/{constructor-parameters → instance_type}/index.mjs +0 -0
  802. /package/build/type/engine/intrinsics/{from-literal.d.mts → from_literal.d.mts} +0 -0
  803. /package/build/type/engine/intrinsics/{from-literal.mjs → from_literal.mjs} +0 -0
  804. /package/build/type/engine/keyof/{from-any.d.mts → from_any.d.mts} +0 -0
  805. /package/build/type/engine/keyof/{from-any.mjs → from_any.mjs} +0 -0
  806. /package/build/type/engine/keyof/{from-array.d.mts → from_array.d.mts} +0 -0
  807. /package/build/type/engine/keyof/{from-array.mjs → from_array.mjs} +0 -0
  808. /package/build/type/engine/keyof/{from-object.d.mts → from_object.d.mts} +0 -0
  809. /package/build/type/engine/keyof/{from-object.mjs → from_object.mjs} +0 -0
  810. /package/build/type/engine/keyof/{from-record.d.mts → from_record.d.mts} +0 -0
  811. /package/build/type/engine/keyof/{from-record.mjs → from_record.mjs} +0 -0
  812. /package/build/type/engine/keyof/{from-tuple.d.mts → from_tuple.d.mts} +0 -0
  813. /package/build/type/engine/keyof/{from-tuple.mjs → from_tuple.mjs} +0 -0
  814. /package/build/type/engine/{instance-type → non_nullable}/index.d.mts +0 -0
  815. /package/build/type/engine/{instance-type → non_nullable}/index.mjs +0 -0
  816. /package/build/type/engine/object/{from-object.d.mts → from_object.d.mts} +0 -0
  817. /package/build/type/engine/object/{from-object.mjs → from_object.mjs} +0 -0
  818. /package/build/type/engine/{non-nullable → readonly_object}/index.d.mts +0 -0
  819. /package/build/type/engine/{non-nullable → readonly_object}/index.mjs +0 -0
  820. /package/build/type/engine/record/{from-key-any.d.mts → from_key_any.d.mts} +0 -0
  821. /package/build/type/engine/record/{from-key-boolean.d.mts → from_key_boolean.d.mts} +0 -0
  822. /package/build/type/engine/record/{from-key-boolean.mjs → from_key_boolean.mjs} +0 -0
  823. /package/build/type/engine/record/{from-key-integer.d.mts → from_key_integer.d.mts} +0 -0
  824. /package/build/type/engine/record/{from-key-literal.d.mts → from_key_literal.d.mts} +0 -0
  825. /package/build/type/engine/record/{from-key-literal.mjs → from_key_literal.mjs} +0 -0
  826. /package/build/type/engine/record/{from-key-number.d.mts → from_key_number.d.mts} +0 -0
  827. /package/build/type/engine/record/{from-key-string.d.mts → from_key_string.d.mts} +0 -0
  828. /package/build/type/engine/record/{from-key-union.d.mts → from_key_union.d.mts} +0 -0
  829. /package/build/type/engine/record/{record-create.d.mts → record_create.d.mts} +0 -0
  830. /package/build/type/engine/record/{record-create.mjs → record_create.mjs} +0 -0
  831. /package/build/type/engine/{options → return_type}/index.d.mts +0 -0
  832. /package/build/type/engine/{options → return_type}/index.mjs +0 -0
  833. /package/build/type/engine/{template-literal → template_literal}/create.d.mts +0 -0
  834. /package/build/type/engine/{template-literal → template_literal}/create.mjs +0 -0
  835. /package/build/type/engine/{template-literal/is-finite.d.mts → template_literal/is_finite.d.mts} +0 -0
  836. /package/build/type/engine/{template-literal/is-pattern.d.mts → template_literal/is_pattern.d.mts} +0 -0
  837. /package/build/type/engine/{template-literal → template_literal}/static.d.mts +0 -0
  838. /package/build/type/engine/{template-literal → template_literal}/static.mjs +0 -0
  839. /package/build/type/engine/tuple/{to-object.d.mts → to_object.d.mts} +0 -0
  840. /package/build/type/engine/tuple/{to-object.mjs → to_object.mjs} +0 -0
  841. /package/build/type/engine/{readonly-type → with}/index.d.mts +0 -0
  842. /package/build/type/engine/{readonly-type → with}/index.mjs +0 -0
  843. /package/build/value/clean/{from-array.d.mts → from_array.d.mts} +0 -0
  844. /package/build/value/{convert/from-cyclic.d.mts → clean/from_cyclic.d.mts} +0 -0
  845. /package/build/value/clean/{from-intersect.d.mts → from_intersect.d.mts} +0 -0
  846. /package/build/value/clean/{from-object.d.mts → from_object.d.mts} +0 -0
  847. /package/build/value/clean/{from-record.d.mts → from_record.d.mts} +0 -0
  848. /package/build/value/clean/{from-ref.d.mts → from_ref.d.mts} +0 -0
  849. /package/build/value/clean/{from-tuple.d.mts → from_tuple.d.mts} +0 -0
  850. /package/build/value/clean/{from-type.d.mts → from_type.d.mts} +0 -0
  851. /package/build/value/{repair/from-union.d.mts → clean/from_union.d.mts} +0 -0
  852. /package/build/value/codec/{from-array.d.mts → from_array.d.mts} +0 -0
  853. /package/build/value/codec/{from-cyclic.d.mts → from_cyclic.d.mts} +0 -0
  854. /package/build/value/codec/{from-intersect.d.mts → from_intersect.d.mts} +0 -0
  855. /package/build/value/codec/{from-object.d.mts → from_object.d.mts} +0 -0
  856. /package/build/value/codec/{from-record.d.mts → from_record.d.mts} +0 -0
  857. /package/build/value/codec/{from-ref.d.mts → from_ref.d.mts} +0 -0
  858. /package/build/value/codec/{from-tuple.d.mts → from_tuple.d.mts} +0 -0
  859. /package/build/value/codec/{from-type.d.mts → from_type.d.mts} +0 -0
  860. /package/build/value/codec/{from-union.d.mts → from_union.d.mts} +0 -0
  861. /package/build/value/convert/{from-additional.d.mts → from_additional.d.mts} +0 -0
  862. /package/build/value/convert/{from-array.d.mts → from_array.d.mts} +0 -0
  863. /package/build/value/convert/{from-bigint.d.mts → from_bigint.d.mts} +0 -0
  864. /package/build/value/convert/{from-bigint.mjs → from_bigint.mjs} +0 -0
  865. /package/build/value/convert/{from-boolean.d.mts → from_boolean.d.mts} +0 -0
  866. /package/build/value/convert/{from-boolean.mjs → from_boolean.mjs} +0 -0
  867. /package/build/value/{default/from-cyclic.d.mts → convert/from_cyclic.d.mts} +0 -0
  868. /package/build/value/convert/{from-enum.d.mts → from_enum.d.mts} +0 -0
  869. /package/build/value/convert/{from-integer.d.mts → from_integer.d.mts} +0 -0
  870. /package/build/value/convert/{from-integer.mjs → from_integer.mjs} +0 -0
  871. /package/build/value/convert/{from-intersect.d.mts → from_intersect.d.mts} +0 -0
  872. /package/build/value/convert/{from-literal.mjs → from_literal.mjs} +0 -0
  873. /package/build/value/convert/{from-null.d.mts → from_null.d.mts} +0 -0
  874. /package/build/value/convert/{from-null.mjs → from_null.mjs} +0 -0
  875. /package/build/value/convert/{from-number.d.mts → from_number.d.mts} +0 -0
  876. /package/build/value/convert/{from-number.mjs → from_number.mjs} +0 -0
  877. /package/build/value/convert/{from-object.d.mts → from_object.d.mts} +0 -0
  878. /package/build/value/convert/{from-record.d.mts → from_record.d.mts} +0 -0
  879. /package/build/value/convert/{from-ref.d.mts → from_ref.d.mts} +0 -0
  880. /package/build/value/convert/{from-string.d.mts → from_string.d.mts} +0 -0
  881. /package/build/value/convert/{from-string.mjs → from_string.mjs} +0 -0
  882. /package/build/value/convert/{from-tuple.d.mts → from_tuple.d.mts} +0 -0
  883. /package/build/value/convert/{from-type.d.mts → from_type.d.mts} +0 -0
  884. /package/build/value/convert/{from-undefined.d.mts → from_undefined.d.mts} +0 -0
  885. /package/build/value/convert/{from-undefined.mjs → from_undefined.mjs} +0 -0
  886. /package/build/value/convert/{from-union.d.mts → from_union.d.mts} +0 -0
  887. /package/build/value/convert/{from-void.d.mts → from_void.d.mts} +0 -0
  888. /package/build/value/convert/{from-void.mjs → from_void.mjs} +0 -0
  889. /package/build/value/convert/try/{try-result.d.mts → try_result.d.mts} +0 -0
  890. /package/build/value/convert/try/{try-result.mjs → try_result.mjs} +0 -0
  891. /package/build/value/create/{from-array.d.mts → from_array.d.mts} +0 -0
  892. /package/build/value/create/{from-bigint.d.mts → from_bigint.d.mts} +0 -0
  893. /package/build/value/create/{from-bigint.mjs → from_bigint.mjs} +0 -0
  894. /package/build/value/create/{from-boolean.d.mts → from_boolean.d.mts} +0 -0
  895. /package/build/value/create/{from-boolean.mjs → from_boolean.mjs} +0 -0
  896. /package/build/value/create/{from-constructor.d.mts → from_constructor.d.mts} +0 -0
  897. /package/build/value/create/{from-cyclic.d.mts → from_cyclic.d.mts} +0 -0
  898. /package/build/value/create/{from-default.d.mts → from_default.d.mts} +0 -0
  899. /package/build/value/create/{from-default.mjs → from_default.mjs} +0 -0
  900. /package/build/value/create/{from-enum.d.mts → from_enum.d.mts} +0 -0
  901. /package/build/value/create/{from-function.d.mts → from_function.d.mts} +0 -0
  902. /package/build/value/create/{from-integer.d.mts → from_integer.d.mts} +0 -0
  903. /package/build/value/create/{from-integer.mjs → from_integer.mjs} +0 -0
  904. /package/build/value/create/{from-intersect.d.mts → from_intersect.d.mts} +0 -0
  905. /package/build/value/create/{from-literal.d.mts → from_literal.d.mts} +0 -0
  906. /package/build/value/create/{from-literal.mjs → from_literal.mjs} +0 -0
  907. /package/build/value/create/{from-never.d.mts → from_never.d.mts} +0 -0
  908. /package/build/value/create/{from-never.mjs → from_never.mjs} +0 -0
  909. /package/build/value/create/{from-null.d.mts → from_null.d.mts} +0 -0
  910. /package/build/value/create/{from-null.mjs → from_null.mjs} +0 -0
  911. /package/build/value/create/{from-number.d.mts → from_number.d.mts} +0 -0
  912. /package/build/value/create/{from-number.mjs → from_number.mjs} +0 -0
  913. /package/build/value/create/{from-object.d.mts → from_object.d.mts} +0 -0
  914. /package/build/value/create/{from-record.d.mts → from_record.d.mts} +0 -0
  915. /package/build/value/create/{from-record.mjs → from_record.mjs} +0 -0
  916. /package/build/value/create/{from-ref.d.mts → from_ref.d.mts} +0 -0
  917. /package/build/value/create/{from-string.d.mts → from_string.d.mts} +0 -0
  918. /package/build/value/create/{from-string.mjs → from_string.mjs} +0 -0
  919. /package/build/value/create/{from-symbol.d.mts → from_symbol.d.mts} +0 -0
  920. /package/build/value/create/{from-symbol.mjs → from_symbol.mjs} +0 -0
  921. /package/build/value/create/{from-template-literal.d.mts → from_template_literal.d.mts} +0 -0
  922. /package/build/value/create/{from-tuple.d.mts → from_tuple.d.mts} +0 -0
  923. /package/build/value/create/{from-type.d.mts → from_type.d.mts} +0 -0
  924. /package/build/value/create/{from-undefined.d.mts → from_undefined.d.mts} +0 -0
  925. /package/build/value/create/{from-undefined.mjs → from_undefined.mjs} +0 -0
  926. /package/build/value/create/{from-union.d.mts → from_union.d.mts} +0 -0
  927. /package/build/value/create/{from-void.d.mts → from_void.d.mts} +0 -0
  928. /package/build/value/create/{from-void.mjs → from_void.mjs} +0 -0
  929. /package/build/value/default/{from-array.d.mts → from_array.d.mts} +0 -0
  930. /package/build/value/default/{from-default.d.mts → from_default.d.mts} +0 -0
  931. /package/build/value/default/{from-default.mjs → from_default.mjs} +0 -0
  932. /package/build/value/{repair/from-intersect.d.mts → default/from_intersect.d.mts} +0 -0
  933. /package/build/value/default/{from-object.d.mts → from_object.d.mts} +0 -0
  934. /package/build/value/default/{from-record.d.mts → from_record.d.mts} +0 -0
  935. /package/build/value/default/{from-ref.d.mts → from_ref.d.mts} +0 -0
  936. /package/build/value/default/{from-tuple.d.mts → from_tuple.d.mts} +0 -0
  937. /package/build/value/default/{from-type.d.mts → from_type.d.mts} +0 -0
  938. /package/build/value/default/{from-union.d.mts → from_union.d.mts} +0 -0
  939. /package/build/value/repair/{from-array.d.mts → from_array.d.mts} +0 -0
  940. /package/build/value/repair/{from-enum.d.mts → from_enum.d.mts} +0 -0
  941. /package/build/value/repair/{from-object.d.mts → from_object.d.mts} +0 -0
  942. /package/build/value/repair/{from-record.d.mts → from_record.d.mts} +0 -0
  943. /package/build/value/repair/{from-ref.d.mts → from_ref.d.mts} +0 -0
  944. /package/build/value/repair/{from-template-literal.d.mts → from_template_literal.d.mts} +0 -0
  945. /package/build/value/repair/{from-tuple.d.mts → from_tuple.d.mts} +0 -0
  946. /package/build/value/repair/{from-type.d.mts → from_type.d.mts} +0 -0
  947. /package/build/value/repair/{from-unknown.d.mts → from_unknown.d.mts} +0 -0
  948. /package/build/value/repair/{from-unknown.mjs → from_unknown.mjs} +0 -0
  949. /package/build/value/shared/{optional-undefined.d.mts → optional_undefined.d.mts} +0 -0
  950. /package/build/value/shared/{optional-undefined.mjs → optional_undefined.mjs} +0 -0
  951. /package/build/value/shared/{union-score-select.d.mts → union_score_select.d.mts} +0 -0
  952. /package/build/value/shared/{union-score-select.mjs → union_score_select.mjs} +0 -0
@@ -4,100 +4,73 @@ import { Guard } from '../../guard/index.mjs';
4
4
  // ------------------------------------------------------------------
5
5
  // Modifiers
6
6
  // ------------------------------------------------------------------
7
- import { IsImmutable, Immutable } from '../types/_immutable.mjs';
8
- import { IsOptional, OptionalAdd, OptionalRemove } from '../types/_optional.mjs';
9
- import { IsReadonly, ReadonlyAdd, ReadonlyRemove } from '../types/_readonly.mjs';
10
- // ------------------------------------------------------------------
11
- // Types
12
- // ------------------------------------------------------------------
13
- import { IsSchema } from '../types/schema.mjs';
14
- import { Array, IsArray, ArrayOptions } from '../types/array.mjs';
15
- import { AsyncIterator, IsAsyncIterator, AsyncIteratorOptions } from '../types/async-iterator.mjs';
16
- import { IsBase } from '../types/base.mjs';
7
+ import { AddImmutableAction } from './immutable/instantiate_add.mjs';
8
+ import { AddReadonlyAction } from './readonly/instantiate_add.mjs';
9
+ import { AddOptionalAction } from './optional/instantiate_add.mjs';
10
+ import { _Array_, IsArray, ArrayOptions } from '../types/array.mjs';
17
11
  import { Constructor, IsConstructor, ConstructorOptions } from '../types/constructor.mjs';
18
12
  import { Deferred, IsDeferred } from '../types/deferred.mjs';
19
13
  import { _Function_, IsFunction, FunctionOptions } from '../types/function.mjs';
20
14
  import { IsCall } from '../types/call.mjs';
15
+ import { Dependent, IsDependent, DependentOptions } from '../types/dependent.mjs';
21
16
  import { Intersect, IsIntersect, IntersectOptions } from '../types/intersect.mjs';
22
- import { Iterator, IsIterator, IteratorOptions } from '../types/iterator.mjs';
23
17
  import { Object, IsObject, ObjectOptions } from '../types/object.mjs';
24
- import { Promise, IsPromise, PromiseOptions } from '../types/promise.mjs';
25
18
  import { RecordFromPattern, IsRecord, RecordPattern, RecordValue } from '../types/record.mjs';
26
19
  import { Tuple, IsTuple, TupleOptions } from '../types/tuple.mjs';
27
20
  import { Union, IsUnion, UnionOptions } from '../types/union.mjs';
28
21
  import { IsRef } from '../types/ref.mjs';
29
22
  import { Rest, IsRest } from '../types/rest.mjs';
30
23
  // ------------------------------------------------------------------
31
- // Modifier Actions
24
+ // Modifier Instantiate
32
25
  // ------------------------------------------------------------------
33
- import { IsReadonlyAddAction, IsReadonlyRemoveAction } from '../action/_readonly.mjs';
34
- import { IsOptionalAddAction, IsOptionalRemoveAction } from '../action/_optional.mjs';
26
+ import { AddImmutableInstantiate } from './immutable/instantiate_add.mjs';
27
+ import { RemoveImmutableInstantiate } from './immutable/instantiate_remove.mjs';
28
+ import { AddReadonlyInstantiate } from './readonly/instantiate_add.mjs';
29
+ import { RemoveReadonlyInstantiate } from './readonly/instantiate_remove.mjs';
30
+ import { AddOptionalInstantiate } from './optional/instantiate_add.mjs';
31
+ import { RemoveOptionalInstantiate } from './optional/instantiate_remove.mjs';
32
+ import { IsOptional } from '../types/_optional.mjs';
33
+ import { IsImmutable } from '../types/_immutable.mjs';
34
+ import { IsReadonly } from '../types/_readonly.mjs';
35
35
  // ------------------------------------------------------------------
36
36
  // Instantiate
37
37
  // ------------------------------------------------------------------
38
- import { AwaitedInstantiate } from './awaited/instantiate.mjs';
39
38
  import { CallInstantiate } from './call/instantiate.mjs';
40
39
  import { CapitalizeInstantiate } from './intrinsics/instantiate.mjs';
41
40
  import { ConditionalInstantiate } from './conditional/index.mjs';
42
- import { ConstructorParametersInstantiate } from './constructor-parameters/instantiate.mjs';
41
+ import { ConstructorParametersInstantiate } from './constructor_parameters/instantiate.mjs';
43
42
  import { EvaluateInstantiate } from './evaluate/instantiate.mjs';
44
43
  import { ExcludeInstantiate } from './exclude/instantiate.mjs';
45
44
  import { ExtractInstantiate } from './extract/instantiate.mjs';
46
45
  import { IndexInstantiate } from './indexed/instantiate.mjs';
47
- import { InstanceTypeInstantiate } from './instance-type/instantiate.mjs';
46
+ import { InstanceTypeInstantiate } from './instance_type/instantiate.mjs';
48
47
  import { InterfaceInstantiate } from './interface/instantiate.mjs';
49
48
  import { KeyOfInstantiate } from './keyof/instantiate.mjs';
50
49
  import { LowercaseInstantiate } from './intrinsics/instantiate.mjs';
51
50
  import { MappedInstantiate } from './mapped/instantiate.mjs';
52
51
  import { ModuleInstantiate } from './module/instantiate.mjs';
53
- import { NonNullableInstantiate } from './non-nullable/instantiate.mjs';
52
+ import { NonNullableInstantiate } from './non_nullable/instantiate.mjs';
54
53
  import { OmitInstantiate } from './omit/instantiate.mjs';
55
- import { OptionsInstantiate } from './options/instantiate.mjs';
56
54
  import { ParametersInstantiate } from './parameters/instantiate.mjs';
57
55
  import { PartialInstantiate } from './partial/instantiate.mjs';
58
56
  import { PickInstantiate } from './pick/instantiate.mjs';
59
- import { ReadonlyTypeInstantiate } from './readonly-type/instantiate.mjs';
57
+ import { ReadonlyObjectInstantiate } from './readonly_object/instantiate.mjs';
60
58
  import { RecordInstantiate } from './record/instantiate.mjs';
61
59
  import { RefInstantiate } from './ref/instantiate.mjs';
62
60
  import { RequiredInstantiate } from './required/instantiate.mjs';
63
- import { ReturnTypeInstantiate } from './return-type/instantiate.mjs';
64
- import { TemplateLiteralInstantiate } from './template-literal/instantiate.mjs';
61
+ import { ReturnTypeInstantiate } from './return_type/instantiate.mjs';
62
+ import { TemplateLiteralInstantiate } from './template_literal/instantiate.mjs';
65
63
  import { UncapitalizeInstantiate } from './intrinsics/instantiate.mjs';
66
64
  import { UppercaseInstantiate } from './intrinsics/instantiate.mjs';
65
+ import { WithInstantiate } from './with/instantiate.mjs';
67
66
  import { RestSpread } from './rest/index.mjs';
68
- function CanInstantiateRef(context, ref) {
69
- return (ref in context);
70
- }
71
- function CanInstantiateType(context, type) {
72
- return (IsIntersect(type) ? CanInstantiate(context, type.allOf) :
73
- IsUnion(type) ? CanInstantiate(context, type.anyOf) :
74
- IsRef(type) ? CanInstantiateRef(context, type.$ref) :
75
- true);
76
- }
77
- export function CanInstantiate(context, types) {
78
- const [left, ...right] = types;
79
- return (IsSchema(left)
80
- ? CanInstantiateType(context, left)
81
- ? CanInstantiate(context, right)
82
- : false
83
- : true);
84
- }
85
- function ModifierActions(type, readonly, optional) {
86
- return (IsReadonlyRemoveAction(type) ? ModifierActions(type.type, 'remove', optional) :
87
- IsOptionalRemoveAction(type) ? ModifierActions(type.type, readonly, 'remove') :
88
- IsReadonlyAddAction(type) ? ModifierActions(type.type, 'add', optional) :
89
- IsOptionalAddAction(type) ? ModifierActions(type.type, readonly, 'add') :
90
- [type, readonly, optional]);
67
+ export function State(callstack, visited) {
68
+ return { callstack, visited };
91
69
  }
92
- function ApplyReadonly(action, type) {
93
- return (Guard.IsEqual(action, 'remove') ? ReadonlyRemove(type) :
94
- Guard.IsEqual(action, 'add') ? ReadonlyAdd(type) :
95
- type);
96
- }
97
- function ApplyOptional(action, type) {
98
- return (Guard.IsEqual(action, 'remove') ? OptionalRemove(type) :
99
- Guard.IsEqual(action, 'add') ? OptionalAdd(type) :
100
- type);
70
+ export function CanInstantiate(types) {
71
+ return Guard.ShiftLeft(types, (left, right) => IsRef(left)
72
+ ? false
73
+ : CanInstantiate(right), () => true);
101
74
  }
102
75
  export function InstantiateProperties(context, state, properties) {
103
76
  return Guard.Keys(properties).reduce((result, key) => {
@@ -112,61 +85,74 @@ export function InstantiateElements(context, state, types) {
112
85
  export function InstantiateTypes(context, state, types) {
113
86
  return types.map(type => InstantiateType(context, state, type));
114
87
  }
88
+ function WithModifiers(type, instantiatedType) {
89
+ const withOptional = IsOptional(type) ? AddOptionalAction(instantiatedType, {}) : instantiatedType;
90
+ const withReadonly = IsReadonly(type) ? AddReadonlyAction(withOptional, {}) : withOptional;
91
+ const withImmutable = IsImmutable(type) ? AddImmutableAction(withReadonly, {}) : withReadonly;
92
+ return withImmutable;
93
+ }
115
94
  function InstantiateDeferred(context, state, action, parameters, options) {
116
- return (Guard.IsEqual(action, 'Awaited') ? AwaitedInstantiate(context, state, parameters[0], options) :
117
- Guard.IsEqual(action, 'Capitalize') ? CapitalizeInstantiate(context, state, parameters[0], options) :
118
- Guard.IsEqual(action, 'Conditional') ? ConditionalInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) :
119
- Guard.IsEqual(action, 'ConstructorParameters') ? ConstructorParametersInstantiate(context, state, parameters[0], options) :
120
- Guard.IsEqual(action, 'Evaluate') ? EvaluateInstantiate(context, state, parameters[0], options) :
121
- Guard.IsEqual(action, 'Exclude') ? ExcludeInstantiate(context, state, parameters[0], parameters[1], options) :
122
- Guard.IsEqual(action, 'Extract') ? ExtractInstantiate(context, state, parameters[0], parameters[1], options) :
123
- Guard.IsEqual(action, 'Index') ? IndexInstantiate(context, state, parameters[0], parameters[1], options) :
124
- Guard.IsEqual(action, 'InstanceType') ? InstanceTypeInstantiate(context, state, parameters[0], options) :
125
- Guard.IsEqual(action, 'Interface') ? InterfaceInstantiate(context, state, parameters[0], parameters[1], options) :
126
- Guard.IsEqual(action, 'KeyOf') ? KeyOfInstantiate(context, state, parameters[0], options) :
127
- Guard.IsEqual(action, 'Lowercase') ? LowercaseInstantiate(context, state, parameters[0], options) :
128
- Guard.IsEqual(action, 'Mapped') ? MappedInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) :
129
- Guard.IsEqual(action, 'Module') ? ModuleInstantiate(context, state, parameters[0], options) :
130
- Guard.IsEqual(action, 'NonNullable') ? NonNullableInstantiate(context, state, parameters[0], options) :
131
- Guard.IsEqual(action, 'Pick') ? PickInstantiate(context, state, parameters[0], parameters[1], options) :
132
- Guard.IsEqual(action, 'Options') ? OptionsInstantiate(context, state, parameters[0], parameters[1]) :
133
- Guard.IsEqual(action, 'Parameters') ? ParametersInstantiate(context, state, parameters[0], options) :
134
- Guard.IsEqual(action, 'Partial') ? PartialInstantiate(context, state, parameters[0], options) :
135
- Guard.IsEqual(action, 'Omit') ? OmitInstantiate(context, state, parameters[0], parameters[1], options) :
136
- Guard.IsEqual(action, 'ReadonlyType') ? ReadonlyTypeInstantiate(context, state, parameters[0], options) :
137
- Guard.IsEqual(action, 'Record') ? RecordInstantiate(context, state, parameters[0], parameters[1], options) :
138
- Guard.IsEqual(action, 'Required') ? RequiredInstantiate(context, state, parameters[0], options) :
139
- Guard.IsEqual(action, 'ReturnType') ? ReturnTypeInstantiate(context, state, parameters[0], options) :
140
- Guard.IsEqual(action, 'TemplateLiteral') ? TemplateLiteralInstantiate(context, state, parameters[0], options) :
141
- Guard.IsEqual(action, 'Uncapitalize') ? UncapitalizeInstantiate(context, state, parameters[0], options) :
142
- Guard.IsEqual(action, 'Uppercase') ? UppercaseInstantiate(context, state, parameters[0], options) :
143
- Deferred(action, parameters, options));
95
+ return (
96
+ // Modifiers
97
+ Guard.IsEqual(action, 'AddImmutable') ? AddImmutableInstantiate(context, state, parameters[0], options) :
98
+ Guard.IsEqual(action, 'RemoveImmutable') ? RemoveImmutableInstantiate(context, state, parameters[0], options) :
99
+ Guard.IsEqual(action, 'AddReadonly') ? AddReadonlyInstantiate(context, state, parameters[0], options) :
100
+ Guard.IsEqual(action, 'RemoveReadonly') ? RemoveReadonlyInstantiate(context, state, parameters[0], options) :
101
+ Guard.IsEqual(action, 'AddOptional') ? AddOptionalInstantiate(context, state, parameters[0], options) :
102
+ Guard.IsEqual(action, 'RemoveOptional') ? RemoveOptionalInstantiate(context, state, parameters[0], options) :
103
+ // Actions
104
+ Guard.IsEqual(action, 'Capitalize') ? CapitalizeInstantiate(context, state, parameters[0], options) :
105
+ Guard.IsEqual(action, 'Conditional') ? ConditionalInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) :
106
+ Guard.IsEqual(action, 'ConstructorParameters') ? ConstructorParametersInstantiate(context, state, parameters[0], options) :
107
+ Guard.IsEqual(action, 'Evaluate') ? EvaluateInstantiate(context, state, parameters[0], options) :
108
+ Guard.IsEqual(action, 'Exclude') ? ExcludeInstantiate(context, state, parameters[0], parameters[1], options) :
109
+ Guard.IsEqual(action, 'Extract') ? ExtractInstantiate(context, state, parameters[0], parameters[1], options) :
110
+ Guard.IsEqual(action, 'Index') ? IndexInstantiate(context, state, parameters[0], parameters[1], options) :
111
+ Guard.IsEqual(action, 'InstanceType') ? InstanceTypeInstantiate(context, state, parameters[0], options) :
112
+ Guard.IsEqual(action, 'Interface') ? InterfaceInstantiate(context, state, parameters[0], parameters[1], options) :
113
+ Guard.IsEqual(action, 'KeyOf') ? KeyOfInstantiate(context, state, parameters[0], options) :
114
+ Guard.IsEqual(action, 'Lowercase') ? LowercaseInstantiate(context, state, parameters[0], options) :
115
+ Guard.IsEqual(action, 'Mapped') ? MappedInstantiate(context, state, parameters[0], parameters[1], parameters[2], parameters[3], options) :
116
+ Guard.IsEqual(action, 'Module') ? ModuleInstantiate(context, state, parameters[0], options) :
117
+ Guard.IsEqual(action, 'NonNullable') ? NonNullableInstantiate(context, state, parameters[0], options) :
118
+ Guard.IsEqual(action, 'Pick') ? PickInstantiate(context, state, parameters[0], parameters[1], options) :
119
+ Guard.IsEqual(action, 'Parameters') ? ParametersInstantiate(context, state, parameters[0], options) :
120
+ Guard.IsEqual(action, 'Partial') ? PartialInstantiate(context, state, parameters[0], options) :
121
+ Guard.IsEqual(action, 'Omit') ? OmitInstantiate(context, state, parameters[0], parameters[1], options) :
122
+ Guard.IsEqual(action, 'ReadonlyObject') ? ReadonlyObjectInstantiate(context, state, parameters[0], options) :
123
+ Guard.IsEqual(action, 'Record') ? RecordInstantiate(context, state, parameters[0], parameters[1], options) :
124
+ Guard.IsEqual(action, 'Required') ? RequiredInstantiate(context, state, parameters[0], options) :
125
+ Guard.IsEqual(action, 'ReturnType') ? ReturnTypeInstantiate(context, state, parameters[0], options) :
126
+ Guard.IsEqual(action, 'TemplateLiteral') ? TemplateLiteralInstantiate(context, state, parameters[0], options) :
127
+ Guard.IsEqual(action, 'Uncapitalize') ? UncapitalizeInstantiate(context, state, parameters[0], options) :
128
+ Guard.IsEqual(action, 'Uppercase') ? UppercaseInstantiate(context, state, parameters[0], options) :
129
+ Guard.IsEqual(action, 'With') ? WithInstantiate(context, state, parameters[0], parameters[1]) :
130
+ Deferred(action, parameters, options));
144
131
  }
145
- export function InstantiateType(context, state, input) {
146
- const immutable = IsImmutable(input);
147
- const modifiers = ModifierActions(input, IsReadonly(input) ? 'add' : 'none', IsOptional(input) ? 'add' : 'none');
148
- const type = IsBase(modifiers[0]) ? modifiers[0].Clone() : modifiers[0];
149
- const instantiated = (IsRef(type) ? RefInstantiate(context, state, type, type.$ref) :
150
- IsArray(type) ? Array(InstantiateType(context, state, type.items), ArrayOptions(type)) :
151
- IsAsyncIterator(type) ? AsyncIterator(InstantiateType(context, state, type.iteratorItems), AsyncIteratorOptions(type)) :
152
- IsCall(type) ? CallInstantiate(context, state, type.target, type.arguments) :
153
- IsConstructor(type) ? Constructor(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.instanceType), ConstructorOptions(type)) :
154
- IsDeferred(type) ? InstantiateDeferred(context, state, type.action, type.parameters, type.options) :
155
- IsFunction(type) ? _Function_(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.returnType), FunctionOptions(type)) :
156
- IsIntersect(type) ? Intersect(InstantiateTypes(context, state, type.allOf), IntersectOptions(type)) :
157
- IsIterator(type) ? Iterator(InstantiateType(context, state, type.iteratorItems), IteratorOptions(type)) :
158
- IsObject(type) ? Object(InstantiateProperties(context, state, type.properties), ObjectOptions(type)) :
159
- IsPromise(type) ? Promise(InstantiateType(context, state, type.item), PromiseOptions(type)) :
160
- IsRecord(type) ? RecordFromPattern(RecordPattern(type), InstantiateType(context, state, RecordValue(type))) :
161
- IsRest(type) ? Rest(InstantiateType(context, state, type.items)) :
162
- IsTuple(type) ? Tuple(InstantiateElements(context, state, type.items), TupleOptions(type)) :
163
- IsUnion(type) ? Union(InstantiateTypes(context, state, type.anyOf), UnionOptions(type)) :
164
- type);
165
- const withImmutable = immutable ? Immutable(instantiated) : instantiated;
166
- const withModifiers = ApplyReadonly(modifiers[1], ApplyOptional(modifiers[2], withImmutable));
132
+ function InstantiateImmediate(context, state, type) {
133
+ const instantiatedType = (IsRef(type) ? RefInstantiate(context, state, type, type.$ref) :
134
+ IsArray(type) ? _Array_(InstantiateType(context, state, type.items), ArrayOptions(type)) :
135
+ IsCall(type) ? CallInstantiate(context, state, type.target, type.arguments) :
136
+ IsConstructor(type) ? Constructor(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.instanceType), ConstructorOptions(type)) :
137
+ IsFunction(type) ? _Function_(InstantiateTypes(context, state, type.parameters), InstantiateType(context, state, type.returnType), FunctionOptions(type)) :
138
+ IsDependent(type) ? Dependent(InstantiateType(context, state, type.if), InstantiateType(context, state, type.then), InstantiateType(context, state, type.else), DependentOptions(type)) :
139
+ IsIntersect(type) ? Intersect(InstantiateTypes(context, state, type.allOf), IntersectOptions(type)) :
140
+ IsObject(type) ? Object(InstantiateProperties(context, state, type.properties), ObjectOptions(type)) :
141
+ IsRecord(type) ? RecordFromPattern(RecordPattern(type), InstantiateType(context, state, RecordValue(type))) :
142
+ IsRest(type) ? Rest(InstantiateType(context, state, type.items)) :
143
+ IsTuple(type) ? Tuple(InstantiateElements(context, state, type.items), TupleOptions(type)) :
144
+ IsUnion(type) ? Union(InstantiateTypes(context, state, type.anyOf), UnionOptions(type)) :
145
+ type);
146
+ const withModifiers = WithModifiers(type, instantiatedType);
167
147
  return withModifiers;
168
148
  }
149
+ export function InstantiateType(context, state, type) {
150
+ const result = IsDeferred(type)
151
+ ? InstantiateDeferred(context, state, type.action, type.parameters, type.options)
152
+ : InstantiateImmediate(context, state, type);
153
+ return result;
154
+ }
169
155
  /** Instantiates computed schematics using the given context and type. */
170
156
  export function Instantiate(context, type) {
171
- return InstantiateType(context, { callstack: [] }, type);
157
+ return InstantiateType(context, State([], []), type);
172
158
  }
@@ -3,14 +3,13 @@ import { type TProperties } from '../../types/properties.mjs';
3
3
  import { type TObject } from '../../types/object.mjs';
4
4
  import { type TEvaluateIntersect } from '../evaluate/evaluate.mjs';
5
5
  import { type TInterfaceDeferred } from '../../action/index.mjs';
6
- import { type TState, type TCanInstantiate } from '../instantiate.mjs';
6
+ import { type TCanInstantiate } from '../instantiate.mjs';
7
7
  import { type TInstantiateProperties } from '../instantiate.mjs';
8
8
  import { type TInstantiateTypes } from '../instantiate.mjs';
9
- type TInterfaceImmediate<Context extends TProperties, State extends TState, Heritage extends TSchema[], Properties extends TProperties, InstantiatedHeritage extends TSchema[] = TInstantiateTypes<Context, {
10
- callstack: [];
11
- }, Heritage>, instantiatedProperties extends TProperties = TInstantiateProperties<Context, {
12
- callstack: [];
13
- }, Properties>, EvaluatedInterface extends TSchema = TEvaluateIntersect<[...InstantiatedHeritage, TObject<instantiatedProperties>]>> = EvaluatedInterface;
14
- export type TInterfaceInstantiate<Context extends TProperties, State extends TState, Heritage extends TSchema[], Properties extends TProperties> = TCanInstantiate<Context, Heritage> extends true ? TInterfaceImmediate<Context, State, Heritage, Properties> : TInterfaceDeferred<Heritage, Properties>;
9
+ import { type TState } from '../instantiate.mjs';
10
+ type TInterfaceOperation<Heritage extends TSchema[], Properties extends TProperties, Result extends TSchema = TEvaluateIntersect<[...Heritage, TObject<Properties>]>> = Result;
11
+ export type TInterfaceAction<Heritage extends TSchema[], Properties extends TProperties, Result extends TSchema = TCanInstantiate<Heritage> extends true ? TInterfaceOperation<Heritage, Properties> : TInterfaceDeferred<Heritage, Properties>> = Result;
12
+ export declare function InterfaceAction<Heritage extends TSchema[], Properties extends TProperties>(heritage: [...Heritage], properties: Properties, options: TSchemaOptions): TInterfaceAction<Heritage, Properties>;
13
+ export type TInterfaceInstantiate<Context extends TProperties, State extends TState, Heritage extends TSchema[], Properties extends TProperties, InstantiatedHeritage extends TSchema[] = TInstantiateTypes<Context, State, Heritage>, InstantiatedProperties extends TProperties = TInstantiateProperties<Context, State, Properties>> = TInterfaceAction<InstantiatedHeritage, InstantiatedProperties>;
15
14
  export declare function InterfaceInstantiate<Context extends TProperties, State extends TState, Heritage extends TSchema[], Properties extends TProperties>(context: Context, state: State, heritage: [...Heritage], properties: Properties, options: TSchemaOptions): TInterfaceInstantiate<Context, State, Heritage, Properties>;
16
15
  export {};
@@ -6,14 +6,18 @@ import { InterfaceDeferred } from '../../action/index.mjs';
6
6
  import { CanInstantiate } from '../instantiate.mjs';
7
7
  import { InstantiateProperties } from '../instantiate.mjs';
8
8
  import { InstantiateTypes } from '../instantiate.mjs';
9
- function InterfaceImmediate(context, _state, heritage, properties, options) {
10
- const instantiatedHeritage = InstantiateTypes(context, { callstack: [] }, heritage);
11
- const instantiatedProperties = InstantiateProperties(context, { callstack: [] }, properties);
12
- const evaluatedInterface = EvaluateIntersect([...instantiatedHeritage, Object(instantiatedProperties)]);
13
- return Memory.Update(evaluatedInterface, {}, options);
9
+ function InterfaceOperation(heritage, properties) {
10
+ const result = EvaluateIntersect([...heritage, Object(properties)]);
11
+ return result;
12
+ }
13
+ export function InterfaceAction(heritage, properties, options) {
14
+ const result = CanInstantiate(heritage)
15
+ ? Memory.Update(InterfaceOperation(heritage, properties), {}, options)
16
+ : InterfaceDeferred(heritage, properties, options);
17
+ return result;
14
18
  }
15
19
  export function InterfaceInstantiate(context, state, heritage, properties, options) {
16
- return (CanInstantiate(context, heritage)
17
- ? InterfaceImmediate(context, state, heritage, properties, options)
18
- : InterfaceDeferred(heritage, properties, options));
20
+ const instantiatedHeritage = InstantiateTypes(context, state, heritage);
21
+ const instantiatedProperties = InstantiateProperties(context, state, properties);
22
+ return InterfaceAction(instantiatedHeritage, instantiatedProperties, options);
19
23
  }
@@ -1,6 +1,6 @@
1
1
  import { type TSchema } from '../../types/schema.mjs';
2
2
  import { type TMappingType, type TMappingFunc } from './mapping.mjs';
3
- import { type TTemplateLiteralDecode } from '../template-literal/decode.mjs';
4
- import { type TFromType } from './from-type.mjs';
5
- export type TFromTemplateLiteral<Mapping extends TMappingType, Pattern extends string, Decoded extends TSchema = TTemplateLiteralDecode<Pattern>, Result extends TSchema = TFromType<Mapping, Decoded>> = Result;
3
+ import { type TFromType } from './from_type.mjs';
4
+ import { type TEvaluateTemplateLiteral } from '../evaluate/index.mjs';
5
+ export type TFromTemplateLiteral<Mapping extends TMappingType, Pattern extends string, Evaluated extends TSchema = TEvaluateTemplateLiteral<Pattern>, Result extends TSchema = TFromType<Mapping, Evaluated>> = Result;
6
6
  export declare function FromTemplateLiteral(mapping: TMappingFunc, pattern: string): TSchema;
@@ -0,0 +1,8 @@
1
+ // deno-fmt-ignore-file
2
+ import { FromType } from './from_type.mjs';
3
+ import { EvaluateTemplateLiteral } from '../evaluate/index.mjs';
4
+ export function FromTemplateLiteral(mapping, pattern) {
5
+ const evaluated = EvaluateTemplateLiteral(pattern);
6
+ const result = FromType(mapping, evaluated);
7
+ return result;
8
+ }
@@ -1,10 +1,10 @@
1
1
  import { type TSchema } from '../../types/schema.mjs';
2
2
  import { type TLiteral, type TLiteralValue } from '../../types/literal.mjs';
3
- import { type TTemplateLiteral } from '../../types/template-literal.mjs';
3
+ import { type TTemplateLiteral } from '../../types/template_literal.mjs';
4
4
  import { type TUnion } from '../../types/union.mjs';
5
5
  import { type TMappingType, type TMappingFunc } from './mapping.mjs';
6
- import { type TFromLiteral } from './from-literal.mjs';
7
- import { type TFromTemplateLiteral } from './from-template-literal.mjs';
8
- import { type TFromUnion } from './from-union.mjs';
6
+ import { type TFromLiteral } from './from_literal.mjs';
7
+ import { type TFromTemplateLiteral } from './from_template_literal.mjs';
8
+ import { type TFromUnion } from './from_union.mjs';
9
9
  export type TFromType<Mapping extends TMappingType, Type extends TSchema> = (Type extends TLiteral<infer Value extends TLiteralValue> ? TFromLiteral<Mapping, Value> : Type extends TTemplateLiteral<infer Pattern extends string> ? TFromTemplateLiteral<Mapping, Pattern> : Type extends TUnion<infer Types extends TSchema[]> ? TFromUnion<Mapping, Types> : Type);
10
10
  export declare function FromType(mapping: TMappingFunc, type: TSchema): TSchema;
@@ -1,10 +1,10 @@
1
1
  // deno-fmt-ignore-file
2
2
  import { IsLiteral } from '../../types/literal.mjs';
3
- import { IsTemplateLiteral } from '../../types/template-literal.mjs';
3
+ import { IsTemplateLiteral } from '../../types/template_literal.mjs';
4
4
  import { IsUnion } from '../../types/union.mjs';
5
- import { FromLiteral } from './from-literal.mjs';
6
- import { FromTemplateLiteral } from './from-template-literal.mjs';
7
- import { FromUnion } from './from-union.mjs';
5
+ import { FromLiteral } from './from_literal.mjs';
6
+ import { FromTemplateLiteral } from './from_template_literal.mjs';
7
+ import { FromUnion } from './from_union.mjs';
8
8
  export function FromType(mapping, type) {
9
9
  return (IsLiteral(type) ? FromLiteral(mapping, type.const) :
10
10
  IsTemplateLiteral(type) ? FromTemplateLiteral(mapping, type.pattern) :
@@ -1,6 +1,6 @@
1
1
  import { type TSchema } from '../../types/schema.mjs';
2
2
  import { type TUnion } from '../../types/union.mjs';
3
3
  import { type TMappingType, type TMappingFunc } from './mapping.mjs';
4
- import { type TFromType } from './from-type.mjs';
4
+ import { type TFromType } from './from_type.mjs';
5
5
  export type TFromUnion<Mapping extends TMappingType, Types extends TSchema[], Result extends TSchema[] = []> = (Types extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? TFromUnion<Mapping, Right, [...Result, TFromType<Mapping, Left>]> : TUnion<Result>);
6
6
  export declare function FromUnion(mapping: TMappingFunc, types: TSchema[]): TSchema;
@@ -1,6 +1,6 @@
1
1
  // deno-fmt-ignore-file
2
2
  import { Union } from '../../types/union.mjs';
3
- import { FromType } from './from-type.mjs';
3
+ import { FromType } from './from_type.mjs';
4
4
  export function FromUnion(mapping, types) {
5
5
  const result = types.map(type => FromType(mapping, type));
6
6
  return Union(result);
@@ -1,7 +1,7 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../../types/schema.mjs';
2
2
  import { type TProperties } from '../../types/properties.mjs';
3
3
  import { type TMappingType } from './mapping.mjs';
4
- import { type TFromType } from './from-type.mjs';
4
+ import { type TFromType } from './from_type.mjs';
5
5
  import { type TState, type TInstantiateType, type TCanInstantiate } from '../instantiate.mjs';
6
6
  import { type TCapitalizeDeferred } from '../../action/capitalize.mjs';
7
7
  import { type TLowercaseDeferred } from '../../action/lowercase.mjs';
@@ -19,16 +19,20 @@ interface TUncapitalizeMapping extends TMappingType {
19
19
  interface TUppercaseMapping extends TMappingType {
20
20
  output: Uppercase<this['input']>;
21
21
  }
22
- type TCapitalizeImmediate<Context extends TProperties, State extends TState, Type extends TSchema, InstantiatedType extends TSchema = TInstantiateType<Context, State, Type>> = TFromType<TCapitalizeMapping, InstantiatedType>;
23
- export type TCapitalizeInstantiate<Context extends TProperties, State extends TState, Type extends TSchema> = TCanInstantiate<Context, [Type]> extends true ? TCapitalizeImmediate<Context, State, Type> : TCapitalizeDeferred<Type>;
22
+ export type TCapitalizeAction<Type extends TSchema, Result extends TSchema = TCanInstantiate<[Type]> extends true ? TFromType<TCapitalizeMapping, Type> : TCapitalizeDeferred<Type>> = Result;
23
+ export declare function CapitalizeAction<Type extends TSchema>(type: Type, options: TSchemaOptions): TCapitalizeAction<Type>;
24
+ export type TLowercaseAction<Type extends TSchema, Result extends TSchema = TCanInstantiate<[Type]> extends true ? TFromType<TLowercaseMapping, Type> : TLowercaseDeferred<Type>> = Result;
25
+ export declare function LowercaseAction<Type extends TSchema>(type: Type, options: TSchemaOptions): TLowercaseAction<Type>;
26
+ export type TUncapitalizeAction<Type extends TSchema, Result extends TSchema = TCanInstantiate<[Type]> extends true ? TFromType<TUncapitalizeMapping, Type> : TUncapitalizeDeferred<Type>> = Result;
27
+ export declare function UncapitalizeAction<Type extends TSchema>(type: Type, options: TSchemaOptions): TUncapitalizeAction<Type>;
28
+ export type TUppercaseAction<Type extends TSchema, Result extends TSchema = TCanInstantiate<[Type]> extends true ? TFromType<TUppercaseMapping, Type> : TUppercaseDeferred<Type>> = Result;
29
+ export declare function UppercaseAction<Type extends TSchema>(type: Type, options: TSchemaOptions): TUppercaseAction<Type>;
30
+ export type TCapitalizeInstantiate<Context extends TProperties, State extends TState, Type extends TSchema, InstantiatedType extends TSchema = TInstantiateType<Context, State, Type>> = TCapitalizeAction<InstantiatedType>;
24
31
  export declare function CapitalizeInstantiate<Context extends TProperties, State extends TState, Type extends TSchema>(context: Context, state: State, type: Type, options: TSchemaOptions): TCapitalizeInstantiate<Context, State, Type>;
25
- type TLowercaseImmediate<Context extends TProperties, State extends TState, Type extends TSchema, InstantiatedType extends TSchema = TInstantiateType<Context, State, Type>> = TFromType<TLowercaseMapping, InstantiatedType>;
26
- export type TLowercaseInstantiate<Context extends TProperties, State extends TState, Type extends TSchema> = TCanInstantiate<Context, [Type]> extends true ? TLowercaseImmediate<Context, State, Type> : TLowercaseDeferred<Type>;
32
+ export type TLowercaseInstantiate<Context extends TProperties, State extends TState, Type extends TSchema, InstantiatedType extends TSchema = TInstantiateType<Context, State, Type>> = TLowercaseAction<InstantiatedType>;
27
33
  export declare function LowercaseInstantiate<Context extends TProperties, State extends TState, Type extends TSchema>(context: Context, state: State, type: Type, options: TSchemaOptions): TLowercaseInstantiate<Context, State, Type>;
28
- type TUncapitalizeImmediate<Context extends TProperties, State extends TState, Type extends TSchema, InstantiatedType extends TSchema = TInstantiateType<Context, State, Type>> = TFromType<TUncapitalizeMapping, InstantiatedType>;
29
- export type TUncapitalizeInstantiate<Context extends TProperties, State extends TState, Type extends TSchema> = TCanInstantiate<Context, [Type]> extends true ? TUncapitalizeImmediate<Context, State, Type> : TUncapitalizeDeferred<Type>;
34
+ export type TUncapitalizeInstantiate<Context extends TProperties, State extends TState, Type extends TSchema, InstantiatedType extends TSchema = TInstantiateType<Context, State, Type>> = TUncapitalizeAction<InstantiatedType>;
30
35
  export declare function UncapitalizeInstantiate<Context extends TProperties, State extends TState, Type extends TSchema>(context: Context, state: State, type: Type, options: TSchemaOptions): TUncapitalizeInstantiate<Context, State, Type>;
31
- type TUppercaseImmediate<Context extends TProperties, State extends TState, Type extends TSchema, InstantiatedType extends TSchema = TInstantiateType<Context, State, Type>> = TFromType<TUppercaseMapping, InstantiatedType>;
32
- export type TUppercaseInstantiate<Context extends TProperties, State extends TState, Type extends TSchema> = TCanInstantiate<Context, [Type]> extends true ? TUppercaseImmediate<Context, State, Type> : TUppercaseDeferred<Type>;
36
+ export type TUppercaseInstantiate<Context extends TProperties, State extends TState, Type extends TSchema, InstantiatedType extends TSchema = TInstantiateType<Context, State, Type>> = TUppercaseAction<InstantiatedType>;
33
37
  export declare function UppercaseInstantiate<Context extends TProperties, State extends TState, Type extends TSchema>(context: Context, state: State, type: Type, options: TSchemaOptions): TUppercaseInstantiate<Context, State, Type>;
34
38
  export {};
@@ -1,6 +1,6 @@
1
1
  // deno-fmt-ignore-file
2
2
  import { Memory } from '../../../system/memory/index.mjs';
3
- import { FromType } from './from-type.mjs';
3
+ import { FromType } from './from_type.mjs';
4
4
  import { InstantiateType, CanInstantiate } from '../instantiate.mjs';
5
5
  import { CapitalizeDeferred } from '../../action/capitalize.mjs';
6
6
  import { LowercaseDeferred } from '../../action/lowercase.mjs';
@@ -10,39 +10,43 @@ const CapitalizeMapping = (input) => input[0].toUpperCase() + input.slice(1);
10
10
  const LowercaseMapping = (input) => input.toLowerCase();
11
11
  const UncapitalizeMapping = (input) => input[0].toLowerCase() + input.slice(1);
12
12
  const UppercaseMapping = (input) => input.toUpperCase();
13
- function CapitalizeImmediate(context, state, type, options) {
14
- const instantiatedType = InstantiateType(context, state, type);
15
- return Memory.Update(FromType(CapitalizeMapping, instantiatedType), {}, options);
13
+ export function CapitalizeAction(type, options) {
14
+ const result = CanInstantiate([type])
15
+ ? Memory.Update(FromType(CapitalizeMapping, type), {}, options)
16
+ : CapitalizeDeferred(type, options);
17
+ return result;
18
+ }
19
+ export function LowercaseAction(type, options) {
20
+ const result = CanInstantiate([type])
21
+ ? Memory.Update(FromType(LowercaseMapping, type), {}, options)
22
+ : LowercaseDeferred(type, options);
23
+ return result;
24
+ }
25
+ export function UncapitalizeAction(type, options) {
26
+ const result = CanInstantiate([type])
27
+ ? Memory.Update(FromType(UncapitalizeMapping, type), {}, options)
28
+ : UncapitalizeDeferred(type, options);
29
+ return result;
30
+ }
31
+ export function UppercaseAction(type, options) {
32
+ const result = CanInstantiate([type])
33
+ ? Memory.Update(FromType(UppercaseMapping, type), {}, options)
34
+ : UppercaseDeferred(type, options);
35
+ return result;
16
36
  }
17
37
  export function CapitalizeInstantiate(context, state, type, options) {
18
- return (CanInstantiate(context, [type])
19
- ? CapitalizeImmediate(context, state, type, options)
20
- : CapitalizeDeferred(type, options));
21
- }
22
- function LowercaseImmediate(context, state, type, options) {
23
38
  const instantiatedType = InstantiateType(context, state, type);
24
- return Memory.Update(FromType(LowercaseMapping, instantiatedType), {}, options);
39
+ return CapitalizeAction(instantiatedType, options);
25
40
  }
26
41
  export function LowercaseInstantiate(context, state, type, options) {
27
- return (CanInstantiate(context, [type])
28
- ? LowercaseImmediate(context, state, type, options)
29
- : LowercaseDeferred(type, options));
30
- }
31
- function UncapitalizeImmediate(context, state, type, options) {
32
42
  const instantiatedType = InstantiateType(context, state, type);
33
- return Memory.Update(FromType(UncapitalizeMapping, instantiatedType), {}, options);
43
+ return LowercaseAction(instantiatedType, options);
34
44
  }
35
45
  export function UncapitalizeInstantiate(context, state, type, options) {
36
- return (CanInstantiate(context, [type])
37
- ? UncapitalizeImmediate(context, state, type, options)
38
- : UncapitalizeDeferred(type, options));
39
- }
40
- function UppercaseImmediate(context, state, type, options) {
41
46
  const instantiatedType = InstantiateType(context, state, type);
42
- return Memory.Update(FromType(UppercaseMapping, instantiatedType), {}, options);
47
+ return UncapitalizeAction(instantiatedType, options);
43
48
  }
44
49
  export function UppercaseInstantiate(context, state, type, options) {
45
- return (CanInstantiate(context, [type])
46
- ? UppercaseImmediate(context, state, type, options)
47
- : UppercaseDeferred(type, options));
50
+ const instantiatedType = InstantiateType(context, state, type);
51
+ return UppercaseAction(instantiatedType, options);
48
52
  }
@@ -0,0 +1,15 @@
1
+ import { type TSchema } from '../../types/schema.mjs';
2
+ import { type TProperties } from '../../types/properties.mjs';
3
+ import { type TAny } from '../../types/any.mjs';
4
+ import { type TArray } from '../../types/array.mjs';
5
+ import { type TNever } from '../../types/never.mjs';
6
+ import { type TObject } from '../../types/object.mjs';
7
+ import { type TRecord } from '../../types/record.mjs';
8
+ import { type TTuple } from '../../types/tuple.mjs';
9
+ import { type TFromAny } from './from_any.mjs';
10
+ import { type TFromArray } from './from_array.mjs';
11
+ import { type TFromObject } from './from_object.mjs';
12
+ import { type TFromRecord } from './from_record.mjs';
13
+ import { type TFromTuple } from './from_tuple.mjs';
14
+ export type TFromType<Type extends TSchema> = (Type extends TAny ? TFromAny : Type extends TArray<infer Type extends TSchema> ? TFromArray<Type> : Type extends TObject<infer Properties extends TProperties> ? TFromObject<Properties> : Type extends TRecord ? TFromRecord<Type> : Type extends TTuple<infer Types extends TSchema[]> ? TFromTuple<Types> : TNever);
15
+ export declare function FromType<Type extends TSchema>(type: Type): TFromType<Type>;
@@ -0,0 +1,23 @@
1
+ // deno-fmt-ignore-file
2
+ import { IsAny } from '../../types/any.mjs';
3
+ import { IsArray } from '../../types/array.mjs';
4
+ import { Never } from '../../types/never.mjs';
5
+ import { IsObject } from '../../types/object.mjs';
6
+ import { IsRecord } from '../../types/record.mjs';
7
+ import { IsTuple } from '../../types/tuple.mjs';
8
+ // ------------------------------------------------------------------
9
+ // Computed
10
+ // ------------------------------------------------------------------
11
+ import { FromAny } from './from_any.mjs';
12
+ import { FromArray } from './from_array.mjs';
13
+ import { FromObject } from './from_object.mjs';
14
+ import { FromRecord } from './from_record.mjs';
15
+ import { FromTuple } from './from_tuple.mjs';
16
+ export function FromType(type) {
17
+ return (IsAny(type) ? FromAny() :
18
+ IsArray(type) ? FromArray(type.items) :
19
+ IsObject(type) ? FromObject(type.properties) :
20
+ IsRecord(type) ? FromRecord(type) :
21
+ IsTuple(type) ? FromTuple(type.items) :
22
+ Never());
23
+ }
@@ -1,27 +1,16 @@
1
1
  import { type TSchema, type TSchemaOptions } from '../../types/schema.mjs';
2
2
  import { type TProperties } from '../../types/properties.mjs';
3
- import { type TAny } from '../../types/any.mjs';
4
- import { type TArray } from '../../types/array.mjs';
5
3
  import { type TCyclic } from '../../types/cyclic.mjs';
4
+ import { type TDependent } from '../../types/dependent.mjs';
6
5
  import { type TIntersect } from '../../types/intersect.mjs';
7
- import { type TNever } from '../../types/never.mjs';
8
- import { type TObject } from '../../types/object.mjs';
9
- import { type TRecord } from '../../types/record.mjs';
10
- import { type TTuple } from '../../types/tuple.mjs';
11
6
  import { type TUnion } from '../../types/union.mjs';
12
7
  import { type TKeyOfDeferred } from '../../action/keyof.mjs';
13
8
  import { type TState, type TInstantiateType, type TCanInstantiate } from '../instantiate.mjs';
14
9
  import { type TCollapseToObject } from '../object/index.mjs';
15
- import { type TFromAny } from './from-any.mjs';
16
- import { type TFromArray } from './from-array.mjs';
17
- import { type TFromObject } from './from-object.mjs';
18
- import { type TFromRecord } from './from-record.mjs';
19
- import { type TFromTuple } from './from-tuple.mjs';
20
- type TNormalizeType<Type extends TSchema, Result extends TSchema = (Type extends TCyclic | TIntersect | TUnion ? TCollapseToObject<Type> : Type)> = Result;
21
- export type TKeyOfAction<Type extends TSchema, Normal extends TSchema = TNormalizeType<Type>> = (Normal extends TAny ? TFromAny : Normal extends TArray<infer Type extends TSchema> ? TFromArray<Type> : Normal extends TObject<infer Properties extends TProperties> ? TFromObject<Properties> : Normal extends TRecord ? TFromRecord<Normal> : Normal extends TTuple<infer Types extends TSchema[]> ? TFromTuple<Types> : TNever);
22
- export declare function KeyOfAction<Type extends TSchema>(type: Type): TKeyOfAction<Type>;
23
- export type TKeyOfImmediate<Context extends TProperties, State extends TState, Type extends TSchema, InstantiatedType extends TSchema = TInstantiateType<Context, State, Type>> = TKeyOfAction<InstantiatedType>;
24
- export declare function KeyOfImmediate<Context extends TProperties, State extends TState, Type extends TSchema>(context: Context, state: State, type: Type, options: TSchemaOptions): TKeyOfImmediate<Context, State, Type>;
25
- export type TKeyOfInstantiate<Context extends TProperties, State extends TState, Type extends TSchema> = TCanInstantiate<Context, [Type]> extends true ? TKeyOfImmediate<Context, State, Type> : TKeyOfDeferred<Type>;
10
+ import { type TFromType } from './from_type.mjs';
11
+ type TNormalizeType<Type extends TSchema, Result extends TSchema = (Type extends TCyclic ? TCollapseToObject<Type> : Type extends TDependent ? TCollapseToObject<Type> : Type extends TIntersect ? TCollapseToObject<Type> : Type extends TUnion ? TCollapseToObject<Type> : Type)> = Result;
12
+ export type TKeyOfAction<Type extends TSchema, Result extends TSchema = TCanInstantiate<[Type]> extends true ? TFromType<TNormalizeType<Type>> : TKeyOfDeferred<Type>> = Result;
13
+ export declare function KeyOfAction<Type extends TSchema>(type: Type, options: TSchemaOptions): TKeyOfAction<Type>;
14
+ export type TKeyOfInstantiate<Context extends TProperties, State extends TState, Type extends TSchema, InstantiatedType extends TSchema = TInstantiateType<Context, State, Type>> = TKeyOfAction<InstantiatedType>;
26
15
  export declare function KeyOfInstantiate<Context extends TProperties, State extends TState, Type extends TSchema>(context: Context, state: State, type: Type, options: TSchemaOptions): TKeyOfInstantiate<Context, State, Type>;
27
16
  export {};