typia 15.0.0 → 15.1.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 (1330) hide show
  1. package/lib/TypeGuardError.d.ts +20 -4
  2. package/lib/TypeGuardError.mjs.map +1 -1
  3. package/lib/basic.d.ts +787 -0
  4. package/lib/basic.js +104 -0
  5. package/lib/basic.js.map +1 -0
  6. package/lib/basic.mjs +86 -0
  7. package/lib/basic.mjs.map +1 -0
  8. package/lib/compare.d.ts +21 -0
  9. package/lib/compare.js.map +1 -1
  10. package/lib/compare.mjs.map +1 -1
  11. package/lib/functional.d.ts +42 -0
  12. package/lib/functional.js.map +1 -1
  13. package/lib/functional.mjs.map +1 -1
  14. package/lib/http.d.ts +124 -24
  15. package/lib/http.js.map +1 -1
  16. package/lib/http.mjs.map +1 -1
  17. package/lib/index.mjs +2 -1
  18. package/lib/index.mjs.map +1 -1
  19. package/lib/internal/_IProtobufWriter.d.ts +115 -0
  20. package/lib/internal/_ProtobufReader.d.ts +159 -1
  21. package/lib/internal/_ProtobufReader.js +159 -1
  22. package/lib/internal/_ProtobufReader.js.map +1 -1
  23. package/lib/internal/_ProtobufReader.mjs +159 -1
  24. package/lib/internal/_ProtobufReader.mjs.map +1 -1
  25. package/lib/internal/_ProtobufSizer.d.ts +135 -4
  26. package/lib/internal/_ProtobufSizer.js +134 -2
  27. package/lib/internal/_ProtobufSizer.js.map +1 -1
  28. package/lib/internal/_ProtobufSizer.mjs +133 -2
  29. package/lib/internal/_ProtobufSizer.mjs.map +1 -1
  30. package/lib/internal/_ProtobufWriter.d.ts +151 -0
  31. package/lib/internal/_ProtobufWriter.js +154 -1
  32. package/lib/internal/_ProtobufWriter.js.map +1 -1
  33. package/lib/internal/_ProtobufWriter.mjs +153 -2
  34. package/lib/internal/_ProtobufWriter.mjs.map +1 -1
  35. package/lib/internal/_accessExpressionAsString.d.ts +11 -0
  36. package/lib/internal/_accessExpressionAsString.js +11 -0
  37. package/lib/internal/_accessExpressionAsString.js.map +1 -1
  38. package/lib/internal/_accessExpressionAsString.mjs +11 -0
  39. package/lib/internal/_accessExpressionAsString.mjs.map +1 -1
  40. package/lib/internal/_assertGuard.d.ts +12 -0
  41. package/lib/internal/_assertGuard.js +12 -0
  42. package/lib/internal/_assertGuard.js.map +1 -1
  43. package/lib/internal/_assertGuard.mjs +12 -0
  44. package/lib/internal/_assertGuard.mjs.map +1 -1
  45. package/lib/internal/_coerceLlmArguments.d.ts +10 -0
  46. package/lib/internal/_coerceLlmArguments.js +10 -0
  47. package/lib/internal/_coerceLlmArguments.js.map +1 -1
  48. package/lib/internal/_coerceLlmArguments.mjs +10 -0
  49. package/lib/internal/_coerceLlmArguments.mjs.map +1 -1
  50. package/lib/internal/_createLlmEvaluation.js +9 -46
  51. package/lib/internal/_createLlmEvaluation.js.map +1 -1
  52. package/lib/internal/_createLlmEvaluation.mjs +7 -35
  53. package/lib/internal/_createLlmEvaluation.mjs.map +1 -1
  54. package/lib/internal/_createStandardSchema.d.ts +13 -0
  55. package/lib/internal/_createStandardSchema.js +13 -0
  56. package/lib/internal/_createStandardSchema.js.map +1 -1
  57. package/lib/internal/_createStandardSchema.mjs +13 -0
  58. package/lib/internal/_createStandardSchema.mjs.map +1 -1
  59. package/lib/internal/_decimal.d.ts +75 -0
  60. package/lib/internal/_decimal.js +55 -0
  61. package/lib/internal/_decimal.js.map +1 -1
  62. package/lib/internal/_decimal.mjs +55 -0
  63. package/lib/internal/_decimal.mjs.map +1 -1
  64. package/lib/internal/_functionalTypeGuardErrorFactory.d.ts +8 -0
  65. package/lib/internal/_functionalTypeGuardErrorFactory.js +8 -0
  66. package/lib/internal/_functionalTypeGuardErrorFactory.js.map +1 -1
  67. package/lib/internal/_functionalTypeGuardErrorFactory.mjs +8 -0
  68. package/lib/internal/_functionalTypeGuardErrorFactory.mjs.map +1 -1
  69. package/lib/internal/_httpFormDataReadArray.d.ts +9 -0
  70. package/lib/internal/_httpFormDataReadArray.js +9 -0
  71. package/lib/internal/_httpFormDataReadArray.js.map +1 -1
  72. package/lib/internal/_httpFormDataReadArray.mjs +9 -0
  73. package/lib/internal/_httpFormDataReadArray.mjs.map +1 -1
  74. package/lib/internal/_httpFormDataReadBigint.d.ts +12 -0
  75. package/lib/internal/_httpFormDataReadBigint.js +19 -5
  76. package/lib/internal/_httpFormDataReadBigint.js.map +1 -1
  77. package/lib/internal/_httpFormDataReadBigint.mjs +13 -1
  78. package/lib/internal/_httpFormDataReadBigint.mjs.map +1 -1
  79. package/lib/internal/_httpFormDataReadBlob.d.ts +11 -0
  80. package/lib/internal/_httpFormDataReadBlob.js +11 -0
  81. package/lib/internal/_httpFormDataReadBlob.js.map +1 -1
  82. package/lib/internal/_httpFormDataReadBlob.mjs +11 -0
  83. package/lib/internal/_httpFormDataReadBlob.mjs.map +1 -1
  84. package/lib/internal/_httpFormDataReadBoolean.d.ts +11 -0
  85. package/lib/internal/_httpFormDataReadBoolean.js +23 -10
  86. package/lib/internal/_httpFormDataReadBoolean.js.map +1 -1
  87. package/lib/internal/_httpFormDataReadBoolean.mjs +12 -1
  88. package/lib/internal/_httpFormDataReadBoolean.mjs.map +1 -1
  89. package/lib/internal/_httpFormDataReadFile.d.ts +11 -0
  90. package/lib/internal/_httpFormDataReadFile.js +11 -0
  91. package/lib/internal/_httpFormDataReadFile.js.map +1 -1
  92. package/lib/internal/_httpFormDataReadFile.mjs +11 -0
  93. package/lib/internal/_httpFormDataReadFile.mjs.map +1 -1
  94. package/lib/internal/_httpFormDataReadNumber.d.ts +11 -0
  95. package/lib/internal/_httpFormDataReadNumber.js +18 -5
  96. package/lib/internal/_httpFormDataReadNumber.js.map +1 -1
  97. package/lib/internal/_httpFormDataReadNumber.mjs +12 -1
  98. package/lib/internal/_httpFormDataReadNumber.mjs.map +1 -1
  99. package/lib/internal/_httpFormDataReadString.d.ts +14 -1
  100. package/lib/internal/_httpFormDataReadString.js +15 -2
  101. package/lib/internal/_httpFormDataReadString.js.map +1 -1
  102. package/lib/internal/_httpFormDataReadString.mjs +14 -1
  103. package/lib/internal/_httpFormDataReadString.mjs.map +1 -1
  104. package/lib/internal/_httpHeaderReadBigint.d.ts +11 -0
  105. package/lib/internal/_httpHeaderReadBigint.js +16 -1
  106. package/lib/internal/_httpHeaderReadBigint.js.map +1 -1
  107. package/lib/internal/_httpHeaderReadBigint.mjs +13 -1
  108. package/lib/internal/_httpHeaderReadBigint.mjs.map +1 -1
  109. package/lib/internal/_httpHeaderReadBoolean.d.ts +12 -0
  110. package/lib/internal/_httpHeaderReadBoolean.js +12 -0
  111. package/lib/internal/_httpHeaderReadBoolean.js.map +1 -1
  112. package/lib/internal/_httpHeaderReadBoolean.mjs +12 -0
  113. package/lib/internal/_httpHeaderReadBoolean.mjs.map +1 -1
  114. package/lib/internal/_httpHeaderReadNumber.d.ts +11 -0
  115. package/lib/internal/_httpHeaderReadNumber.js +16 -1
  116. package/lib/internal/_httpHeaderReadNumber.js.map +1 -1
  117. package/lib/internal/_httpHeaderReadNumber.mjs +13 -1
  118. package/lib/internal/_httpHeaderReadNumber.mjs.map +1 -1
  119. package/lib/internal/_httpParameterReadBigint.d.ts +11 -0
  120. package/lib/internal/_httpParameterReadBigint.js +15 -0
  121. package/lib/internal/_httpParameterReadBigint.js.map +1 -1
  122. package/lib/internal/_httpParameterReadBigint.mjs +12 -0
  123. package/lib/internal/_httpParameterReadBigint.mjs.map +1 -1
  124. package/lib/internal/_httpParameterReadBoolean.d.ts +11 -0
  125. package/lib/internal/_httpParameterReadBoolean.js +11 -0
  126. package/lib/internal/_httpParameterReadBoolean.js.map +1 -1
  127. package/lib/internal/_httpParameterReadBoolean.mjs +11 -0
  128. package/lib/internal/_httpParameterReadBoolean.mjs.map +1 -1
  129. package/lib/internal/_httpParameterReadNumber.d.ts +11 -0
  130. package/lib/internal/_httpParameterReadNumber.js +15 -0
  131. package/lib/internal/_httpParameterReadNumber.js.map +1 -1
  132. package/lib/internal/_httpParameterReadNumber.mjs +12 -0
  133. package/lib/internal/_httpParameterReadNumber.mjs.map +1 -1
  134. package/lib/internal/_httpParameterReadString.d.ts +14 -1
  135. package/lib/internal/_httpParameterReadString.js +14 -1
  136. package/lib/internal/_httpParameterReadString.js.map +1 -1
  137. package/lib/internal/_httpParameterReadString.mjs +14 -1
  138. package/lib/internal/_httpParameterReadString.mjs.map +1 -1
  139. package/lib/internal/_httpQueryParseURLSearchParams.d.ts +14 -0
  140. package/lib/internal/_httpQueryParseURLSearchParams.js +14 -0
  141. package/lib/internal/_httpQueryParseURLSearchParams.js.map +1 -1
  142. package/lib/internal/_httpQueryParseURLSearchParams.mjs +14 -0
  143. package/lib/internal/_httpQueryParseURLSearchParams.mjs.map +1 -1
  144. package/lib/internal/_httpQueryReadArray.d.ts +9 -0
  145. package/lib/internal/_httpQueryReadArray.js +9 -0
  146. package/lib/internal/_httpQueryReadArray.js.map +1 -1
  147. package/lib/internal/_httpQueryReadArray.mjs +9 -0
  148. package/lib/internal/_httpQueryReadArray.mjs.map +1 -1
  149. package/lib/internal/_httpQueryReadBigint.d.ts +11 -0
  150. package/lib/internal/_httpQueryReadBigint.js +19 -1
  151. package/lib/internal/_httpQueryReadBigint.js.map +1 -1
  152. package/lib/internal/_httpQueryReadBigint.mjs +12 -1
  153. package/lib/internal/_httpQueryReadBigint.mjs.map +1 -1
  154. package/lib/internal/_httpQueryReadBoolean.d.ts +12 -0
  155. package/lib/internal/_httpQueryReadBoolean.js +16 -1
  156. package/lib/internal/_httpQueryReadBoolean.js.map +1 -1
  157. package/lib/internal/_httpQueryReadBoolean.mjs +13 -1
  158. package/lib/internal/_httpQueryReadBoolean.mjs.map +1 -1
  159. package/lib/internal/_httpQueryReadNumber.d.ts +11 -0
  160. package/lib/internal/_httpQueryReadNumber.js +19 -1
  161. package/lib/internal/_httpQueryReadNumber.js.map +1 -1
  162. package/lib/internal/_httpQueryReadNumber.mjs +12 -1
  163. package/lib/internal/_httpQueryReadNumber.mjs.map +1 -1
  164. package/lib/internal/_httpQueryReadString.d.ts +14 -1
  165. package/lib/internal/_httpQueryReadString.js +14 -1
  166. package/lib/internal/_httpQueryReadString.js.map +1 -1
  167. package/lib/internal/_httpQueryReadString.mjs +14 -1
  168. package/lib/internal/_httpQueryReadString.mjs.map +1 -1
  169. package/lib/internal/_isBetween.d.ts +8 -0
  170. package/lib/internal/_isBetween.js +8 -0
  171. package/lib/internal/_isBetween.js.map +1 -1
  172. package/lib/internal/_isBetween.mjs +8 -0
  173. package/lib/internal/_isBetween.mjs.map +1 -1
  174. package/lib/internal/_isBigintString.d.ts +11 -0
  175. package/lib/internal/_isBigintString.js +11 -0
  176. package/lib/internal/_isBigintString.js.map +1 -1
  177. package/lib/internal/_isBigintString.mjs +11 -0
  178. package/lib/internal/_isBigintString.mjs.map +1 -1
  179. package/lib/internal/_isFormatByte.d.ts +12 -0
  180. package/lib/internal/_isFormatByte.js +12 -0
  181. package/lib/internal/_isFormatByte.js.map +1 -1
  182. package/lib/internal/_isFormatByte.mjs +12 -0
  183. package/lib/internal/_isFormatByte.mjs.map +1 -1
  184. package/lib/internal/_isFormatDate.d.ts +11 -0
  185. package/lib/internal/_isFormatDate.js +11 -0
  186. package/lib/internal/_isFormatDate.js.map +1 -1
  187. package/lib/internal/_isFormatDate.mjs +11 -0
  188. package/lib/internal/_isFormatDate.mjs.map +1 -1
  189. package/lib/internal/_isFormatDateTime.d.ts +13 -0
  190. package/lib/internal/_isFormatDateTime.js +13 -0
  191. package/lib/internal/_isFormatDateTime.js.map +1 -1
  192. package/lib/internal/_isFormatDateTime.mjs +13 -0
  193. package/lib/internal/_isFormatDateTime.mjs.map +1 -1
  194. package/lib/internal/_isFormatDuration.d.ts +13 -0
  195. package/lib/internal/_isFormatDuration.js +13 -0
  196. package/lib/internal/_isFormatDuration.js.map +1 -1
  197. package/lib/internal/_isFormatDuration.mjs +13 -0
  198. package/lib/internal/_isFormatDuration.mjs.map +1 -1
  199. package/lib/internal/_isFormatEmail.d.ts +13 -0
  200. package/lib/internal/_isFormatEmail.js +13 -0
  201. package/lib/internal/_isFormatEmail.js.map +1 -1
  202. package/lib/internal/_isFormatEmail.mjs +13 -0
  203. package/lib/internal/_isFormatEmail.mjs.map +1 -1
  204. package/lib/internal/_isFormatHostname.d.ts +12 -0
  205. package/lib/internal/_isFormatHostname.js +12 -0
  206. package/lib/internal/_isFormatHostname.js.map +1 -1
  207. package/lib/internal/_isFormatHostname.mjs +12 -0
  208. package/lib/internal/_isFormatHostname.mjs.map +1 -1
  209. package/lib/internal/_isFormatIdnEmail.d.ts +14 -0
  210. package/lib/internal/_isFormatIdnEmail.js +14 -0
  211. package/lib/internal/_isFormatIdnEmail.js.map +1 -1
  212. package/lib/internal/_isFormatIdnEmail.mjs +14 -0
  213. package/lib/internal/_isFormatIdnEmail.mjs.map +1 -1
  214. package/lib/internal/_isFormatIdnHostname.d.ts +14 -0
  215. package/lib/internal/_isFormatIdnHostname.js +14 -0
  216. package/lib/internal/_isFormatIdnHostname.js.map +1 -1
  217. package/lib/internal/_isFormatIdnHostname.mjs +14 -0
  218. package/lib/internal/_isFormatIdnHostname.mjs.map +1 -1
  219. package/lib/internal/_isFormatIpv4.d.ts +11 -0
  220. package/lib/internal/_isFormatIpv4.js +11 -0
  221. package/lib/internal/_isFormatIpv4.js.map +1 -1
  222. package/lib/internal/_isFormatIpv4.mjs +11 -0
  223. package/lib/internal/_isFormatIpv4.mjs.map +1 -1
  224. package/lib/internal/_isFormatIpv6.d.ts +12 -0
  225. package/lib/internal/_isFormatIpv6.js +12 -0
  226. package/lib/internal/_isFormatIpv6.js.map +1 -1
  227. package/lib/internal/_isFormatIpv6.mjs +12 -0
  228. package/lib/internal/_isFormatIpv6.mjs.map +1 -1
  229. package/lib/internal/_isFormatIri.d.ts +11 -0
  230. package/lib/internal/_isFormatIri.js +11 -0
  231. package/lib/internal/_isFormatIri.js.map +1 -1
  232. package/lib/internal/_isFormatIri.mjs +11 -0
  233. package/lib/internal/_isFormatIri.mjs.map +1 -1
  234. package/lib/internal/_isFormatIriReference.d.ts +13 -0
  235. package/lib/internal/_isFormatIriReference.js +13 -0
  236. package/lib/internal/_isFormatIriReference.js.map +1 -1
  237. package/lib/internal/_isFormatIriReference.mjs +13 -0
  238. package/lib/internal/_isFormatIriReference.mjs.map +1 -1
  239. package/lib/internal/_isFormatJsonPointer.d.ts +11 -0
  240. package/lib/internal/_isFormatJsonPointer.js +11 -0
  241. package/lib/internal/_isFormatJsonPointer.js.map +1 -1
  242. package/lib/internal/_isFormatJsonPointer.mjs +11 -0
  243. package/lib/internal/_isFormatJsonPointer.mjs.map +1 -1
  244. package/lib/internal/_isFormatPassword.d.ts +11 -0
  245. package/lib/internal/_isFormatPassword.js +11 -0
  246. package/lib/internal/_isFormatPassword.js.map +1 -1
  247. package/lib/internal/_isFormatPassword.mjs +11 -0
  248. package/lib/internal/_isFormatPassword.mjs.map +1 -1
  249. package/lib/internal/_isFormatRegex.d.ts +11 -0
  250. package/lib/internal/_isFormatRegex.js +11 -0
  251. package/lib/internal/_isFormatRegex.js.map +1 -1
  252. package/lib/internal/_isFormatRegex.mjs +11 -0
  253. package/lib/internal/_isFormatRegex.mjs.map +1 -1
  254. package/lib/internal/_isFormatRelativeJsonPointer.d.ts +11 -0
  255. package/lib/internal/_isFormatRelativeJsonPointer.js +11 -0
  256. package/lib/internal/_isFormatRelativeJsonPointer.js.map +1 -1
  257. package/lib/internal/_isFormatRelativeJsonPointer.mjs +11 -0
  258. package/lib/internal/_isFormatRelativeJsonPointer.mjs.map +1 -1
  259. package/lib/internal/_isFormatTime.d.ts +12 -0
  260. package/lib/internal/_isFormatTime.js +12 -0
  261. package/lib/internal/_isFormatTime.js.map +1 -1
  262. package/lib/internal/_isFormatTime.mjs +12 -0
  263. package/lib/internal/_isFormatTime.mjs.map +1 -1
  264. package/lib/internal/_isFormatUri.d.ts +15 -0
  265. package/lib/internal/_isFormatUri.js +15 -0
  266. package/lib/internal/_isFormatUri.js.map +1 -1
  267. package/lib/internal/_isFormatUri.mjs +15 -0
  268. package/lib/internal/_isFormatUri.mjs.map +1 -1
  269. package/lib/internal/_isFormatUriReference.d.ts +11 -0
  270. package/lib/internal/_isFormatUriReference.js +11 -0
  271. package/lib/internal/_isFormatUriReference.js.map +1 -1
  272. package/lib/internal/_isFormatUriReference.mjs +11 -0
  273. package/lib/internal/_isFormatUriReference.mjs.map +1 -1
  274. package/lib/internal/_isFormatUriTemplate.d.ts +13 -0
  275. package/lib/internal/_isFormatUriTemplate.js +14 -1
  276. package/lib/internal/_isFormatUriTemplate.js.map +1 -1
  277. package/lib/internal/_isFormatUriTemplate.mjs +14 -1
  278. package/lib/internal/_isFormatUriTemplate.mjs.map +1 -1
  279. package/lib/internal/_isFormatUrl.d.ts +15 -0
  280. package/lib/internal/_isFormatUrl.js +15 -0
  281. package/lib/internal/_isFormatUrl.js.map +1 -1
  282. package/lib/internal/_isFormatUrl.mjs +15 -0
  283. package/lib/internal/_isFormatUrl.mjs.map +1 -1
  284. package/lib/internal/_isFormatUuid.d.ts +11 -0
  285. package/lib/internal/_isFormatUuid.js +11 -0
  286. package/lib/internal/_isFormatUuid.js.map +1 -1
  287. package/lib/internal/_isFormatUuid.mjs +11 -0
  288. package/lib/internal/_isFormatUuid.mjs.map +1 -1
  289. package/lib/internal/_isMultipleOf.d.ts +11 -0
  290. package/lib/internal/_isMultipleOf.js +11 -0
  291. package/lib/internal/_isMultipleOf.js.map +1 -1
  292. package/lib/internal/_isMultipleOf.mjs +11 -0
  293. package/lib/internal/_isMultipleOf.mjs.map +1 -1
  294. package/lib/internal/_isTypeFloat.d.ts +9 -0
  295. package/lib/internal/_isTypeFloat.js +9 -0
  296. package/lib/internal/_isTypeFloat.js.map +1 -1
  297. package/lib/internal/_isTypeFloat.mjs +9 -0
  298. package/lib/internal/_isTypeFloat.mjs.map +1 -1
  299. package/lib/internal/_isTypeInt16.d.ts +8 -0
  300. package/lib/internal/_isTypeInt16.js +8 -0
  301. package/lib/internal/_isTypeInt16.js.map +1 -1
  302. package/lib/internal/_isTypeInt16.mjs +8 -0
  303. package/lib/internal/_isTypeInt16.mjs.map +1 -1
  304. package/lib/internal/_isTypeInt32.d.ts +8 -0
  305. package/lib/internal/_isTypeInt32.js +8 -0
  306. package/lib/internal/_isTypeInt32.js.map +1 -1
  307. package/lib/internal/_isTypeInt32.mjs +8 -0
  308. package/lib/internal/_isTypeInt32.mjs.map +1 -1
  309. package/lib/internal/_isTypeInt64.d.ts +11 -0
  310. package/lib/internal/_isTypeInt64.js +11 -0
  311. package/lib/internal/_isTypeInt64.js.map +1 -1
  312. package/lib/internal/_isTypeInt64.mjs +11 -0
  313. package/lib/internal/_isTypeInt64.mjs.map +1 -1
  314. package/lib/internal/_isTypeInt64Bigint.d.ts +8 -0
  315. package/lib/internal/_isTypeInt64Bigint.js +8 -0
  316. package/lib/internal/_isTypeInt64Bigint.js.map +1 -1
  317. package/lib/internal/_isTypeInt64Bigint.mjs +8 -0
  318. package/lib/internal/_isTypeInt64Bigint.mjs.map +1 -1
  319. package/lib/internal/_isTypeInt8.d.ts +8 -0
  320. package/lib/internal/_isTypeInt8.js +8 -0
  321. package/lib/internal/_isTypeInt8.js.map +1 -1
  322. package/lib/internal/_isTypeInt8.mjs +8 -0
  323. package/lib/internal/_isTypeInt8.mjs.map +1 -1
  324. package/lib/internal/_isTypeUint16.d.ts +8 -0
  325. package/lib/internal/_isTypeUint16.js +8 -0
  326. package/lib/internal/_isTypeUint16.js.map +1 -1
  327. package/lib/internal/_isTypeUint16.mjs +8 -0
  328. package/lib/internal/_isTypeUint16.mjs.map +1 -1
  329. package/lib/internal/_isTypeUint32.d.ts +8 -0
  330. package/lib/internal/_isTypeUint32.js +8 -0
  331. package/lib/internal/_isTypeUint32.js.map +1 -1
  332. package/lib/internal/_isTypeUint32.mjs +8 -0
  333. package/lib/internal/_isTypeUint32.mjs.map +1 -1
  334. package/lib/internal/_isTypeUint64.d.ts +11 -0
  335. package/lib/internal/_isTypeUint64.js +11 -0
  336. package/lib/internal/_isTypeUint64.js.map +1 -1
  337. package/lib/internal/_isTypeUint64.mjs +11 -0
  338. package/lib/internal/_isTypeUint64.mjs.map +1 -1
  339. package/lib/internal/_isTypeUint64Bigint.d.ts +8 -0
  340. package/lib/internal/_isTypeUint64Bigint.js +8 -0
  341. package/lib/internal/_isTypeUint64Bigint.js.map +1 -1
  342. package/lib/internal/_isTypeUint64Bigint.mjs +8 -0
  343. package/lib/internal/_isTypeUint64Bigint.mjs.map +1 -1
  344. package/lib/internal/_isTypeUint8.d.ts +8 -0
  345. package/lib/internal/_isTypeUint8.js +8 -0
  346. package/lib/internal/_isTypeUint8.js.map +1 -1
  347. package/lib/internal/_isTypeUint8.mjs +8 -0
  348. package/lib/internal/_isTypeUint8.mjs.map +1 -1
  349. package/lib/internal/_isUniqueItems.d.ts +17 -0
  350. package/lib/internal/_isUniqueItems.js +58 -0
  351. package/lib/internal/_isUniqueItems.js.map +1 -1
  352. package/lib/internal/_isUniqueItems.mjs +41 -0
  353. package/lib/internal/_isUniqueItems.mjs.map +1 -1
  354. package/lib/internal/_jsonStringifyArray.js +2 -0
  355. package/lib/internal/_jsonStringifyArray.js.map +1 -1
  356. package/lib/internal/_jsonStringifyArray.mjs +2 -0
  357. package/lib/internal/_jsonStringifyArray.mjs.map +1 -1
  358. package/lib/internal/_jsonStringifyElement.js +2 -0
  359. package/lib/internal/_jsonStringifyElement.js.map +1 -1
  360. package/lib/internal/_jsonStringifyElement.mjs +2 -0
  361. package/lib/internal/_jsonStringifyElement.mjs.map +1 -1
  362. package/lib/internal/_jsonStringifyNumber.d.ts +9 -0
  363. package/lib/internal/_jsonStringifyNumber.js +9 -0
  364. package/lib/internal/_jsonStringifyNumber.js.map +1 -1
  365. package/lib/internal/_jsonStringifyNumber.mjs +9 -0
  366. package/lib/internal/_jsonStringifyNumber.mjs.map +1 -1
  367. package/lib/internal/_jsonStringifyProperty.js +3 -1
  368. package/lib/internal/_jsonStringifyProperty.js.map +1 -1
  369. package/lib/internal/_jsonStringifyProperty.mjs +3 -1
  370. package/lib/internal/_jsonStringifyProperty.mjs.map +1 -1
  371. package/lib/internal/_jsonStringifyRest.d.ts +11 -0
  372. package/lib/internal/_jsonStringifyRest.js +11 -0
  373. package/lib/internal/_jsonStringifyRest.js.map +1 -1
  374. package/lib/internal/_jsonStringifyRest.mjs +11 -0
  375. package/lib/internal/_jsonStringifyRest.mjs.map +1 -1
  376. package/lib/internal/_jsonStringifyString.d.ts +13 -0
  377. package/lib/internal/_jsonStringifyString.js +13 -0
  378. package/lib/internal/_jsonStringifyString.js.map +1 -1
  379. package/lib/internal/_jsonStringifyString.mjs +13 -0
  380. package/lib/internal/_jsonStringifyString.mjs.map +1 -1
  381. package/lib/internal/_jsonStringifyTail.d.ts +8 -0
  382. package/lib/internal/_jsonStringifyTail.js +8 -0
  383. package/lib/internal/_jsonStringifyTail.js.map +1 -1
  384. package/lib/internal/_jsonStringifyTail.mjs +8 -0
  385. package/lib/internal/_jsonStringifyTail.mjs.map +1 -1
  386. package/lib/internal/_llmApplicationFinalize.d.ts +13 -0
  387. package/lib/internal/_llmApplicationFinalize.js +13 -0
  388. package/lib/internal/_llmApplicationFinalize.js.map +1 -1
  389. package/lib/internal/_llmApplicationFinalize.mjs +13 -0
  390. package/lib/internal/_llmApplicationFinalize.mjs.map +1 -1
  391. package/lib/internal/_notationAny.d.ts +14 -0
  392. package/lib/internal/_notationAny.js +14 -0
  393. package/lib/internal/_notationAny.js.map +1 -1
  394. package/lib/internal/_notationAny.mjs +14 -0
  395. package/lib/internal/_notationAny.mjs.map +1 -1
  396. package/lib/internal/_notationAssign.d.ts +12 -0
  397. package/lib/internal/_notationAssign.js +12 -0
  398. package/lib/internal/_notationAssign.js.map +1 -1
  399. package/lib/internal/_notationAssign.mjs +12 -0
  400. package/lib/internal/_notationAssign.mjs.map +1 -1
  401. package/lib/internal/_notationKebab.d.ts +9 -0
  402. package/lib/internal/_notationKebab.js +9 -0
  403. package/lib/internal/_notationKebab.js.map +1 -1
  404. package/lib/internal/_notationKebab.mjs +9 -0
  405. package/lib/internal/_notationKebab.mjs.map +1 -1
  406. package/lib/internal/_notationKeyCollision.d.ts +8 -0
  407. package/lib/internal/_notationKeyCollision.js +8 -0
  408. package/lib/internal/_notationKeyCollision.js.map +1 -1
  409. package/lib/internal/_notationKeyCollision.mjs +8 -0
  410. package/lib/internal/_notationKeyCollision.mjs.map +1 -1
  411. package/lib/internal/_notationSnake.d.ts +12 -0
  412. package/lib/internal/_notationSnake.js +12 -0
  413. package/lib/internal/_notationSnake.js.map +1 -1
  414. package/lib/internal/_notationSnake.mjs +12 -0
  415. package/lib/internal/_notationSnake.mjs.map +1 -1
  416. package/lib/internal/_parseLlmArguments.d.ts +12 -0
  417. package/lib/internal/_parseLlmArguments.js +12 -0
  418. package/lib/internal/_parseLlmArguments.js.map +1 -1
  419. package/lib/internal/_parseLlmArguments.mjs +12 -0
  420. package/lib/internal/_parseLlmArguments.mjs.map +1 -1
  421. package/lib/internal/_plainCloneAny.d.ts +15 -0
  422. package/lib/internal/_plainCloneAny.js +15 -0
  423. package/lib/internal/_plainCloneAny.js.map +1 -1
  424. package/lib/internal/_plainCloneAny.mjs +15 -0
  425. package/lib/internal/_plainCloneAny.mjs.map +1 -1
  426. package/lib/internal/_randomArray.d.ts +19 -1
  427. package/lib/internal/_randomArray.js +32 -14
  428. package/lib/internal/_randomArray.js.map +1 -1
  429. package/lib/internal/_randomArray.mjs +24 -6
  430. package/lib/internal/_randomArray.mjs.map +1 -1
  431. package/lib/internal/_randomBigint.d.ts +17 -1
  432. package/lib/internal/_randomBigint.js +95 -2
  433. package/lib/internal/_randomBigint.js.map +1 -1
  434. package/lib/internal/_randomBigint.mjs +75 -2
  435. package/lib/internal/_randomBigint.mjs.map +1 -1
  436. package/lib/internal/_randomBoolean.d.ts +8 -0
  437. package/lib/internal/_randomBoolean.js +8 -0
  438. package/lib/internal/_randomBoolean.js.map +1 -1
  439. package/lib/internal/_randomBoolean.mjs +8 -0
  440. package/lib/internal/_randomBoolean.mjs.map +1 -1
  441. package/lib/internal/_randomFormatByte.d.ts +8 -0
  442. package/lib/internal/_randomFormatByte.js +8 -0
  443. package/lib/internal/_randomFormatByte.js.map +1 -1
  444. package/lib/internal/_randomFormatByte.mjs +8 -0
  445. package/lib/internal/_randomFormatByte.mjs.map +1 -1
  446. package/lib/internal/_randomFormatDate.d.ts +10 -0
  447. package/lib/internal/_randomFormatDate.js +10 -0
  448. package/lib/internal/_randomFormatDate.js.map +1 -1
  449. package/lib/internal/_randomFormatDate.mjs +10 -0
  450. package/lib/internal/_randomFormatDate.mjs.map +1 -1
  451. package/lib/internal/_randomFormatDatetime.d.ts +10 -0
  452. package/lib/internal/_randomFormatDatetime.js +10 -0
  453. package/lib/internal/_randomFormatDatetime.js.map +1 -1
  454. package/lib/internal/_randomFormatDatetime.mjs +10 -0
  455. package/lib/internal/_randomFormatDatetime.mjs.map +1 -1
  456. package/lib/internal/_randomFormatDuration.d.ts +8 -0
  457. package/lib/internal/_randomFormatDuration.js +8 -0
  458. package/lib/internal/_randomFormatDuration.js.map +1 -1
  459. package/lib/internal/_randomFormatDuration.mjs +8 -0
  460. package/lib/internal/_randomFormatDuration.mjs.map +1 -1
  461. package/lib/internal/_randomFormatEmail.d.ts +8 -0
  462. package/lib/internal/_randomFormatEmail.js +8 -0
  463. package/lib/internal/_randomFormatEmail.js.map +1 -1
  464. package/lib/internal/_randomFormatEmail.mjs +8 -0
  465. package/lib/internal/_randomFormatEmail.mjs.map +1 -1
  466. package/lib/internal/_randomFormatHostname.d.ts +15 -1
  467. package/lib/internal/_randomFormatHostname.js +15 -1
  468. package/lib/internal/_randomFormatHostname.js.map +1 -1
  469. package/lib/internal/_randomFormatHostname.mjs +15 -1
  470. package/lib/internal/_randomFormatHostname.mjs.map +1 -1
  471. package/lib/internal/_randomFormatIdnEmail.d.ts +13 -0
  472. package/lib/internal/_randomFormatIdnEmail.js +13 -0
  473. package/lib/internal/_randomFormatIdnEmail.js.map +1 -1
  474. package/lib/internal/_randomFormatIdnEmail.mjs +13 -0
  475. package/lib/internal/_randomFormatIdnEmail.mjs.map +1 -1
  476. package/lib/internal/_randomFormatIdnHostname.d.ts +12 -0
  477. package/lib/internal/_randomFormatIdnHostname.js +12 -0
  478. package/lib/internal/_randomFormatIdnHostname.js.map +1 -1
  479. package/lib/internal/_randomFormatIdnHostname.mjs +12 -0
  480. package/lib/internal/_randomFormatIdnHostname.mjs.map +1 -1
  481. package/lib/internal/_randomFormatIpv4.d.ts +8 -0
  482. package/lib/internal/_randomFormatIpv4.js +8 -0
  483. package/lib/internal/_randomFormatIpv4.js.map +1 -1
  484. package/lib/internal/_randomFormatIpv4.mjs +8 -0
  485. package/lib/internal/_randomFormatIpv4.mjs.map +1 -1
  486. package/lib/internal/_randomFormatIpv6.d.ts +8 -0
  487. package/lib/internal/_randomFormatIpv6.js +8 -0
  488. package/lib/internal/_randomFormatIpv6.js.map +1 -1
  489. package/lib/internal/_randomFormatIpv6.mjs +8 -0
  490. package/lib/internal/_randomFormatIpv6.mjs.map +1 -1
  491. package/lib/internal/_randomFormatIri.d.ts +11 -0
  492. package/lib/internal/_randomFormatIri.js +11 -0
  493. package/lib/internal/_randomFormatIri.js.map +1 -1
  494. package/lib/internal/_randomFormatIri.mjs +11 -0
  495. package/lib/internal/_randomFormatIri.mjs.map +1 -1
  496. package/lib/internal/_randomFormatIriReference.d.ts +12 -0
  497. package/lib/internal/_randomFormatIriReference.js +12 -0
  498. package/lib/internal/_randomFormatIriReference.js.map +1 -1
  499. package/lib/internal/_randomFormatIriReference.mjs +12 -0
  500. package/lib/internal/_randomFormatIriReference.mjs.map +1 -1
  501. package/lib/internal/_randomFormatJsonPointer.d.ts +12 -0
  502. package/lib/internal/_randomFormatJsonPointer.js +12 -0
  503. package/lib/internal/_randomFormatJsonPointer.js.map +1 -1
  504. package/lib/internal/_randomFormatJsonPointer.mjs +12 -0
  505. package/lib/internal/_randomFormatJsonPointer.mjs.map +1 -1
  506. package/lib/internal/_randomFormatPassword.d.ts +13 -0
  507. package/lib/internal/_randomFormatPassword.js +13 -0
  508. package/lib/internal/_randomFormatPassword.js.map +1 -1
  509. package/lib/internal/_randomFormatPassword.mjs +13 -0
  510. package/lib/internal/_randomFormatPassword.mjs.map +1 -1
  511. package/lib/internal/_randomFormatRegex.d.ts +8 -0
  512. package/lib/internal/_randomFormatRegex.js +8 -0
  513. package/lib/internal/_randomFormatRegex.js.map +1 -1
  514. package/lib/internal/_randomFormatRegex.mjs +8 -0
  515. package/lib/internal/_randomFormatRegex.mjs.map +1 -1
  516. package/lib/internal/_randomFormatRelativeJsonPointer.d.ts +8 -0
  517. package/lib/internal/_randomFormatRelativeJsonPointer.js +8 -0
  518. package/lib/internal/_randomFormatRelativeJsonPointer.js.map +1 -1
  519. package/lib/internal/_randomFormatRelativeJsonPointer.mjs +8 -0
  520. package/lib/internal/_randomFormatRelativeJsonPointer.mjs.map +1 -1
  521. package/lib/internal/_randomFormatTime.d.ts +13 -0
  522. package/lib/internal/_randomFormatTime.js +13 -0
  523. package/lib/internal/_randomFormatTime.js.map +1 -1
  524. package/lib/internal/_randomFormatTime.mjs +13 -0
  525. package/lib/internal/_randomFormatTime.mjs.map +1 -1
  526. package/lib/internal/_randomFormatUri.d.ts +12 -0
  527. package/lib/internal/_randomFormatUri.js +12 -0
  528. package/lib/internal/_randomFormatUri.js.map +1 -1
  529. package/lib/internal/_randomFormatUri.mjs +12 -0
  530. package/lib/internal/_randomFormatUri.mjs.map +1 -1
  531. package/lib/internal/_randomFormatUriReference.d.ts +12 -0
  532. package/lib/internal/_randomFormatUriReference.js +12 -0
  533. package/lib/internal/_randomFormatUriReference.js.map +1 -1
  534. package/lib/internal/_randomFormatUriReference.mjs +12 -0
  535. package/lib/internal/_randomFormatUriReference.mjs.map +1 -1
  536. package/lib/internal/_randomFormatUriTemplate.d.ts +12 -0
  537. package/lib/internal/_randomFormatUriTemplate.js +12 -0
  538. package/lib/internal/_randomFormatUriTemplate.js.map +1 -1
  539. package/lib/internal/_randomFormatUriTemplate.mjs +12 -0
  540. package/lib/internal/_randomFormatUriTemplate.mjs.map +1 -1
  541. package/lib/internal/_randomFormatUrl.d.ts +12 -0
  542. package/lib/internal/_randomFormatUrl.js +12 -0
  543. package/lib/internal/_randomFormatUrl.js.map +1 -1
  544. package/lib/internal/_randomFormatUrl.mjs +12 -0
  545. package/lib/internal/_randomFormatUrl.mjs.map +1 -1
  546. package/lib/internal/_randomFormatUuid.d.ts +13 -0
  547. package/lib/internal/_randomFormatUuid.js +13 -0
  548. package/lib/internal/_randomFormatUuid.js.map +1 -1
  549. package/lib/internal/_randomFormatUuid.mjs +13 -0
  550. package/lib/internal/_randomFormatUuid.mjs.map +1 -1
  551. package/lib/internal/_randomInteger.d.ts +17 -1
  552. package/lib/internal/_randomInteger.js +74 -23
  553. package/lib/internal/_randomInteger.js.map +1 -1
  554. package/lib/internal/_randomInteger.mjs +62 -23
  555. package/lib/internal/_randomInteger.mjs.map +1 -1
  556. package/lib/internal/_randomMultiple.d.ts +18 -1
  557. package/lib/internal/_randomMultiple.js +30 -13
  558. package/lib/internal/_randomMultiple.js.map +1 -1
  559. package/lib/internal/_randomMultiple.mjs +30 -13
  560. package/lib/internal/_randomMultiple.mjs.map +1 -1
  561. package/lib/internal/_randomNumber.d.ts +17 -1
  562. package/lib/internal/_randomNumber.js +67 -18
  563. package/lib/internal/_randomNumber.js.map +1 -1
  564. package/lib/internal/_randomNumber.mjs +59 -22
  565. package/lib/internal/_randomNumber.mjs.map +1 -1
  566. package/lib/internal/_randomPattern.d.ts +12 -0
  567. package/lib/internal/_randomPattern.js +12 -0
  568. package/lib/internal/_randomPattern.js.map +1 -1
  569. package/lib/internal/_randomPattern.mjs +12 -0
  570. package/lib/internal/_randomPattern.mjs.map +1 -1
  571. package/lib/internal/_randomPick.d.ts +13 -1
  572. package/lib/internal/_randomPick.js +15 -3
  573. package/lib/internal/_randomPick.js.map +1 -1
  574. package/lib/internal/_randomPick.mjs +15 -3
  575. package/lib/internal/_randomPick.mjs.map +1 -1
  576. package/lib/internal/_randomString.d.ts +15 -1
  577. package/lib/internal/_randomString.js +19 -5
  578. package/lib/internal/_randomString.js.map +1 -1
  579. package/lib/internal/_randomString.mjs +19 -5
  580. package/lib/internal/_randomString.mjs.map +1 -1
  581. package/lib/internal/_randomStringLength.d.ts +30 -1
  582. package/lib/internal/_randomStringLength.js +23 -1
  583. package/lib/internal/_randomStringLength.js.map +1 -1
  584. package/lib/internal/_randomStringLength.mjs +23 -1
  585. package/lib/internal/_randomStringLength.mjs.map +1 -1
  586. package/lib/internal/_stringLength.d.ts +11 -0
  587. package/lib/internal/_stringLength.js +11 -0
  588. package/lib/internal/_stringLength.js.map +1 -1
  589. package/lib/internal/_stringLength.mjs +11 -0
  590. package/lib/internal/_stringLength.mjs.map +1 -1
  591. package/lib/internal/_stringLengthGte.d.ts +11 -0
  592. package/lib/internal/_stringLengthGte.js +11 -0
  593. package/lib/internal/_stringLengthGte.js.map +1 -1
  594. package/lib/internal/_stringLengthGte.mjs +11 -0
  595. package/lib/internal/_stringLengthGte.mjs.map +1 -1
  596. package/lib/internal/_stringLengthLte.d.ts +11 -0
  597. package/lib/internal/_stringLengthLte.js +11 -0
  598. package/lib/internal/_stringLengthLte.js.map +1 -1
  599. package/lib/internal/_stringLengthLte.mjs +11 -0
  600. package/lib/internal/_stringLengthLte.mjs.map +1 -1
  601. package/lib/internal/_throwTypeGuardError.d.ts +9 -0
  602. package/lib/internal/_throwTypeGuardError.js +9 -0
  603. package/lib/internal/_throwTypeGuardError.js.map +1 -1
  604. package/lib/internal/_throwTypeGuardError.mjs +9 -0
  605. package/lib/internal/_throwTypeGuardError.mjs.map +1 -1
  606. package/lib/internal/_validateReport.d.ts +15 -0
  607. package/lib/internal/_validateReport.js +15 -0
  608. package/lib/internal/_validateReport.js.map +1 -1
  609. package/lib/internal/_validateReport.mjs +15 -0
  610. package/lib/internal/_validateReport.mjs.map +1 -1
  611. package/lib/internal/private/__notationRename.d.ts +5 -0
  612. package/lib/internal/private/__notationRename.js +5 -0
  613. package/lib/internal/private/__notationRename.js.map +1 -1
  614. package/lib/internal/private/__notationRename.mjs +5 -0
  615. package/lib/internal/private/__notationRename.mjs.map +1 -1
  616. package/lib/internal/private/__randomComposition.d.ts +27 -3
  617. package/lib/internal/private/__randomComposition.js +27 -3
  618. package/lib/internal/private/__randomComposition.js.map +1 -1
  619. package/lib/internal/private/__randomComposition.mjs +27 -3
  620. package/lib/internal/private/__randomComposition.mjs.map +1 -1
  621. package/lib/internal/private/__randomEpoch.d.ts +15 -0
  622. package/lib/internal/private/__randomEpoch.js +5 -0
  623. package/lib/internal/private/__randomEpoch.js.map +1 -1
  624. package/lib/internal/private/__randomEpoch.mjs +5 -0
  625. package/lib/internal/private/__randomEpoch.mjs.map +1 -1
  626. package/lib/json.d.ts +49 -14
  627. package/lib/json.js.map +1 -1
  628. package/lib/json.mjs.map +1 -1
  629. package/lib/llm.d.ts +41 -25
  630. package/lib/llm.js.map +1 -1
  631. package/lib/llm.mjs.map +1 -1
  632. package/lib/module.d.ts +1 -702
  633. package/lib/module.js +1 -101
  634. package/lib/module.js.map +1 -1
  635. package/lib/module.mjs +1 -81
  636. package/lib/module.mjs.map +1 -1
  637. package/lib/notations.d.ts +60 -0
  638. package/lib/notations.js.map +1 -1
  639. package/lib/notations.mjs.map +1 -1
  640. package/lib/plain.d.ts +38 -0
  641. package/lib/plain.js.map +1 -1
  642. package/lib/plain.mjs.map +1 -1
  643. package/lib/protobuf.d.ts +38 -4
  644. package/lib/protobuf.js.map +1 -1
  645. package/lib/protobuf.mjs.map +1 -1
  646. package/lib/reflect.d.ts +16 -12
  647. package/lib/reflect.js.map +1 -1
  648. package/lib/reflect.mjs.map +1 -1
  649. package/lib/transform.d.ts +17 -0
  650. package/lib/transform.js +17 -0
  651. package/lib/transform.js.map +1 -1
  652. package/lib/transform.mjs +17 -0
  653. package/lib/transform.mjs.map +1 -1
  654. package/native/adapter/adapter.go +28 -3
  655. package/native/adapter/adapter_options_branch_matrix_test.go +39 -34
  656. package/native/adapter/plugin_options.go +5 -0
  657. package/native/adapter/plugin_options_payload_matrix_test.go +5 -0
  658. package/native/cmd/ttsc-typia/any_array_type_tags_transform_test.go +38 -131
  659. package/native/cmd/ttsc-typia/assert_guard_factory_contract_test.go +31 -58
  660. package/native/cmd/ttsc-typia/atomic_intersection_schema_transform_test.go +28 -79
  661. package/native/cmd/ttsc-typia/bigint_literal_precision_transform_test.go +16 -82
  662. package/native/cmd/ttsc-typia/build_diagnostics_preserve_details_test.go +41 -0
  663. package/native/cmd/ttsc-typia/build_no_emit_preserves_analysis_options_test.go +9 -10
  664. package/native/cmd/ttsc-typia/build_no_emit_transform_diagnostics_test.go +9 -7
  665. package/native/cmd/ttsc-typia/build_plugin_options_come_from_payload_test.go +9 -11
  666. package/native/cmd/ttsc-typia/build_transactional_emit_success_test.go +9 -7
  667. package/native/cmd/ttsc-typia/build_transform_failure_atomicity_test.go +9 -7
  668. package/native/cmd/ttsc-typia/callable_interface_function_semantics_transform_test.go +9 -164
  669. package/native/cmd/ttsc-typia/callable_type_literal_boundaries_transform_test.go +20 -580
  670. package/native/cmd/ttsc-typia/compare_equal_cover_transform_test.go +10 -127
  671. package/native/cmd/ttsc-typia/compare_functional_union_membership_transform_test.go +93 -289
  672. package/native/cmd/ttsc-typia/compare_less_nan_transform_test.go +15 -66
  673. package/native/cmd/ttsc-typia/compare_nondiscriminable_union_transform_test.go +9 -221
  674. package/native/cmd/ttsc-typia/create_assert_error_factory_arity_test.go +11 -82
  675. package/native/cmd/ttsc-typia/default_library_spoof_native_identity_transform_test.go +10 -100
  676. package/native/cmd/ttsc-typia/demo_rejects_bad_flag_test.go +15 -14
  677. package/native/cmd/ttsc-typia/dependency_collector_virtual_scheme_test.go +8 -17
  678. package/native/cmd/ttsc-typia/dynamic_key_path_helper_alias_transform_test.go +10 -70
  679. package/native/cmd/ttsc-typia/dynamic_key_tags_transform_test.go +9 -120
  680. package/native/cmd/ttsc-typia/exact_optional_family_emission_contract_test.go +252 -0
  681. package/native/cmd/ttsc-typia/exclude_type_tag_transform_test.go +10 -102
  682. package/native/cmd/ttsc-typia/fixture_directories_test.go +154 -0
  683. package/native/cmd/ttsc-typia/functional_promised_type_transform_test.go +11 -104
  684. package/native/cmd/ttsc-typia/functional_receiver_transform_test.go +16 -124
  685. package/native/cmd/ttsc-typia/inline_type_display_name_transform_test.go +10 -183
  686. package/native/cmd/ttsc-typia/instance_union_create_is_transform_test.go +11 -88
  687. package/native/cmd/ttsc-typia/intersection_nonsensible_backstop_transform_test.go +17 -30
  688. package/native/cmd/ttsc-typia/intersection_union_validation_transform_test.go +10 -404
  689. package/native/cmd/ttsc-typia/json_application_alias_function_validation_transform_test.go +10 -22
  690. package/native/cmd/ttsc-typia/json_is_stringify_scoped_checker_transform_test.go +10 -111
  691. package/native/cmd/ttsc-typia/json_schema_dynamic_key_determinism_transform_test.go +25 -110
  692. package/native/cmd/ttsc-typia/json_schema_nonsensible_intersection_diagnostic_test.go +10 -22
  693. package/native/cmd/ttsc-typia/json_stringify_constant_atomic_union_transform_test.go +10 -101
  694. package/native/cmd/ttsc-typia/lib_replacement_native_identity_transform_test.go +11 -98
  695. package/native/cmd/ttsc-typia/llm_evaluation_accepts_property_probability_test.go +5 -0
  696. package/native/cmd/ttsc-typia/llm_evaluation_accepts_unselected_source_probability_test.go +5 -0
  697. package/native/cmd/ttsc-typia/llm_evaluation_complete_object_shape_test.go +5 -0
  698. package/native/cmd/ttsc-typia/llm_evaluation_emits_configured_decimals_test.go +53 -0
  699. package/native/cmd/ttsc-typia/llm_evaluation_ignores_declaration_probability_without_call_test.go +5 -0
  700. package/native/cmd/ttsc-typia/llm_evaluation_plan_emission_transform_test.go +5 -0
  701. package/native/cmd/ttsc-typia/llm_evaluation_program_scan_dependencies_test.go +5 -0
  702. package/native/cmd/ttsc-typia/llm_evaluation_rejects_alias_comment_test.go +5 -0
  703. package/native/cmd/ttsc-typia/llm_evaluation_rejects_alias_refinement_test.go +5 -0
  704. package/native/cmd/ttsc-typia/llm_evaluation_rejects_computed_method_probability_test.go +5 -0
  705. package/native/cmd/ttsc-typia/llm_evaluation_rejects_conflicting_boolean_tags_test.go +52 -0
  706. package/native/cmd/ttsc-typia/llm_evaluation_rejects_finer_than_probability_decimals_test.go +100 -0
  707. package/native/cmd/ttsc-typia/llm_evaluation_rejects_imported_declaration_probability_test.go +6 -1
  708. package/native/cmd/ttsc-typia/llm_evaluation_rejects_invalid_config_test.go +51 -0
  709. package/native/cmd/ttsc-typia/llm_evaluation_rejects_invalid_probability_test.go +14 -0
  710. package/native/cmd/ttsc-typia/llm_evaluation_rejects_oversized_questions_test.go +79 -0
  711. package/native/cmd/ttsc-typia/llm_evaluation_rejects_refinements_test.go +5 -0
  712. package/native/cmd/ttsc-typia/llm_evaluation_rejects_shared_values_test.go +128 -0
  713. package/native/cmd/ttsc-typia/llm_evaluation_rejects_undecidable_types_test.go +6 -12
  714. package/native/cmd/ttsc-typia/local_function_named_like_typia_operation_transform_test.go +9 -17
  715. package/native/cmd/ttsc-typia/metadata_type_tag_sole_malformed_diagnostic_test.go +10 -28
  716. package/native/cmd/ttsc-typia/native_collection_identity_is_transform_test.go +9 -129
  717. package/native/cmd/ttsc-typia/native_generic_name_guard_is_transform_test.go +10 -95
  718. package/native/cmd/ttsc-typia/native_name_collision_is_transform_test.go +9 -122
  719. package/native/cmd/ttsc-typia/native_named_intersection_union_transform_test.go +10 -135
  720. package/native/cmd/ttsc-typia/node_buffer_native_exports_is_transform_test.go +18 -234
  721. package/native/cmd/ttsc-typia/non_trailing_rest_tuple_transform_test.go +19 -71
  722. package/native/cmd/ttsc-typia/notation_kebab_case_transform_test.go +10 -109
  723. package/native/cmd/ttsc-typia/notation_pascal_case_transform_test.go +10 -142
  724. package/native/cmd/ttsc-typia/notation_unicode_key_transform_test.go +9 -201
  725. package/native/cmd/ttsc-typia/nullable_primitive_property_is_transform_test.go +10 -102
  726. package/native/cmd/ttsc-typia/object_custom_tag_validation_transform_test.go +10 -112
  727. package/native/cmd/ttsc-typia/object_union_explicit_pointer_schema_transform_test.go +68 -114
  728. package/native/cmd/ttsc-typia/package_declaration_native_identity_is_transform_test.go +10 -114
  729. package/native/cmd/ttsc-typia/pattern_line_terminator_escape_transform_test.go +45 -123
  730. package/native/cmd/ttsc-typia/plain_classify_class_ref_transform_test.go +12 -97
  731. package/native/cmd/ttsc-typia/plain_classify_container_seed_transform_test.go +12 -74
  732. package/native/cmd/ttsc-typia/plain_classify_cross_module_extra_transform_test.go +15 -91
  733. package/native/cmd/ttsc-typia/plain_classify_cross_module_transform_test.go +40 -0
  734. package/native/cmd/ttsc-typia/plain_classify_deep_nested_transform_test.go +12 -103
  735. package/native/cmd/ttsc-typia/plain_classify_field_copy_transform_test.go +10 -120
  736. package/native/cmd/ttsc-typia/plain_classify_from_new_transform_test.go +12 -255
  737. package/native/cmd/ttsc-typia/plain_classify_generic_private_rejected_test.go +30 -0
  738. package/native/cmd/ttsc-typia/plain_classify_inherited_private_rejected_test.go +33 -0
  739. package/native/cmd/ttsc-typia/plain_classify_named_interface_field_copy_test.go +33 -0
  740. package/native/cmd/ttsc-typia/plain_classify_private_field_rejected_test.go +36 -0
  741. package/native/cmd/ttsc-typia/plain_classify_recursive_anonymous_object_test.go +30 -0
  742. package/native/cmd/ttsc-typia/plain_classify_self_ref_private_rejected_test.go +33 -0
  743. package/native/cmd/ttsc-typia/plain_classify_static_private_allowed_test.go +35 -0
  744. package/native/cmd/ttsc-typia/plain_classify_strategy_edges_transform_test.go +16 -291
  745. package/native/cmd/ttsc-typia/plain_classify_unbound_anonymous_class_test.go +35 -0
  746. package/native/cmd/ttsc-typia/plain_classify_union_transform_test.go +12 -73
  747. package/native/cmd/ttsc-typia/plain_classify_validated_union_transform_test.go +11 -146
  748. package/native/cmd/ttsc-typia/plain_clone_bigint_wrapper_transform_test.go +10 -80
  749. package/native/cmd/ttsc-typia/private_field_filter_is_transform_test.go +10 -137
  750. package/native/cmd/ttsc-typia/project_catalog_transform_coverage_test.go +4 -0
  751. package/native/cmd/ttsc-typia/project_dependencies_barrel_reexport_transform_test.go +6 -10
  752. package/native/cmd/ttsc-typia/project_dependencies_callee_argument_transform_test.go +6 -10
  753. package/native/cmd/ttsc-typia/project_dependencies_callee_barrel_transform_test.go +6 -10
  754. package/native/cmd/ttsc-typia/project_dependencies_callee_inference_transform_test.go +6 -10
  755. package/native/cmd/ttsc-typia/project_dependencies_callee_shape_transform_test.go +6 -10
  756. package/native/cmd/ttsc-typia/project_dependencies_callee_untransformed_barrel_transform_test.go +6 -10
  757. package/native/cmd/ttsc-typia/project_dependencies_collapsed_alias_transform_test.go +6 -10
  758. package/native/cmd/ttsc-typia/project_dependencies_complete_diagnostic_transform_test.go +7 -11
  759. package/native/cmd/ttsc-typia/project_dependencies_complete_envelope_transform_test.go +6 -10
  760. package/native/cmd/ttsc-typia/project_dependencies_complete_inferred_type_transform_test.go +6 -10
  761. package/native/cmd/ttsc-typia/project_dependencies_complete_replaced_library_transform_test.go +6 -10
  762. package/native/cmd/ttsc-typia/project_dependencies_complete_untouched_reprint_transform_test.go +6 -10
  763. package/native/cmd/ttsc-typia/project_dependencies_computed_key_transform_test.go +6 -10
  764. package/native/cmd/ttsc-typia/project_dependencies_custom_lib_name_transform_test.go +6 -10
  765. package/native/cmd/ttsc-typia/project_dependencies_default_barrel_transform_test.go +6 -10
  766. package/native/cmd/ttsc-typia/project_dependencies_empty_heritage_transform_test.go +6 -10
  767. package/native/cmd/ttsc-typia/project_dependencies_enum_member_value_transform_test.go +6 -10
  768. package/native/cmd/ttsc-typia/project_dependencies_envelope_transform_test.go +6 -10
  769. package/native/cmd/ttsc-typia/project_dependencies_index_signature_alias_transform_test.go +9 -12
  770. package/native/cmd/ttsc-typia/project_dependencies_inferred_declaration_transform_test.go +6 -10
  771. package/native/cmd/ttsc-typia/project_dependencies_jsdoc_typedef_transform_test.go +6 -10
  772. package/native/cmd/ttsc-typia/project_dependencies_local_reexport_transform_test.go +6 -10
  773. package/native/cmd/ttsc-typia/project_dependencies_named_tuple_member_transform_test.go +6 -10
  774. package/native/cmd/ttsc-typia/project_dependencies_qualified_barrel_transform_test.go +6 -10
  775. package/native/cmd/ttsc-typia/project_dependencies_signature_alias_transform_test.go +6 -10
  776. package/native/cmd/ttsc-typia/project_dependencies_star_barrel_transform_test.go +6 -10
  777. package/native/cmd/ttsc-typia/project_dependencies_type_parameter_default_transform_test.go +6 -10
  778. package/native/cmd/ttsc-typia/project_reference_graph_envelope_transform_test.go +10 -32
  779. package/native/cmd/ttsc-typia/protobuf_diagnostic_code_transform_test.go +9 -31
  780. package/native/cmd/ttsc-typia/protobuf_is_encode_finite_number_transform_test.go +10 -23
  781. package/native/cmd/ttsc-typia/protobuf_object_generic_union_encode_transform_test.go +12 -114
  782. package/native/cmd/ttsc-typia/protobuf_sequence_field_numbers_transform_test.go +9 -26
  783. package/native/cmd/ttsc-typia/random_recursive_min_items_diagnostic_test.go +26 -22
  784. package/native/cmd/ttsc-typia/random_unsatisfiable_recursive_diagnostic_test.go +10 -26
  785. package/native/cmd/ttsc-typia/recursive_conditional_alias_name_transform_test.go +10 -185
  786. package/native/cmd/ttsc-typia/recursive_visit_tracking_transform_test.go +10 -291
  787. package/native/cmd/ttsc-typia/reflect_literals_non_literal_rejection_transform_test.go +9 -28
  788. package/native/cmd/ttsc-typia/schema_dts_role_transform_test.go +11 -206
  789. package/native/cmd/ttsc-typia/schema_literal_helpers_test.go +110 -0
  790. package/native/cmd/ttsc-typia/shadowed_typia_module_declaration_diagnostic_test.go +9 -17
  791. package/native/cmd/ttsc-typia/shallow_depth_argument_error_transform_test.go +10 -24
  792. package/native/cmd/ttsc-typia/shallow_depth_limit_transform_test.go +10 -105
  793. package/native/cmd/ttsc-typia/shallow_nested_depth_transform_test.go +10 -24
  794. package/native/cmd/ttsc-typia/symbol_key_member_filter_transform_test.go +10 -147
  795. package/native/cmd/ttsc-typia/template_interpolation_type_tags_transform_test.go +10 -272
  796. package/native/cmd/ttsc-typia/template_literal_type_tags_transform_test.go +10 -92
  797. package/native/cmd/ttsc-typia/transform_diagnostics_preserve_details_test.go +9 -86
  798. package/native/cmd/ttsc-typia/transform_fixtures_emit_coverage_test.go +48 -29
  799. package/native/cmd/ttsc-typia/transform_helpers_test.go +41 -360
  800. package/native/cmd/ttsc-typia/transform_plugin_options_come_from_payload_test.go +9 -12
  801. package/native/cmd/ttsc-typia/transform_project_diagnostics_preserve_details_test.go +54 -0
  802. package/native/cmd/ttsc-typia/transform_single_file_failure_atomicity_test.go +9 -11
  803. package/native/cmd/ttsc-typia/transform_single_file_failure_writes_no_stdout_test.go +9 -8
  804. package/native/cmd/ttsc-typia/transform_single_file_js_distinguishes_same_basename_sources_test.go +9 -14
  805. package/native/cmd/ttsc-typia/transform_single_file_js_locates_output_across_layouts_test.go +9 -16
  806. package/native/cmd/ttsc-typia/transform_single_file_success_publishes_artifact_test.go +9 -9
  807. package/native/cmd/ttsc-typia/transform_wasm_host_argv_reports_diagnostics_test.go +9 -10
  808. package/native/cmd/ttsc-typia/tuple_optional_compare_clone_transform_test.go +33 -181
  809. package/native/cmd/ttsc-typia/typia_diagnostic_formatting_test.go +46 -0
  810. package/native/cmd/ttsc-typia/uri_template_comment_dotted_variable_transform_test.go +57 -0
  811. package/native/cmd/ttsc-typia/user_global_native_identity_transform_test.go +16 -202
  812. package/native/cmd/ttsc-typia/wrong_type_tag_target_diagnostic_test.go +12 -12
  813. package/native/core/context/EmitFactory.go +10 -0
  814. package/native/core/context/IProgrammerProps.go +21 -4
  815. package/native/core/context/ITransformOptions.go +22 -4
  816. package/native/core/context/ITypiaContext.go +61 -11
  817. package/native/core/context/ImportProgrammer.go +144 -6
  818. package/native/core/context/TransformerError.go +74 -7
  819. package/native/core/context/import_programmer_default_type_only_needs_every_request_test.go +58 -0
  820. package/native/core/context/import_programmer_module_identifier_test.go +5 -0
  821. package/native/core/context/import_programmer_statement_coverage_test.go +106 -50
  822. package/native/core/context/transformer_error_formatting_test.go +82 -77
  823. package/native/core/factories/CommentFactory.go +8 -0
  824. package/native/core/factories/ExpressionFactory.go +121 -5
  825. package/native/core/factories/FormatCheatSheet.go +1 -1
  826. package/native/core/factories/JsonMetadataFactory.go +29 -4
  827. package/native/core/factories/LiteralFactory.go +24 -1
  828. package/native/core/factories/MetadataCommentTagFactory.go +177 -29
  829. package/native/core/factories/MetadataFactory.go +59 -5
  830. package/native/core/factories/ProtobufFactory.go +17 -4
  831. package/native/core/factories/StatementFactory.go +38 -5
  832. package/native/core/factories/TemplateFactory.go +10 -0
  833. package/native/core/factories/TypeFactory.go +33 -5
  834. package/native/core/factories/expression_factory_number_spells_non_finite_values_test.go +74 -0
  835. package/native/core/factories/factory_utility_coverage_test.go +8 -3
  836. package/native/core/factories/format_alias_resolves_to_cheat_sheet_test.go +5 -0
  837. package/native/core/factories/format_alias_table_targets_the_cheat_sheet_test.go +20 -30
  838. package/native/core/factories/identifier_factory_postfix_escapes_every_key_test.go +5 -0
  839. package/native/core/factories/identifier_factory_postfix_survives_every_code_point_test.go +5 -0
  840. package/native/core/factories/internal/metadata/IMetadataIteratorProps.go +115 -22
  841. package/native/core/factories/internal/metadata/MetadataHelper.go +64 -1
  842. package/native/core/factories/internal/metadata/comment_tags_coverage_test.go +167 -148
  843. package/native/core/factories/internal/metadata/emend_metadata_atomics.go +28 -1
  844. package/native/core/factories/internal/metadata/emplace_metadata_alias.go +10 -3
  845. package/native/core/factories/internal/metadata/emplace_metadata_array_type.go +17 -0
  846. package/native/core/factories/internal/metadata/emplace_metadata_object.go +12 -1
  847. package/native/core/factories/internal/metadata/emplace_metadata_tuple.go +10 -0
  848. package/native/core/factories/internal/metadata/explore_metadata.go +48 -9
  849. package/native/core/factories/internal/metadata/iterate_metadata.go +12 -0
  850. package/native/core/factories/internal/metadata/iterate_metadata_alias.go +8 -0
  851. package/native/core/factories/internal/metadata/iterate_metadata_array.go +7 -0
  852. package/native/core/factories/internal/metadata/iterate_metadata_atomic.go +7 -0
  853. package/native/core/factories/internal/metadata/iterate_metadata_coalesce.go +8 -0
  854. package/native/core/factories/internal/metadata/iterate_metadata_collection.go +8 -0
  855. package/native/core/factories/internal/metadata/iterate_metadata_collection_branch_matrix_test.go +148 -143
  856. package/native/core/factories/internal/metadata/iterate_metadata_comment_tags.go +7 -0
  857. package/native/core/factories/internal/metadata/iterate_metadata_constant.go +68 -0
  858. package/native/core/factories/internal/metadata/iterate_metadata_escape.go +7 -0
  859. package/native/core/factories/internal/metadata/iterate_metadata_function.go +33 -10
  860. package/native/core/factories/internal/metadata/iterate_metadata_intersection.go +22 -11
  861. package/native/core/factories/internal/metadata/iterate_metadata_intersection_brand_coverage_test.go +5 -0
  862. package/native/core/factories/internal/metadata/iterate_metadata_intersection_coverage_test.go +88 -83
  863. package/native/core/factories/internal/metadata/iterate_metadata_intersection_shareable_name_test.go +4 -0
  864. package/native/core/factories/internal/metadata/iterate_metadata_map.go +7 -0
  865. package/native/core/factories/internal/metadata/iterate_metadata_native.go +11 -1
  866. package/native/core/factories/internal/metadata/iterate_metadata_object.go +8 -0
  867. package/native/core/factories/internal/metadata/iterate_metadata_set.go +7 -0
  868. package/native/core/factories/internal/metadata/iterate_metadata_sort.go +11 -0
  869. package/native/core/factories/internal/metadata/iterate_metadata_template.go +7 -0
  870. package/native/core/factories/internal/metadata/iterate_metadata_tuple.go +7 -0
  871. package/native/core/factories/internal/metadata/iterate_metadata_union.go +10 -0
  872. package/native/core/factories/internal/metadata/js_doc_link_text_test.go +5 -0
  873. package/native/core/factories/internal/metadata/js_doc_parameter_name_reads_qualified_name_test.go +31 -26
  874. package/native/core/factories/internal/metadata/js_doc_type_tag_blank_separation_test.go +88 -0
  875. package/native/core/factories/internal/metadata/sort_constants_coverage_test.go +50 -39
  876. package/native/core/factories/internal/metadata/type_arguments_precondition_test.go +5 -0
  877. package/native/core/factories/json_metadata_factory_dedupes_bigint_diagnostics_test.go +5 -0
  878. package/native/core/factories/json_metadata_factory_rejects_bigint_native_test.go +5 -0
  879. package/native/core/factories/literal_factory_null_survives_objects_test.go +5 -0
  880. package/native/core/factories/literal_factory_ordered_object_marshals_json_test.go +5 -0
  881. package/native/core/factories/metadata_comment_tag_factory_coverage_test.go +5 -0
  882. package/native/core/factories/metadata_comment_tag_factory_exclusivity_matches_interface_test.go +10 -5
  883. package/native/core/factories/metadata_comment_tag_factory_holds_bigint_tags_exact_test.go +173 -0
  884. package/native/core/factories/metadata_comment_tag_factory_reads_javascript_numbers_test.go +163 -0
  885. package/native/core/factories/metadata_comment_tag_factory_rejects_out_of_range_integer_test.go +7 -2
  886. package/native/core/factories/metadata_comment_tag_factory_string_length_helpers_test.go +5 -0
  887. package/native/core/factories/metadata_type_tag_factory_accepts_legal_tag_combinations_test.go +6 -1
  888. package/native/core/factories/metadata_type_tag_factory_keeps_bool_form_exclusivity_test.go +5 -0
  889. package/native/core/factories/metadata_type_tag_factory_rejects_cross_kind_exclusive_tags_test.go +5 -0
  890. package/native/core/factories/metadata_type_tag_factory_rejects_duplicated_array_form_tags_test.go +5 -0
  891. package/native/core/factories/metadata_type_tag_factory_reports_all_invalid_candidates_test.go +5 -0
  892. package/native/core/factories/numeric_range_factory_enforces_64bit_bounds_test.go +58 -2
  893. package/native/core/factories/protobuf_factory_bigint_keeps_each_width_test.go +47 -0
  894. package/native/core/factories/protobuf_factory_rejects_invalid_field_names_test.go +5 -0
  895. package/native/core/factories/protobuf_recovery_ownership_test.go +5 -0
  896. package/native/core/programmers/AssertProgrammer.go +27 -0
  897. package/native/core/programmers/IsProgrammer.go +67 -1
  898. package/native/core/programmers/RandomProgrammer.go +39 -22
  899. package/native/core/programmers/ValidateProgrammer.go +28 -1
  900. package/native/core/programmers/compare/CompareEqualProgrammer.go +26 -3
  901. package/native/core/programmers/compare/CompareLessProgrammer.go +17 -3
  902. package/native/core/programmers/functional/FunctionalAssertFunctionProgrammer.go +47 -6
  903. package/native/core/programmers/functional/FunctionalAssertParametersProgrammer.go +70 -13
  904. package/native/core/programmers/functional/FunctionalAssertReturnProgrammer.go +76 -12
  905. package/native/core/programmers/functional/FunctionalIsFunctionProgrammer.go +31 -5
  906. package/native/core/programmers/functional/FunctionalIsParametersProgrammer.go +169 -18
  907. package/native/core/programmers/functional/FunctionalIsReturnProgrammer.go +67 -11
  908. package/native/core/programmers/functional/FunctionalValidateFunctionProgrammer.go +31 -5
  909. package/native/core/programmers/functional/FunctionalValidateParametersProgrammer.go +63 -12
  910. package/native/core/programmers/functional/FunctionalValidateReturnProgrammer.go +68 -11
  911. package/native/core/programmers/functional/internal/FunctionalGeneralProgrammer.go +22 -2
  912. package/native/core/programmers/helpers/ClassifyJoiner.go +14 -6
  913. package/native/core/programmers/helpers/CloneJoiner.go +29 -0
  914. package/native/core/programmers/helpers/FunctionProgrammer.go +98 -0
  915. package/native/core/programmers/helpers/ICheckEntry.go +16 -0
  916. package/native/core/programmers/helpers/IExpressionEntry.go +8 -0
  917. package/native/core/programmers/helpers/ModuloText.go +5 -0
  918. package/native/core/programmers/helpers/NotationJoiner.go +23 -0
  919. package/native/core/programmers/helpers/ProtobufWire.go +8 -0
  920. package/native/core/programmers/helpers/PruneJoiner.go +21 -0
  921. package/native/core/programmers/helpers/RandomJoiner.go +52 -5
  922. package/native/core/programmers/helpers/StringifyJoinder.go +31 -12
  923. package/native/core/programmers/helpers/UnionExplorer.go +202 -70
  924. package/native/core/programmers/helpers/UnionPredicator.go +9 -0
  925. package/native/core/programmers/helpers/clone_joiner_optional_condition_test.go +14 -1
  926. package/native/core/programmers/helpers/function_programmer_unique_names_test.go +5 -0
  927. package/native/core/programmers/helpers/joiner_branch_coverage_test.go +5 -0
  928. package/native/core/programmers/helpers/option_predicator_contract_matrix_test.go +84 -0
  929. package/native/core/programmers/helpers/random_joiner_recursive_array_guard_test.go +5 -0
  930. package/native/core/programmers/helpers/union_explorer_coverage_test.go +120 -112
  931. package/native/core/programmers/helpers/union_predicator_checks_neighbor_flag_test.go +5 -0
  932. package/native/core/programmers/helpers/union_predicator_skips_atomic_like_native_fields_test.go +5 -0
  933. package/native/core/programmers/helpers/union_predicator_skips_collection_bucket_fields_test.go +5 -0
  934. package/native/core/programmers/helpers/union_predicator_skips_shared_native_names_test.go +5 -0
  935. package/native/core/programmers/helpers/union_predicator_skips_shared_object_fields_test.go +5 -0
  936. package/native/core/programmers/helpers/union_predicator_skips_shared_template_fields_test.go +5 -0
  937. package/native/core/programmers/http/HttpAssertFormDataProgrammer.go +9 -0
  938. package/native/core/programmers/http/HttpAssertHeadersProgrammer.go +9 -0
  939. package/native/core/programmers/http/HttpAssertQueryProgrammer.go +20 -0
  940. package/native/core/programmers/http/HttpFormDataProgrammer.go +48 -2
  941. package/native/core/programmers/http/HttpHeadersProgrammer.go +63 -4
  942. package/native/core/programmers/http/HttpIsFormDataProgrammer.go +8 -0
  943. package/native/core/programmers/http/HttpIsHeadersProgrammer.go +8 -0
  944. package/native/core/programmers/http/HttpIsQueryProgrammer.go +19 -1
  945. package/native/core/programmers/http/HttpParameterProgrammer.go +1 -3
  946. package/native/core/programmers/http/HttpQueryProgrammer.go +44 -44
  947. package/native/core/programmers/http/HttpValidateFormDataProgrammer.go +8 -0
  948. package/native/core/programmers/http/HttpValidateHeadersProgrammer.go +8 -0
  949. package/native/core/programmers/http/HttpValidateQueryProgrammer.go +18 -1
  950. package/native/core/programmers/http/http_programmer_helper_coverage_test.go +98 -93
  951. package/native/core/programmers/internal/CheckerProgrammer.go +162 -18
  952. package/native/core/programmers/internal/FeatureProgrammer.go +254 -38
  953. package/native/core/programmers/internal/feature_programmer_visit_guard_test.go +82 -55
  954. package/native/core/programmers/internal/internal_utility_coverage_test.go +338 -345
  955. package/native/core/programmers/iterate/check_array_length.go +15 -0
  956. package/native/core/programmers/iterate/check_bigint.go +14 -0
  957. package/native/core/programmers/iterate/check_dynamic_key.go +33 -19
  958. package/native/core/programmers/iterate/check_dynamic_key_tag_rows_test.go +59 -32
  959. package/native/core/programmers/iterate/check_dynamic_properties.go +70 -16
  960. package/native/core/programmers/iterate/check_everything.go +7 -0
  961. package/native/core/programmers/iterate/check_native.go +14 -0
  962. package/native/core/programmers/iterate/check_number.go +16 -0
  963. package/native/core/programmers/iterate/check_number_option_contract_matrix_test.go +84 -0
  964. package/native/core/programmers/iterate/check_object.go +28 -0
  965. package/native/core/programmers/iterate/check_object_strict_optional_undefined_test.go +6 -1
  966. package/native/core/programmers/iterate/check_object_type_tags.go +15 -0
  967. package/native/core/programmers/iterate/check_string.go +14 -0
  968. package/native/core/programmers/iterate/check_template.go +15 -0
  969. package/native/core/programmers/iterate/decode_union_object.go +35 -2
  970. package/native/core/programmers/iterate/exact_optional_checker_entry_contract_test.go +142 -0
  971. package/native/core/programmers/iterate/exact_optional_graph_clone_random_contract_test.go +213 -0
  972. package/native/core/programmers/iterate/feature_object_entries.go +40 -0
  973. package/native/core/programmers/iterate/iterate_utility_coverage_test.go +30 -5
  974. package/native/core/programmers/iterate/json_schema_array.go +16 -0
  975. package/native/core/programmers/iterate/json_schema_bigint.go +7 -0
  976. package/native/core/programmers/iterate/json_schema_boolean.go +7 -0
  977. package/native/core/programmers/iterate/json_schema_discriminator_declaration_syntax_test.go +10 -5
  978. package/native/core/programmers/iterate/json_schema_jsDocTags.go +10 -3
  979. package/native/core/programmers/iterate/json_schema_jsdoc_tags_cast_reads_javascript_numbers_test.go +69 -0
  980. package/native/core/programmers/iterate/json_schema_native.go +27 -0
  981. package/native/core/programmers/iterate/json_schema_number.go +7 -0
  982. package/native/core/programmers/iterate/json_schema_pattern_property_order_test.go +5 -0
  983. package/native/core/programmers/iterate/json_schema_plugin.go +7 -0
  984. package/native/core/programmers/iterate/json_schema_station.go +16 -0
  985. package/native/core/programmers/iterate/json_schema_string.go +7 -0
  986. package/native/core/programmers/iterate/openapi_v3_downgrader.go +29 -10
  987. package/native/core/programmers/iterate/openapi_v3_downgrader_boolean_default_test.go +9 -4
  988. package/native/core/programmers/iterate/openapi_v3_downgrader_test.go +9 -4
  989. package/native/core/programmers/iterate/postfix_of_tuple.go +8 -0
  990. package/native/core/programmers/iterate/template_interpolation_tags_test.go +46 -4
  991. package/native/core/programmers/iterate/template_runtime_pattern.go +10 -4
  992. package/native/core/programmers/iterate/wrap_metadata_rest_tuple.go +8 -0
  993. package/native/core/programmers/json/JsonApplicationProgrammer.go +9 -0
  994. package/native/core/programmers/json/JsonAssertParseProgrammer.go +9 -0
  995. package/native/core/programmers/json/JsonAssertStringifyProgrammer.go +9 -0
  996. package/native/core/programmers/json/JsonIsParseProgrammer.go +7 -0
  997. package/native/core/programmers/json/JsonIsStringifyProgrammer.go +8 -0
  998. package/native/core/programmers/json/JsonSchemaProgrammer.go +15 -0
  999. package/native/core/programmers/json/JsonSchemasProgrammer.go +16 -0
  1000. package/native/core/programmers/json/JsonStringifyProgrammer.go +20 -32
  1001. package/native/core/programmers/json/JsonValidateParseProgrammer.go +8 -0
  1002. package/native/core/programmers/json/JsonValidateStringifyProgrammer.go +8 -0
  1003. package/native/core/programmers/json/json_schema_programmer_coverage_test.go +176 -171
  1004. package/native/core/programmers/json/json_schemas_programmer_dedupes_bigint_diagnostics_test.go +5 -0
  1005. package/native/core/programmers/json/json_schemas_programmer_rejects_bigint_native_test.go +5 -0
  1006. package/native/core/programmers/json/json_stringify_programmer_coverage_test.go +400 -398
  1007. package/native/core/programmers/llm/LlmApplicationProgrammer.go +10 -9
  1008. package/native/core/programmers/llm/LlmCoerceProgrammer.go +16 -9
  1009. package/native/core/programmers/llm/LlmControllerProgrammer.go +10 -0
  1010. package/native/core/programmers/llm/LlmEvaluationProgrammer.go +107 -11
  1011. package/native/core/programmers/llm/LlmParametersProgrammer.go +8 -9
  1012. package/native/core/programmers/llm/LlmParseProgrammer.go +24 -9
  1013. package/native/core/programmers/llm/LlmSchemaProgrammer.go +50 -13
  1014. package/native/core/programmers/llm/LlmStructuredOutputProgrammer.go +8 -9
  1015. package/native/core/programmers/llm/llm_application_programmer_coverage_test.go +146 -141
  1016. package/native/core/programmers/llm/llm_reference_codec_test.go +5 -0
  1017. package/native/core/programmers/llm/llm_reference_description_test.go +13 -3
  1018. package/native/core/programmers/llm/llm_schema_programmer_coverage_test.go +255 -250
  1019. package/native/core/programmers/llm/llm_schema_programmer_dedupes_bigint_diagnostics_test.go +5 -0
  1020. package/native/core/programmers/llm/llm_schema_programmer_rejects_bigint_native_test.go +5 -0
  1021. package/native/core/programmers/llm/llm_schema_programmer_rejects_exclude_tag_in_strict_test.go +7 -3
  1022. package/native/core/programmers/notations/NotationAssertGeneralProgrammer.go +32 -4
  1023. package/native/core/programmers/notations/NotationGeneralProgrammer.go +70 -42
  1024. package/native/core/programmers/notations/NotationIsGeneralProgrammer.go +29 -3
  1025. package/native/core/programmers/notations/NotationValidateGeneralProgrammer.go +32 -4
  1026. package/native/core/programmers/notations/notation_general_helpers_test.go +363 -367
  1027. package/native/core/programmers/notations/notation_general_programmer_pascal_multiword_test.go +5 -0
  1028. package/native/core/programmers/notations/notation_general_programmer_snake_prefix_test.go +5 -0
  1029. package/native/core/programmers/notations/notation_general_programmer_underscore_boundary_test.go +5 -0
  1030. package/native/core/programmers/plain/PlainAssertClassifyProgrammer.go +23 -3
  1031. package/native/core/programmers/plain/PlainAssertCloneProgrammer.go +22 -3
  1032. package/native/core/programmers/plain/PlainAssertPruneProgrammer.go +22 -3
  1033. package/native/core/programmers/plain/PlainClassifyProgrammer.go +61 -85
  1034. package/native/core/programmers/plain/PlainCloneProgrammer.go +34 -38
  1035. package/native/core/programmers/plain/PlainIsCloneProgrammer.go +18 -2
  1036. package/native/core/programmers/plain/PlainIsPruneProgrammer.go +18 -2
  1037. package/native/core/programmers/plain/PlainPruneProgrammer.go +29 -10
  1038. package/native/core/programmers/plain/PlainValidateClassifyProgrammer.go +22 -3
  1039. package/native/core/programmers/plain/PlainValidateCloneProgrammer.go +22 -3
  1040. package/native/core/programmers/plain/PlainValidatePruneProgrammer.go +22 -3
  1041. package/native/core/programmers/plain/plain_programmer_helper_coverage_test.go +6 -3
  1042. package/native/core/programmers/plain/plain_prune_programmer_branch_matrix_test.go +5 -0
  1043. package/native/core/programmers/plain/plain_tuple_seed_recovery_ownership_test.go +5 -0
  1044. package/native/core/programmers/protobuf/ProtobufAssertDecodeProgrammer.go +19 -0
  1045. package/native/core/programmers/protobuf/ProtobufAssertEncodeProgrammer.go +19 -0
  1046. package/native/core/programmers/protobuf/ProtobufDecodeProgrammer.go +19 -1
  1047. package/native/core/programmers/protobuf/ProtobufEncodeProgrammer.go +30 -30
  1048. package/native/core/programmers/protobuf/ProtobufIsDecodeProgrammer.go +19 -1
  1049. package/native/core/programmers/protobuf/ProtobufIsEncodeProgrammer.go +19 -1
  1050. package/native/core/programmers/protobuf/ProtobufMessageProgrammer.go +11 -5
  1051. package/native/core/programmers/protobuf/ProtobufValidateDecodeProgrammer.go +19 -1
  1052. package/native/core/programmers/protobuf/ProtobufValidateEncodeProgrammer.go +19 -1
  1053. package/native/core/programmers/protobuf/protobuf_programmer_helper_coverage_test.go +493 -453
  1054. package/native/core/programmers/random_programmer_helper_coverage_test.go +350 -342
  1055. package/native/core/programmers/random_programmer_length_argument_test.go +32 -1
  1056. package/native/core/programmers/random_programmer_min_items_tag_test.go +5 -0
  1057. package/native/core/programmers/random_programmer_pick_hook_test.go +88 -0
  1058. package/native/core/programmers/reflect/ReflectLiteralsProgrammer.go +15 -0
  1059. package/native/core/schemas/metadata/IMetadataTypeTagSequence.go +12 -1
  1060. package/native/core/schemas/metadata/MetadataAlias.go +41 -1
  1061. package/native/core/schemas/metadata/MetadataAliasType.go +57 -21
  1062. package/native/core/schemas/metadata/MetadataArray.go +37 -1
  1063. package/native/core/schemas/metadata/MetadataArrayType.go +52 -18
  1064. package/native/core/schemas/metadata/MetadataAtomic.go +44 -10
  1065. package/native/core/schemas/metadata/MetadataBigint.go +20 -4
  1066. package/native/core/schemas/metadata/MetadataCollection.go +264 -53
  1067. package/native/core/schemas/metadata/MetadataComponents.go +13 -116
  1068. package/native/core/schemas/metadata/MetadataConstant.go +35 -13
  1069. package/native/core/schemas/metadata/MetadataConstantValue.go +87 -20
  1070. package/native/core/schemas/metadata/MetadataDefaultLibrary.go +20 -0
  1071. package/native/core/schemas/metadata/MetadataDependency.go +52 -2
  1072. package/native/core/schemas/metadata/MetadataEscaped.go +48 -8
  1073. package/native/core/schemas/metadata/MetadataFunction.go +42 -16
  1074. package/native/core/schemas/metadata/MetadataMap.go +53 -4
  1075. package/native/core/schemas/metadata/MetadataNative.go +65 -9
  1076. package/native/core/schemas/metadata/MetadataObject.go +37 -1
  1077. package/native/core/schemas/metadata/MetadataObjectType.go +117 -74
  1078. package/native/core/schemas/metadata/MetadataParameter.go +51 -16
  1079. package/native/core/schemas/metadata/MetadataProperty.go +49 -19
  1080. package/native/core/schemas/metadata/MetadataSchema.go +324 -198
  1081. package/native/core/schemas/metadata/MetadataSet.go +49 -2
  1082. package/native/core/schemas/metadata/MetadataTemplate.go +61 -15
  1083. package/native/core/schemas/metadata/MetadataTuple.go +21 -0
  1084. package/native/core/schemas/metadata/MetadataTupleType.go +61 -19
  1085. package/native/core/schemas/metadata/metadata_atomic_tags_are_owned_test.go +75 -0
  1086. package/native/core/schemas/metadata/metadata_bigint_is_comparable_test.go +5 -0
  1087. package/native/core/schemas/metadata/metadata_collection_generic_argument_dot_test.go +13 -8
  1088. package/native/core/schemas/metadata/metadata_collection_name_allocation_test.go +9 -2
  1089. package/native/core/schemas/metadata/metadata_collection_openapi_name_cascade_test.go +5 -0
  1090. package/native/core/schemas/metadata/metadata_collection_openapi_name_test.go +7 -1
  1091. package/native/core/schemas/metadata/metadata_object_coverage_compares_property_values_test.go +61 -0
  1092. package/native/core/schemas/metadata/metadata_object_type_required_literal_property_test.go +7 -1
  1093. package/native/core/schemas/metadata/metadata_schema_covers_tag_matrix_test.go +8 -3
  1094. package/native/core/schemas/metadata/metadata_schema_merge_keeps_inputs_test.go +117 -0
  1095. package/native/core/schemas/metadata/metadata_schema_optional_root_isolation_test.go +59 -0
  1096. package/native/core/schemas/metadata/metadata_schema_shallow_clone_names_test.go +36 -0
  1097. package/native/core/schemas/metadata/metadata_schema_sole_literal_caches_pointer_test.go +5 -0
  1098. package/native/core/schemas/metadata/schema_sequence_and_json_coverage_test.go +289 -387
  1099. package/native/core/schemas/protobuf/IProtobufProperty.go +11 -0
  1100. package/native/core/schemas/protobuf/IProtobufPropertyType.go +94 -0
  1101. package/native/core/schemas/protobuf/IProtobufSchema.go +89 -5
  1102. package/native/core/utils/NumberUtil.go +201 -0
  1103. package/native/core/utils/PromiseTypeFactory.go +12 -1
  1104. package/native/core/utils/number_util_rational_keeps_written_value_test.go +67 -0
  1105. package/native/core/utils/number_util_reads_javascript_number_grammar_test.go +152 -0
  1106. package/native/core/utils/promise_type_factory_semantics_test.go +5 -0
  1107. package/native/transform/CallExpressionTransformer.go +42 -10
  1108. package/native/transform/FileTransformer.go +72 -53
  1109. package/native/transform/ITransformProps.go +7 -0
  1110. package/native/transform/NodeTransformer.go +10 -1
  1111. package/native/transform/TransformerError.go +31 -0
  1112. package/native/transform/call_expression_transformer_registry_coverage_test.go +40 -31
  1113. package/native/transform/call_expression_transformer_target_test.go +33 -4
  1114. package/native/transform/features/CreateIsTransformer.go +0 -1
  1115. package/native/transform/features/CreateShallowTransformer.go +0 -1
  1116. package/native/transform/features/CreateValidateTransformer.go +0 -1
  1117. package/native/transform/features/IsTransformer.go +0 -1
  1118. package/native/transform/features/ShallowTransformer.go +0 -1
  1119. package/native/transform/features/ValidateTransformer.go +0 -1
  1120. package/native/transform/features/functional/FunctionalGenericTransformer.go +46 -7
  1121. package/native/transform/features/http/CreateHttpIsQueryTransformer.go +0 -1
  1122. package/native/transform/features/http/CreateHttpQueryTransformer.go +0 -1
  1123. package/native/transform/features/http/CreateHttpValidateQueryTransformer.go +0 -1
  1124. package/native/transform/features/http/HttpIsQueryTransformer.go +0 -1
  1125. package/native/transform/features/http/HttpQueryTransformer.go +0 -1
  1126. package/native/transform/features/http/HttpValidateQueryTransformer.go +0 -1
  1127. package/native/transform/features/llm/LlmEvaluationProbabilityDeclarations_test.go +6 -1
  1128. package/native/transform/features/llm/LlmEvaluationTransformer.go +55 -1
  1129. package/native/transform/features/notations/notation_transformer_capitalize_test.go +29 -0
  1130. package/native/transform/features/protobuf/ProtobufCreateDecodeTransformer.go +1 -1
  1131. package/native/transform/features/protobuf/ProtobufCreateEncodeTransformer.go +1 -1
  1132. package/native/transform/features/protobuf/ProtobufCreateIsDecodeTransformer.go +1 -1
  1133. package/native/transform/features/protobuf/ProtobufCreateIsEncodeTransformer.go +1 -1
  1134. package/native/transform/features/protobuf/ProtobufCreateValidateDecodeTransformer.go +1 -1
  1135. package/native/transform/features/protobuf/ProtobufCreateValidateEncodeTransformer.go +1 -1
  1136. package/native/transform/features/protobuf/ProtobufDecodeTransformer.go +1 -1
  1137. package/native/transform/features/protobuf/ProtobufEncodeTransformer.go +1 -1
  1138. package/native/transform/features/protobuf/ProtobufIsDecodeTransformer.go +1 -1
  1139. package/native/transform/features/protobuf/ProtobufIsEncodeTransformer.go +1 -1
  1140. package/native/transform/features/protobuf/ProtobufValidateDecodeTransformer.go +1 -1
  1141. package/native/transform/features/protobuf/ProtobufValidateEncodeTransformer.go +1 -1
  1142. package/native/transform/features/reflect/reflect_metadata_transformer_edge_branches_test.go +42 -30
  1143. package/native/transform/file_transformer_coverage_test.go +17 -3
  1144. package/native/transform/internal/GenericTransformer.go +67 -113
  1145. package/native/transform/transform.go +16 -2
  1146. package/package.json +7 -6
  1147. package/src/TypeGuardError.ts +20 -4
  1148. package/src/basic.ts +1020 -0
  1149. package/src/compare.ts +21 -0
  1150. package/src/functional.ts +42 -0
  1151. package/src/http.ts +136 -34
  1152. package/src/internal/_IProtobufWriter.ts +115 -0
  1153. package/src/internal/_ProtobufReader.ts +159 -1
  1154. package/src/internal/_ProtobufSizer.ts +137 -5
  1155. package/src/internal/_ProtobufWriter.ts +154 -1
  1156. package/src/internal/_accessExpressionAsString.ts +11 -0
  1157. package/src/internal/_assertGuard.ts +12 -0
  1158. package/src/internal/_coerceLlmArguments.ts +10 -0
  1159. package/src/internal/_createLlmEvaluation.ts +10 -53
  1160. package/src/internal/_createStandardSchema.ts +13 -0
  1161. package/src/internal/_decimal.ts +77 -0
  1162. package/src/internal/_functionalTypeGuardErrorFactory.ts +8 -0
  1163. package/src/internal/_httpFormDataReadArray.ts +9 -0
  1164. package/src/internal/_httpFormDataReadBigint.ts +15 -1
  1165. package/src/internal/_httpFormDataReadBlob.ts +11 -0
  1166. package/src/internal/_httpFormDataReadBoolean.ts +14 -1
  1167. package/src/internal/_httpFormDataReadFile.ts +11 -0
  1168. package/src/internal/_httpFormDataReadNumber.ts +14 -1
  1169. package/src/internal/_httpFormDataReadString.ts +15 -1
  1170. package/src/internal/_httpHeaderReadBigint.ts +17 -1
  1171. package/src/internal/_httpHeaderReadBoolean.ts +12 -0
  1172. package/src/internal/_httpHeaderReadNumber.ts +17 -1
  1173. package/src/internal/_httpParameterReadBigint.ts +14 -0
  1174. package/src/internal/_httpParameterReadBoolean.ts +11 -0
  1175. package/src/internal/_httpParameterReadNumber.ts +14 -0
  1176. package/src/internal/_httpParameterReadString.ts +17 -2
  1177. package/src/internal/_httpQueryParseURLSearchParams.ts +14 -0
  1178. package/src/internal/_httpQueryReadArray.ts +9 -0
  1179. package/src/internal/_httpQueryReadBigint.ts +18 -1
  1180. package/src/internal/_httpQueryReadBoolean.ts +15 -1
  1181. package/src/internal/_httpQueryReadNumber.ts +18 -1
  1182. package/src/internal/_httpQueryReadString.ts +15 -1
  1183. package/src/internal/_isBetween.ts +8 -0
  1184. package/src/internal/_isBigintString.ts +11 -0
  1185. package/src/internal/_isFormatByte.ts +12 -0
  1186. package/src/internal/_isFormatDate.ts +11 -0
  1187. package/src/internal/_isFormatDateTime.ts +13 -0
  1188. package/src/internal/_isFormatDuration.ts +13 -0
  1189. package/src/internal/_isFormatEmail.ts +13 -0
  1190. package/src/internal/_isFormatHostname.ts +12 -0
  1191. package/src/internal/_isFormatIdnEmail.ts +14 -0
  1192. package/src/internal/_isFormatIdnHostname.ts +14 -0
  1193. package/src/internal/_isFormatIpv4.ts +11 -0
  1194. package/src/internal/_isFormatIpv6.ts +12 -0
  1195. package/src/internal/_isFormatIri.ts +11 -0
  1196. package/src/internal/_isFormatIriReference.ts +13 -0
  1197. package/src/internal/_isFormatJsonPointer.ts +11 -0
  1198. package/src/internal/_isFormatPassword.ts +11 -0
  1199. package/src/internal/_isFormatRegex.ts +11 -0
  1200. package/src/internal/_isFormatRelativeJsonPointer.ts +11 -0
  1201. package/src/internal/_isFormatTime.ts +12 -0
  1202. package/src/internal/_isFormatUri.ts +15 -0
  1203. package/src/internal/_isFormatUriReference.ts +11 -0
  1204. package/src/internal/_isFormatUriTemplate.ts +14 -1
  1205. package/src/internal/_isFormatUrl.ts +15 -0
  1206. package/src/internal/_isFormatUuid.ts +11 -0
  1207. package/src/internal/_isMultipleOf.ts +11 -0
  1208. package/src/internal/_isTypeFloat.ts +9 -0
  1209. package/src/internal/_isTypeInt16.ts +8 -0
  1210. package/src/internal/_isTypeInt32.ts +8 -0
  1211. package/src/internal/_isTypeInt64.ts +11 -0
  1212. package/src/internal/_isTypeInt64Bigint.ts +8 -0
  1213. package/src/internal/_isTypeInt8.ts +8 -0
  1214. package/src/internal/_isTypeUint16.ts +8 -0
  1215. package/src/internal/_isTypeUint32.ts +8 -0
  1216. package/src/internal/_isTypeUint64.ts +11 -0
  1217. package/src/internal/_isTypeUint64Bigint.ts +8 -0
  1218. package/src/internal/_isTypeUint8.ts +8 -0
  1219. package/src/internal/_isUniqueItems.ts +46 -0
  1220. package/src/internal/_jsonStringifyArray.ts +2 -0
  1221. package/src/internal/_jsonStringifyElement.ts +2 -0
  1222. package/src/internal/_jsonStringifyNumber.ts +9 -0
  1223. package/src/internal/_jsonStringifyProperty.ts +3 -1
  1224. package/src/internal/_jsonStringifyRest.ts +11 -0
  1225. package/src/internal/_jsonStringifyString.ts +13 -0
  1226. package/src/internal/_jsonStringifyTail.ts +8 -0
  1227. package/src/internal/_llmApplicationFinalize.ts +13 -0
  1228. package/src/internal/_notationAny.ts +14 -0
  1229. package/src/internal/_notationAssign.ts +12 -0
  1230. package/src/internal/_notationKebab.ts +9 -0
  1231. package/src/internal/_notationKeyCollision.ts +8 -0
  1232. package/src/internal/_notationSnake.ts +12 -0
  1233. package/src/internal/_parseLlmArguments.ts +12 -0
  1234. package/src/internal/_plainCloneAny.ts +15 -0
  1235. package/src/internal/_randomArray.ts +42 -20
  1236. package/src/internal/_randomBigint.ts +116 -3
  1237. package/src/internal/_randomBoolean.ts +8 -0
  1238. package/src/internal/_randomFormatByte.ts +8 -0
  1239. package/src/internal/_randomFormatDate.ts +10 -0
  1240. package/src/internal/_randomFormatDatetime.ts +10 -0
  1241. package/src/internal/_randomFormatDuration.ts +8 -0
  1242. package/src/internal/_randomFormatEmail.ts +8 -0
  1243. package/src/internal/_randomFormatHostname.ts +15 -1
  1244. package/src/internal/_randomFormatIdnEmail.ts +13 -0
  1245. package/src/internal/_randomFormatIdnHostname.ts +12 -0
  1246. package/src/internal/_randomFormatIpv4.ts +8 -0
  1247. package/src/internal/_randomFormatIpv6.ts +8 -0
  1248. package/src/internal/_randomFormatIri.ts +11 -0
  1249. package/src/internal/_randomFormatIriReference.ts +12 -0
  1250. package/src/internal/_randomFormatJsonPointer.ts +12 -0
  1251. package/src/internal/_randomFormatPassword.ts +13 -0
  1252. package/src/internal/_randomFormatRegex.ts +8 -0
  1253. package/src/internal/_randomFormatRelativeJsonPointer.ts +8 -0
  1254. package/src/internal/_randomFormatTime.ts +13 -0
  1255. package/src/internal/_randomFormatUri.ts +12 -0
  1256. package/src/internal/_randomFormatUriReference.ts +12 -0
  1257. package/src/internal/_randomFormatUriTemplate.ts +12 -0
  1258. package/src/internal/_randomFormatUrl.ts +12 -0
  1259. package/src/internal/_randomFormatUuid.ts +13 -0
  1260. package/src/internal/_randomInteger.ts +99 -33
  1261. package/src/internal/_randomMultiple.ts +47 -15
  1262. package/src/internal/_randomNumber.ts +107 -38
  1263. package/src/internal/_randomPattern.ts +12 -0
  1264. package/src/internal/_randomPick.ts +25 -7
  1265. package/src/internal/_randomString.ts +36 -13
  1266. package/src/internal/_randomStringLength.ts +31 -1
  1267. package/src/internal/_stringLength.ts +11 -0
  1268. package/src/internal/_stringLengthGte.ts +11 -0
  1269. package/src/internal/_stringLengthLte.ts +11 -0
  1270. package/src/internal/_throwTypeGuardError.ts +9 -0
  1271. package/src/internal/_validateReport.ts +15 -0
  1272. package/src/internal/private/__notationRename.ts +5 -0
  1273. package/src/internal/private/__randomComposition.ts +27 -3
  1274. package/src/internal/private/__randomEpoch.ts +15 -0
  1275. package/src/json.ts +49 -14
  1276. package/src/llm.ts +45 -26
  1277. package/src/module.ts +1 -935
  1278. package/src/notations.ts +60 -0
  1279. package/src/plain.ts +38 -0
  1280. package/src/protobuf.ts +41 -7
  1281. package/src/reflect.ts +16 -12
  1282. package/src/transform.ts +17 -0
  1283. package/native/cmd/ttsc-typia/boolean_literal_discriminant_schema_transform_test.go +0 -374
  1284. package/native/cmd/ttsc-typia/build_reports_semantic_diagnostics_test.go +0 -34
  1285. package/native/cmd/ttsc-typia/build_reports_syntactic_diagnostics_test.go +0 -34
  1286. package/native/cmd/ttsc-typia/command_routes_and_diagnostics_coverage_test.go +0 -316
  1287. package/native/cmd/ttsc-typia/compare_less_transform_test.go +0 -180
  1288. package/native/cmd/ttsc-typia/compare_method_delegation_transform_test.go +0 -173
  1289. package/native/cmd/ttsc-typia/compare_native_object_overmatch_transform_test.go +0 -161
  1290. package/native/cmd/ttsc-typia/compare_template_literal_union_transform_test.go +0 -241
  1291. package/native/cmd/ttsc-typia/compare_union_discrimination_transform_test.go +0 -289
  1292. package/native/cmd/ttsc-typia/escaped_property_key_path_transform_test.go +0 -193
  1293. package/native/cmd/ttsc-typia/finite_option_number_leaf_transform_test.go +0 -240
  1294. package/native/cmd/ttsc-typia/intersection_all_never_union_transform_test.go +0 -168
  1295. package/native/cmd/ttsc-typia/intersection_brand_transform_test.go +0 -267
  1296. package/native/cmd/ttsc-typia/is_object_function_member_transform_test.go +0 -205
  1297. package/native/cmd/ttsc-typia/json_is_stringify_finite_number_transform_test.go +0 -198
  1298. package/native/cmd/ttsc-typia/json_stringify_contextual_undefined_transform_test.go +0 -556
  1299. package/native/cmd/ttsc-typia/json_stringify_special_key_transform_test.go +0 -238
  1300. package/native/cmd/ttsc-typia/notation_dynamic_keys_transform_test.go +0 -286
  1301. package/native/cmd/ttsc-typia/notation_literal_collision_transform_test.go +0 -164
  1302. package/native/cmd/ttsc-typia/plain_prune_union_object_overmatch_transform_test.go +0 -219
  1303. package/native/cmd/ttsc-typia/recursive_container_helper_index_transform_test.go +0 -206
  1304. package/native/cmd/ttsc-typia/reflect_literals_bigint_transform_test.go +0 -148
  1305. package/native/cmd/ttsc-typia/reflect_schema_bigint_transform_test.go +0 -173
  1306. package/native/cmd/ttsc-typia/run_default_build_route_test.go +0 -31
  1307. package/native/cmd/ttsc-typia/shallow_depth_runtime_test.go +0 -173
  1308. package/native/cmd/ttsc-typia/shallow_factory_depth_runtime_test.go +0 -171
  1309. package/native/cmd/ttsc-typia/symbol_index_domain_transform_test.go +0 -316
  1310. package/native/cmd/ttsc-typia/transform_declaration_source_produces_no_javascript_test.go +0 -67
  1311. package/native/cmd/ttsc-typia/transform_single_file_js_empty_emit_reports_no_output_test.go +0 -100
  1312. package/native/core/factories/internal/metadata/optional_coalesce_coverage_test.go +0 -38
  1313. package/native/core/programmers/functional/functional_assert_helper_coverage_test.go +0 -26
  1314. package/native/core/programmers/iterate/iterate_check_coverage_test.go +0 -96
  1315. package/native/core/programmers/programmer_direct_helper_coverage_test.go +0 -70
  1316. package/native/core/schemas/metadata/IMetadataDictionary.go +0 -8
  1317. package/native/core/schemas/protobuf/protobuf_marker_coverage_test.go +0 -58
  1318. package/native/core/typings/Writable.go +0 -5
  1319. package/native/transform/ImportTransformer.go +0 -285
  1320. package/native/transform/TypiaGenerator.go +0 -171
  1321. package/native/transform/features/feature_transformer_entry_coverage_test.go +0 -59
  1322. package/native/transform/features/http/http_transformer_entry_coverage_test.go +0 -65
  1323. package/native/transform/features/json/json_transformer_entry_coverage_test.go +0 -56
  1324. package/native/transform/features/llm/llm_transformer_entry_coverage_test.go +0 -50
  1325. package/native/transform/features/notations/notation_transformer_entry_coverage_test.go +0 -58
  1326. package/native/transform/features/plain/plain_transformer_entry_coverage_test.go +0 -61
  1327. package/native/transform/features/protobuf/protobuf_transformer_entry_coverage_test.go +0 -56
  1328. package/native/transform/features/reflect/reflect_transformer_entry_coverage_test.go +0 -47
  1329. package/native/transform/import_transformer_coverage_test.go +0 -153
  1330. package/native/transform/typia_generator_helpers_coverage_test.go +0 -166
@@ -4,6 +4,20 @@ exports._ProtobufReader = void 0;
4
4
  const interface_1 = require("@typia/interface");
5
5
  const utils_1 = require("@typia/utils");
6
6
  /// @reference https://github.com/piotr-oles/as-proto/blob/main/packages/as-proto/assembly/internal/FixedReader.ts
7
+ /**
8
+ * Reads a Protocol Buffer message from a buffer.
9
+ *
10
+ * Every malformed input throws an error prefixed with
11
+ * `typia.protobuf.decode()`. Length-prefixed bytes, message forks and field
12
+ * skips restore their position on failure. Scalar varints may consume bytes
13
+ * before failing, and invalid UTF-8 is reported after its byte range has been
14
+ * consumed. Adapted from the fixed reader of as-proto.
15
+ *
16
+ * @evidence contracts/common.md#principled-implementation The reader decodes the wire format from a buffer with a pointer and a length-delimited boundary, throwing a typia-prefixed error for overflow, malformed varints or invalid UTF-8. Atomic bytes, fork and skip operations restore their pointer and boundary on failure; scalar varint reads can retain consumed bytes, and UTF-8 decoding can fail after bytes has completed. Varints are bounded to ten bytes with a tenth byte limited to bit 63 in every reading path, so skipping and reading agree on the wire limits.
17
+ * @evidence contracts/common.md#clear-and-simple-design One class with public typed readers, skip methods and a message fork and close pair, and private varint readers and a bounds check shared by all of them; the fault builder and limits are module constants.
18
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Limits come from the wire format; invalid input throws and is never repaired by truncation or guessing.
19
+ * @evidence contracts/common.md#meaningful-documentation A reference comment names the origin, the fields have comments and the skip and varint helpers explain their bounds.
20
+ */
7
21
  class _ProtobufReader {
8
22
  constructor(buf) {
9
23
  this.buf = buf;
@@ -11,41 +25,138 @@ class _ProtobufReader {
11
25
  this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength);
12
26
  this.end = buf.length;
13
27
  }
28
+ /**
29
+ * Return the offset of the next byte to read.
30
+ *
31
+ * @evidence contracts/common.md#principled-implementation Returns the read pointer, which is the offset of the next byte to be read.
32
+ * @evidence contracts/common.md#clear-and-simple-design One accessor.
33
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It exposes no mutable state.
34
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is returned.
35
+ */
14
36
  index() {
15
37
  return this.ptr;
16
38
  }
39
+ /**
40
+ * Return the end of the buffer or of the open length-delimited message.
41
+ *
42
+ * @evidence contracts/common.md#principled-implementation Returns the current boundary, which is the end of the whole buffer or of the open length-delimited message.
43
+ * @evidence contracts/common.md#clear-and-simple-design One accessor.
44
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It exposes no mutable state.
45
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is returned.
46
+ */
17
47
  size() {
18
48
  return this.end;
19
49
  }
50
+ /**
51
+ * Read an unsigned 32-bit varint.
52
+ *
53
+ * @evidence contracts/common.md#principled-implementation Reads a varint and reinterprets it as an unsigned 32-bit number, so values of 2^31 or more are positive.
54
+ * @evidence contracts/common.md#clear-and-simple-design One delegation with an unsigned shift.
55
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The reading follows the wire format.
56
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
57
+ */
20
58
  uint32() {
21
59
  return this.varint32() >>> 0;
22
60
  }
61
+ /**
62
+ * Read a signed 32-bit varint.
63
+ *
64
+ * @evidence contracts/common.md#principled-implementation Reads a varint as a signed 32-bit number, which keeps the two's-complement meaning of a ten-byte negative value after truncation to 32 bits.
65
+ * @evidence contracts/common.md#clear-and-simple-design One delegation.
66
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The reading follows the wire format.
67
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
68
+ */
23
69
  int32() {
24
70
  return this.varint32();
25
71
  }
72
+ /**
73
+ * Read a ZigZag encoded signed 32-bit integer.
74
+ *
75
+ * @evidence contracts/common.md#principled-implementation The varint is decoded with the ZigZag inverse `(v >>> 1) ^ -(v & 1)`, where the unsigned shift treats the 32-bit pattern as unsigned.
76
+ * @evidence contracts/common.md#clear-and-simple-design One expression over the varint reader.
77
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is the protobuf definition.
78
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
79
+ */
26
80
  sint32() {
27
81
  const value = this.varint32();
28
82
  return (value >>> 1) ^ -(value & 1);
29
83
  }
84
+ /**
85
+ * Read an unsigned 64-bit varint.
86
+ *
87
+ * @evidence contracts/common.md#principled-implementation Reads a varint as an unsigned bigint, rejecting a payload above bit 63 or a varint longer than ten bytes.
88
+ * @evidence contracts/common.md#clear-and-simple-design One delegation.
89
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The bounds are the wire format's.
90
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
91
+ */
30
92
  uint64() {
31
93
  return this.varint64();
32
94
  }
95
+ /**
96
+ * Read a signed 64-bit varint.
97
+ *
98
+ * @evidence contracts/common.md#principled-implementation Reads the unsigned pattern and reinterprets it as a signed 64-bit bigint.
99
+ * @evidence contracts/common.md#clear-and-simple-design One delegation with an integer cast.
100
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The reading follows the wire format.
101
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
102
+ */
33
103
  int64() {
34
104
  return BigInt.asIntN(64, this.varint64());
35
105
  }
106
+ /**
107
+ * Read a ZigZag encoded signed 64-bit integer.
108
+ *
109
+ * @evidence contracts/common.md#principled-implementation The varint is decoded with the ZigZag inverse on a bigint.
110
+ * @evidence contracts/common.md#clear-and-simple-design One expression over the 64-bit reader.
111
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is the protobuf definition.
112
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
113
+ */
36
114
  sint64() {
37
115
  const value = this.varint64();
38
116
  return (value >> BigInt(0x01)) ^ -(value & BigInt(0x01));
39
117
  }
118
+ /**
119
+ * Read a boolean, which is true for any non-zero varint.
120
+ *
121
+ * @evidence contracts/common.md#principled-implementation A varint is true when it is not zero, as the format defines.
122
+ * @evidence contracts/common.md#clear-and-simple-design One delegation.
123
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The reading follows the wire format.
124
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
125
+ */
40
126
  bool() {
41
127
  return this.varint32() !== 0;
42
128
  }
129
+ /**
130
+ * Read a little-endian 32-bit float.
131
+ *
132
+ * @evidence contracts/common.md#principled-implementation Reads four little-endian bytes through the data view after a bounds check.
133
+ * @evidence contracts/common.md#clear-and-simple-design One checked read.
134
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The bounds check throws rather than reading past the boundary.
135
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
136
+ */
43
137
  float() {
44
138
  return this.view.getFloat32(this.take(4), true);
45
139
  }
140
+ /**
141
+ * Read a little-endian 64-bit float.
142
+ *
143
+ * @evidence contracts/common.md#principled-implementation Reads eight little-endian bytes through the data view after a bounds check.
144
+ * @evidence contracts/common.md#clear-and-simple-design One checked read.
145
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The bounds check throws rather than reading past the boundary.
146
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
147
+ */
46
148
  double() {
47
149
  return this.view.getFloat64(this.take(8), true);
48
150
  }
151
+ /**
152
+ * Read a length-prefixed byte range as a view into the buffer, without
153
+ * copying.
154
+ *
155
+ * @evidence contracts/common.md#principled-implementation Reads a length-prefixed byte range as a view of the buffer and not a copy, inside an atomic block that restores the pointer if the length is invalid.
156
+ * @evidence contracts/common.md#clear-and-simple-design One function using the checked read.
157
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The returned view shares memory with the input buffer, a stated aliasing.
158
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
159
+ */
49
160
  bytes() {
50
161
  return this.atomic(() => {
51
162
  const length = this.uint32();
@@ -53,6 +164,15 @@ class _ProtobufReader {
53
164
  return this.buf.subarray(from, from + length);
54
165
  });
55
166
  }
167
+ /**
168
+ * Read a length-prefixed UTF-8 string, throwing on invalid UTF-8 after
169
+ * consuming its byte range. An invalid length restores the read position.
170
+ *
171
+ * @evidence contracts/common.md#principled-implementation Reads the bytes and decodes them with a decoder that is fatal on invalid UTF-8, so malformed text throws a typia error instead of producing replacement characters. A byte-range failure rolls back through bytes; a decoding failure occurs after that range has been consumed and does not rewind it.
172
+ * @evidence contracts/common.md#clear-and-simple-design One function over bytes with a shared decoder.
173
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The error is raised, not repaired.
174
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
175
+ */
56
176
  string() {
57
177
  const bytes = this.bytes();
58
178
  const decoder = utf8.get();
@@ -63,6 +183,15 @@ class _ProtobufReader {
63
183
  throw error("invalid UTF-8 string.");
64
184
  }
65
185
  }
186
+ /**
187
+ * Begin a length-delimited message and return the previous boundary to pass
188
+ * to `close`.
189
+ *
190
+ * @evidence contracts/common.md#principled-implementation Reads the length prefix, checks that it fits within the current boundary, narrows the boundary to the message end and returns the previous boundary for `close`; the pointer is restored on failure.
191
+ * @evidence contracts/common.md#clear-and-simple-design One atomic function paired with close.
192
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The bounds check throws on an oversized prefix.
193
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is returned.
194
+ */
66
195
  fork() {
67
196
  return this.atomic(() => {
68
197
  const previous = this.end;
@@ -72,12 +201,28 @@ class _ProtobufReader {
72
201
  return previous;
73
202
  });
74
203
  }
204
+ /**
205
+ * End the message that `fork` began, which must have been consumed
206
+ * completely.
207
+ *
208
+ * @evidence contracts/common.md#principled-implementation Requires that the whole message was consumed and restores the previous boundary; an unread remainder is a malformed message and throws.
209
+ * @evidence contracts/common.md#clear-and-simple-design One check and one assignment.
210
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The strictness is intentional and reports corruption.
211
+ * @evidence contracts/common.md#meaningful-documentation A short comment states the check.
212
+ */
75
213
  close(previous) {
76
214
  if (this.ptr !== this.end)
77
215
  throw error("buffer overflow.");
78
216
  this.end = previous;
79
217
  }
80
- /** Advance by exactly `length` bytes, for every length including zero. */
218
+ /**
219
+ * Advance by exactly `length` bytes, for every length including zero.
220
+ *
221
+ * @evidence contracts/common.md#principled-implementation Advances exactly the given number of bytes after a bounds check, including zero, so a zero-length field is skipped without moving or failing.
222
+ * @evidence contracts/common.md#clear-and-simple-design One checked advance.
223
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The bounds check throws on overflow.
224
+ * @evidence contracts/common.md#meaningful-documentation A short comment states the zero-length case.
225
+ */
81
226
  skip(length) {
82
227
  this.take(length);
83
228
  }
@@ -92,6 +237,11 @@ class _ProtobufReader {
92
237
  * never notices a value it could not have represented. Relaxing either bound
93
238
  * here would accept a varint that `varint32` and `varint64` reject, making
94
239
  * the limit depend on which method happens to consume the value.
240
+ *
241
+ * @evidence contracts/common.md#principled-implementation Advances over one varint, which has no length prefix, using the same ten-byte and bit-63 limits as the value readers, so the limit does not depend on which method consumes the value.
242
+ * @evidence contracts/common.md#clear-and-simple-design One atomic loop that delegates the last byte check to a shared helper.
243
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The skipped bytes are validated, which is the point of the helper; no looser limit is used.
244
+ * @evidence contracts/common.md#meaningful-documentation A long comment explains the bounds and why skipping must match reading.
95
245
  */
96
246
  skipVarint() {
97
247
  this.atomic(() => {
@@ -101,6 +251,14 @@ class _ProtobufReader {
101
251
  this.lastVarintByte();
102
252
  });
103
253
  }
254
+ /**
255
+ * Skip a field of the given wire type, including a nested group.
256
+ *
257
+ * @evidence contracts/common.md#principled-implementation A wire type selects how far to advance: a varint, eight bytes, a length-prefixed range, a group read until its end tag or four bytes; an unknown type throws with the offset. Group skipping recurses on nested types.
258
+ * @evidence contracts/common.md#clear-and-simple-design One atomic function with a switch.
259
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown wire types are an error and not skipped by guess.
260
+ * @evidence contracts/common.md#meaningful-documentation A short comment states the supported wire types.
261
+ */
104
262
  skipType(wireType) {
105
263
  this.atomic(() => {
106
264
  switch (wireType) {
@@ -1 +1 @@
1
- {"version":3,"file":"_ProtobufReader.js","sourceRoot":"","sources":["../../src/internal/_ProtobufReader.ts"],"names":[],"mappings":";;;AAAA,gDAAgD;AAChD,wCAAyC;AAEzC,kHAAkH;AAClH;IAaE,YAAmB,GAAe;QAChC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,IAAI,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;QACrE,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC;IACxB,CAAC;IAEM,KAAK;QACV,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAEM,IAAI;QACT,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC/B,CAAC;IAEM,KAAK;QACV,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;IAEM,MAAM;QACX,MAAM,KAAK,GAAW,IAAI,CAAC,QAAQ,EAAE,CAAC;QACtC,OAAO,CAAC,KAAK,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IACtC,CAAC;IAEM,MA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AAgB,GAAG,EAAE,CAAC;AAE5B;;;;;;GAMG;AACH,MAAM,eAAe,GAAG,EAAE,CAAC;AAE3B,MAAM,IAAI,GAAG,IAAI,iBAAS,CACxB,GAAG,EAAE,CAAC,IAAI,WAAW,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CACjE,CAAC"}
@@ -1,6 +1,20 @@
1
1
  import { ProtobufWire } from "@typia/interface";
2
2
  import { Singleton } from "@typia/utils";
3
3
  //#region src/internal/_ProtobufReader.ts
4
+ /**
5
+ * Reads a Protocol Buffer message from a buffer.
6
+ *
7
+ * Every malformed input throws an error prefixed with
8
+ * `typia.protobuf.decode()`. Length-prefixed bytes, message forks and field
9
+ * skips restore their position on failure. Scalar varints may consume bytes
10
+ * before failing, and invalid UTF-8 is reported after its byte range has been
11
+ * consumed. Adapted from the fixed reader of as-proto.
12
+ *
13
+ * @evidence contracts/common.md#principled-implementation The reader decodes the wire format from a buffer with a pointer and a length-delimited boundary, throwing a typia-prefixed error for overflow, malformed varints or invalid UTF-8. Atomic bytes, fork and skip operations restore their pointer and boundary on failure; scalar varint reads can retain consumed bytes, and UTF-8 decoding can fail after bytes has completed. Varints are bounded to ten bytes with a tenth byte limited to bit 63 in every reading path, so skipping and reading agree on the wire limits.
14
+ * @evidence contracts/common.md#clear-and-simple-design One class with public typed readers, skip methods and a message fork and close pair, and private varint readers and a bounds check shared by all of them; the fault builder and limits are module constants.
15
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Limits come from the wire format; invalid input throws and is never repaired by truncation or guessing.
16
+ * @evidence contracts/common.md#meaningful-documentation A reference comment names the origin, the fields have comments and the skip and varint helpers explain their bounds.
17
+ */
4
18
  var _ProtobufReader = class {
5
19
  constructor(buf) {
6
20
  this.buf = buf;
@@ -8,41 +22,138 @@ var _ProtobufReader = class {
8
22
  this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength);
9
23
  this.end = buf.length;
10
24
  }
25
+ /**
26
+ * Return the offset of the next byte to read.
27
+ *
28
+ * @evidence contracts/common.md#principled-implementation Returns the read pointer, which is the offset of the next byte to be read.
29
+ * @evidence contracts/common.md#clear-and-simple-design One accessor.
30
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It exposes no mutable state.
31
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is returned.
32
+ */
11
33
  index() {
12
34
  return this.ptr;
13
35
  }
36
+ /**
37
+ * Return the end of the buffer or of the open length-delimited message.
38
+ *
39
+ * @evidence contracts/common.md#principled-implementation Returns the current boundary, which is the end of the whole buffer or of the open length-delimited message.
40
+ * @evidence contracts/common.md#clear-and-simple-design One accessor.
41
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts It exposes no mutable state.
42
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is returned.
43
+ */
14
44
  size() {
15
45
  return this.end;
16
46
  }
47
+ /**
48
+ * Read an unsigned 32-bit varint.
49
+ *
50
+ * @evidence contracts/common.md#principled-implementation Reads a varint and reinterprets it as an unsigned 32-bit number, so values of 2^31 or more are positive.
51
+ * @evidence contracts/common.md#clear-and-simple-design One delegation with an unsigned shift.
52
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The reading follows the wire format.
53
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
54
+ */
17
55
  uint32() {
18
56
  return this.varint32() >>> 0;
19
57
  }
58
+ /**
59
+ * Read a signed 32-bit varint.
60
+ *
61
+ * @evidence contracts/common.md#principled-implementation Reads a varint as a signed 32-bit number, which keeps the two's-complement meaning of a ten-byte negative value after truncation to 32 bits.
62
+ * @evidence contracts/common.md#clear-and-simple-design One delegation.
63
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The reading follows the wire format.
64
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
65
+ */
20
66
  int32() {
21
67
  return this.varint32();
22
68
  }
69
+ /**
70
+ * Read a ZigZag encoded signed 32-bit integer.
71
+ *
72
+ * @evidence contracts/common.md#principled-implementation The varint is decoded with the ZigZag inverse `(v >>> 1) ^ -(v & 1)`, where the unsigned shift treats the 32-bit pattern as unsigned.
73
+ * @evidence contracts/common.md#clear-and-simple-design One expression over the varint reader.
74
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is the protobuf definition.
75
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
76
+ */
23
77
  sint32() {
24
78
  const value = this.varint32();
25
79
  return value >>> 1 ^ -(value & 1);
26
80
  }
81
+ /**
82
+ * Read an unsigned 64-bit varint.
83
+ *
84
+ * @evidence contracts/common.md#principled-implementation Reads a varint as an unsigned bigint, rejecting a payload above bit 63 or a varint longer than ten bytes.
85
+ * @evidence contracts/common.md#clear-and-simple-design One delegation.
86
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The bounds are the wire format's.
87
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
88
+ */
27
89
  uint64() {
28
90
  return this.varint64();
29
91
  }
92
+ /**
93
+ * Read a signed 64-bit varint.
94
+ *
95
+ * @evidence contracts/common.md#principled-implementation Reads the unsigned pattern and reinterprets it as a signed 64-bit bigint.
96
+ * @evidence contracts/common.md#clear-and-simple-design One delegation with an integer cast.
97
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The reading follows the wire format.
98
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
99
+ */
30
100
  int64() {
31
101
  return BigInt.asIntN(64, this.varint64());
32
102
  }
103
+ /**
104
+ * Read a ZigZag encoded signed 64-bit integer.
105
+ *
106
+ * @evidence contracts/common.md#principled-implementation The varint is decoded with the ZigZag inverse on a bigint.
107
+ * @evidence contracts/common.md#clear-and-simple-design One expression over the 64-bit reader.
108
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is the protobuf definition.
109
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
110
+ */
33
111
  sint64() {
34
112
  const value = this.varint64();
35
113
  return value >> BigInt(1) ^ -(value & BigInt(1));
36
114
  }
115
+ /**
116
+ * Read a boolean, which is true for any non-zero varint.
117
+ *
118
+ * @evidence contracts/common.md#principled-implementation A varint is true when it is not zero, as the format defines.
119
+ * @evidence contracts/common.md#clear-and-simple-design One delegation.
120
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The reading follows the wire format.
121
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
122
+ */
37
123
  bool() {
38
124
  return this.varint32() !== 0;
39
125
  }
126
+ /**
127
+ * Read a little-endian 32-bit float.
128
+ *
129
+ * @evidence contracts/common.md#principled-implementation Reads four little-endian bytes through the data view after a bounds check.
130
+ * @evidence contracts/common.md#clear-and-simple-design One checked read.
131
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The bounds check throws rather than reading past the boundary.
132
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
133
+ */
40
134
  float() {
41
135
  return this.view.getFloat32(this.take(4), true);
42
136
  }
137
+ /**
138
+ * Read a little-endian 64-bit float.
139
+ *
140
+ * @evidence contracts/common.md#principled-implementation Reads eight little-endian bytes through the data view after a bounds check.
141
+ * @evidence contracts/common.md#clear-and-simple-design One checked read.
142
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The bounds check throws rather than reading past the boundary.
143
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
144
+ */
43
145
  double() {
44
146
  return this.view.getFloat64(this.take(8), true);
45
147
  }
148
+ /**
149
+ * Read a length-prefixed byte range as a view into the buffer, without
150
+ * copying.
151
+ *
152
+ * @evidence contracts/common.md#principled-implementation Reads a length-prefixed byte range as a view of the buffer and not a copy, inside an atomic block that restores the pointer if the length is invalid.
153
+ * @evidence contracts/common.md#clear-and-simple-design One function using the checked read.
154
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The returned view shares memory with the input buffer, a stated aliasing.
155
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
156
+ */
46
157
  bytes() {
47
158
  return this.atomic(() => {
48
159
  const length = this.uint32();
@@ -50,6 +161,15 @@ var _ProtobufReader = class {
50
161
  return this.buf.subarray(from, from + length);
51
162
  });
52
163
  }
164
+ /**
165
+ * Read a length-prefixed UTF-8 string, throwing on invalid UTF-8 after
166
+ * consuming its byte range. An invalid length restores the read position.
167
+ *
168
+ * @evidence contracts/common.md#principled-implementation Reads the bytes and decodes them with a decoder that is fatal on invalid UTF-8, so malformed text throws a typia error instead of producing replacement characters. A byte-range failure rolls back through bytes; a decoding failure occurs after that range has been consumed and does not rewind it.
169
+ * @evidence contracts/common.md#clear-and-simple-design One function over bytes with a shared decoder.
170
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The error is raised, not repaired.
171
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.
172
+ */
53
173
  string() {
54
174
  const bytes = this.bytes();
55
175
  const decoder = utf8.get();
@@ -59,6 +179,15 @@ var _ProtobufReader = class {
59
179
  throw error("invalid UTF-8 string.");
60
180
  }
61
181
  }
182
+ /**
183
+ * Begin a length-delimited message and return the previous boundary to pass
184
+ * to `close`.
185
+ *
186
+ * @evidence contracts/common.md#principled-implementation Reads the length prefix, checks that it fits within the current boundary, narrows the boundary to the message end and returns the previous boundary for `close`; the pointer is restored on failure.
187
+ * @evidence contracts/common.md#clear-and-simple-design One atomic function paired with close.
188
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The bounds check throws on an oversized prefix.
189
+ * @evidence contracts/common.md#meaningful-documentation A short comment states what is returned.
190
+ */
62
191
  fork() {
63
192
  return this.atomic(() => {
64
193
  const previous = this.end;
@@ -68,11 +197,27 @@ var _ProtobufReader = class {
68
197
  return previous;
69
198
  });
70
199
  }
200
+ /**
201
+ * End the message that `fork` began, which must have been consumed
202
+ * completely.
203
+ *
204
+ * @evidence contracts/common.md#principled-implementation Requires that the whole message was consumed and restores the previous boundary; an unread remainder is a malformed message and throws.
205
+ * @evidence contracts/common.md#clear-and-simple-design One check and one assignment.
206
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The strictness is intentional and reports corruption.
207
+ * @evidence contracts/common.md#meaningful-documentation A short comment states the check.
208
+ */
71
209
  close(previous) {
72
210
  if (this.ptr !== this.end) throw error("buffer overflow.");
73
211
  this.end = previous;
74
212
  }
75
- /** Advance by exactly `length` bytes, for every length including zero. */
213
+ /**
214
+ * Advance by exactly `length` bytes, for every length including zero.
215
+ *
216
+ * @evidence contracts/common.md#principled-implementation Advances exactly the given number of bytes after a bounds check, including zero, so a zero-length field is skipped without moving or failing.
217
+ * @evidence contracts/common.md#clear-and-simple-design One checked advance.
218
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The bounds check throws on overflow.
219
+ * @evidence contracts/common.md#meaningful-documentation A short comment states the zero-length case.
220
+ */
76
221
  skip(length) {
77
222
  this.take(length);
78
223
  }
@@ -87,6 +232,11 @@ var _ProtobufReader = class {
87
232
  * never notices a value it could not have represented. Relaxing either bound
88
233
  * here would accept a varint that `varint32` and `varint64` reject, making
89
234
  * the limit depend on which method happens to consume the value.
235
+ *
236
+ * @evidence contracts/common.md#principled-implementation Advances over one varint, which has no length prefix, using the same ten-byte and bit-63 limits as the value readers, so the limit does not depend on which method consumes the value.
237
+ * @evidence contracts/common.md#clear-and-simple-design One atomic loop that delegates the last byte check to a shared helper.
238
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts The skipped bytes are validated, which is the point of the helper; no looser limit is used.
239
+ * @evidence contracts/common.md#meaningful-documentation A long comment explains the bounds and why skipping must match reading.
90
240
  */
91
241
  skipVarint() {
92
242
  this.atomic(() => {
@@ -94,6 +244,14 @@ var _ProtobufReader = class {
94
244
  this.lastVarintByte();
95
245
  });
96
246
  }
247
+ /**
248
+ * Skip a field of the given wire type, including a nested group.
249
+ *
250
+ * @evidence contracts/common.md#principled-implementation A wire type selects how far to advance: a varint, eight bytes, a length-prefixed range, a group read until its end tag or four bytes; an unknown type throws with the offset. Group skipping recurses on nested types.
251
+ * @evidence contracts/common.md#clear-and-simple-design One atomic function with a switch.
252
+ * @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown wire types are an error and not skipped by guess.
253
+ * @evidence contracts/common.md#meaningful-documentation A short comment states the supported wire types.
254
+ */
97
255
  skipType(wireType) {
98
256
  this.atomic(() => {
99
257
  switch (wireType) {
@@ -1 +1 @@
1
- {"version":3,"file":"_ProtobufReader.mjs","names":[],"sources":["../../src/internal/_ProtobufReader.ts"],"sourcesContent":["import { ProtobufWire } from \"@typia/interface\";\nimport { Singleton } from \"@typia/utils\";\n\n/// @reference https://github.com/piotr-oles/as-proto/blob/main/packages/as-proto/assembly/internal/FixedReader.ts\nexport class _ProtobufReader {\n /** Read buffer */\n private buf: Uint8Array;\n\n /** Read buffer pointer. */\n private ptr: number;\n\n /** DataView for buffer. */\n private view: DataView;\n\n /** Current length-delimited boundary. */\n private end: number;\n\n public constructor(buf: Uint8Array) {\n this.buf = buf;\n this.ptr = 0;\n this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength);\n this.end = buf.length;\n }\n\n public index(): number {\n return this.ptr;\n }\n\n public size(): number {\n return this.end;\n }\n\n public uint32(): number {\n return this.varint32() >>> 0;\n }\n\n public int32(): number {\n return this.varint32();\n }\n\n public sint32(): number {\n const value: number = this.varint32();\n return (value >>> 1) ^ -(value & 1);\n }\n\n public uint64(): bigint {\n return this.varint64();\n }\n\n public int64(): bigint {\n return BigInt.asIntN(64, this.varint64());\n }\n\n public sint64(): bigint {\n const value = this.varint64();\n return (value >> BigInt(0x01)) ^ -(value & BigInt(0x01));\n }\n\n public bool(): boolean {\n return this.varint32() !== 0;\n }\n\n public float(): number {\n return this.view.getFloat32(this.take(4), true);\n }\n\n public double(): number {\n return this.view.getFloat64(this.take(8), true);\n }\n\n public bytes(): Uint8Array {\n return this.atomic(() => {\n const length: number = this.uint32();\n const from: number = this.take(length);\n return this.buf.subarray(from, from + length);\n });\n }\n\n public string(): string {\n const bytes: Uint8Array = this.bytes();\n const decoder: TextDecoder = utf8.get();\n try {\n return decoder.decode(bytes);\n } catch {\n throw error(\"invalid UTF-8 string.\");\n }\n }\n\n public fork(): number {\n return this.atomic(() => {\n const previous: number = this.end;\n const length: number = this.uint32();\n this.validate(length);\n this.end = this.ptr + length;\n return previous;\n });\n }\n\n public close(previous: number): void {\n if (this.ptr !== this.end) throw error(\"buffer overflow.\");\n this.end = previous;\n }\n\n /** Advance by exactly `length` bytes, for every length including zero. */\n public skip(length: number): void {\n this.take(length);\n }\n\n /**\n * Advance by exactly one varint, which carries no length prefix.\n *\n * A varint terminates at its first byte without the continuation bit, and may\n * occupy no more than {@link VARINT_MAX_BYTES}. Its tenth byte is bounded\n * twice over, by {@link lastVarintByte}: it may neither continue into an\n * eleventh byte nor carry payload above bit 63. Skipping is where that is\n * easiest to get wrong, because this path discards the bytes it reads and so\n * never notices a value it could not have represented. Relaxing either bound\n * here would accept a varint that `varint32` and `varint64` reject, making\n * the limit depend on which method happens to consume the value.\n */\n public skipVarint(): void {\n this.atomic(() => {\n for (let i: number = 1; i < VARINT_MAX_BYTES; ++i)\n if ((this.u8() & 0x80) === 0) return;\n this.lastVarintByte();\n });\n }\n\n public skipType(wireType: ProtobufWire): void {\n this.atomic(() => {\n switch (wireType) {\n case ProtobufWire.VARIANT:\n this.skipVarint();\n break;\n case ProtobufWire.I64:\n this.skip(8);\n break;\n case ProtobufWire.LEN:\n this.skip(this.uint32());\n break;\n case ProtobufWire.START_GROUP:\n while ((wireType = this.uint32() & 0x07) !== ProtobufWire.END_GROUP)\n this.skipType(wireType);\n break;\n case ProtobufWire.I32:\n this.skip(4);\n break;\n default:\n throw error(`invalid wire type ${wireType} at offset ${this.ptr}.`);\n }\n });\n }\n\n private varint32(): number {\n let loaded: number;\n let value: number;\n\n value = (loaded = this.u8()) & 0x7f;\n if (loaded < 0x80) return value;\n\n value |= ((loaded = this.u8()) & 0x7f) << 7;\n if (loaded < 0x80) return value;\n\n value |= ((loaded = this.u8()) & 0x7f) << 14;\n if (loaded < 0x80) return value;\n\n value |= ((loaded = this.u8()) & 0x7f) << 21;\n if (loaded < 0x80) return value;\n\n value |= ((loaded = this.u8()) & 0xf) << 28;\n if (loaded < 0x80) return value;\n\n // increment position until there is no continuation bit, or until this read\n // reaches VARINT_MAX_BYTES and the value can hold no further bits\n if (this.u8() < 0x80) return value;\n if (this.u8() < 0x80) return value;\n if (this.u8() < 0x80) return value;\n if (this.u8() < 0x80) return value;\n this.lastVarintByte();\n return value;\n }\n\n private varint64(): bigint {\n let loaded: bigint;\n let value: bigint;\n\n value = (loaded = this.u8n()) & BigInt(0x7f);\n if (loaded < BigInt(0x80)) return value;\n\n value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(7);\n if (loaded < BigInt(0x80)) return value;\n\n value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(14);\n if (loaded < BigInt(0x80)) return value;\n\n value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(21);\n if (loaded < BigInt(0x80)) return value;\n\n value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(28);\n if (loaded < BigInt(0x80)) return value;\n\n value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(35);\n if (loaded < BigInt(0x80)) return value;\n\n value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(42);\n if (loaded < BigInt(0x80)) return value;\n\n value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(49);\n if (loaded < BigInt(0x80)) return value;\n\n value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(56);\n if (loaded < BigInt(0x80)) return value;\n\n value |= BigInt(this.lastVarintByte()) << BigInt(63);\n return BigInt.asUintN(64, value);\n }\n\n /**\n * Read the only byte whose varint payload is limited to bit 63.\n *\n * Two distinct faults meet on this byte, and each is named for what it is. A\n * continuation bit means the varint would occupy an eleventh byte, which no\n * 64-bit value can reach. Any other payload bit means the varint terminates\n * within its ten bytes but carries a value bit above 63. Reporting the second\n * as a length fault would tell the caller something untrue about a payload\n * that is exactly ten bytes long.\n */\n private lastVarintByte(): number {\n const loaded: number = this.u8();\n if ((loaded & 0x80) !== 0)\n throw error(`varint exceeds ${VARINT_MAX_BYTES} bytes.`);\n if (loaded > 0x01) throw error(`varint exceeds ${VARINT_MAX_BITS} bits.`);\n return loaded;\n }\n\n private u8(): number {\n return this.view.getUint8(this.take(1));\n }\n\n private u8n(): bigint {\n return BigInt(this.u8());\n }\n\n private take(length: number): number {\n this.validate(length);\n const from: number = this.ptr;\n this.ptr += length;\n return from;\n }\n\n private atomic<T>(closure: () => T): T {\n const index: number = this.ptr;\n const end: number = this.end;\n try {\n return closure();\n } catch (thrown) {\n this.ptr = index;\n this.end = end;\n throw thrown;\n }\n }\n\n private validate(length: number): void {\n if (\n Number.isSafeInteger(length) === false ||\n length < 0 ||\n length > this.size() - this.ptr\n )\n throw error(\"buffer overflow.\");\n }\n}\n\n/**\n * Builds every fault this reader raises, so each one names typia as its source.\n *\n * Every decode error a caller can see must be attributable, and the prefix is\n * what attributes it. Composing it here rather than at each throw keeps a new\n * fault from silently shipping without it.\n */\nconst error = (message: string): Error =>\n new Error(`Error on typia.protobuf.decode(): ${message}`);\n\n/**\n * The most bytes a varint may occupy: a 64-bit value in seven-bit groups.\n *\n * Every path reads no further than its tenth byte and accepts only bit 63 from\n * that byte. This constant keeps the loop-driven skip path on the same limit.\n */\nconst VARINT_MAX_BYTES = 10;\n\n/**\n * The widest value a varint may carry: the 64-bit Protocol Buffer wire domain.\n *\n * The tenth byte reaches only bit 63, so a payload bit above it belongs to no\n * representable value. This names the overflow fault apart from the length\n * one.\n */\nconst VARINT_MAX_BITS = 64;\n\nconst utf8 = new Singleton(\n () => new TextDecoder(\"utf-8\", { fatal: true, ignoreBOM: true }),\n);\n"],"mappings":";;;AAIA,IAAa,kBAAb,MAA6B;CAa3B,YAAmB,KAAiB;EAClC,KAAK,MAAM;EACX,KAAK,MAAM;EACX,KAAK,OAAO,IAAI,SAAS,IAAI,QAAQ,IAAI,YAAY,IAAI,UAAU;EACnE,KAAK,MAAM,IAAI;CACjB;CAEA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iC;EAC/B,MAAM,SAAiB,KAAK,GAAG;EAC/B,KAAK,SAAS,SAAU,GACtB,MAAM,MAAM,kBAAkB,iBAAiB,QAAQ;EACzD,IAAI,SAAS,GAAM,MAAM,MAAM,kBAAkB,gBAAgB,OAAO;EACxE,OAAO;CACT;CAEA,KAAqB;EACnB,OAAO,KAAK,KAAK,SAAS,KAAK,KAAK,CAAC,CAAC;CACxC;CAEA,MAAsB;EACpB,OAAO,OAAO,KAAK,GAAG,CAAC;CACzB;CAEA,KAAa,QAAwB;EACnC,KAAK,SAAS,MAAM;EACpB,MAAM,OAAe,KAAK;EAC1B,KAAK,OAAO;EACZ,OAAO;CACT;CAEA,OAAkB,SAAqB;EACrC,MAAM,QAAgB,KAAK;EAC3B,MAAM,MAAc,KAAK;EACzB,IAAI;GACF,OAAO,QAAQ;EACjB,SAAS,QAAQ;GACf,KAAK,MAAM;GACX,KAAK,MAAM;GACX,MAAM;EACR;CACF;CAEA,SAAiB,QAAsB;EACrC,IACE,OAAO,cAAc,MAAM,MAAM,SACjC,SAAS,KACT,SAAS,KAAK,KAAK,IAAI,KAAK,KAE5B,MAAM,MAAM,kBAAkB;CAClC;AACF;;;;;;;;AASA,MAAM,SAAS,4BACb,IAAI,MAAM,qCAAqC,SAAS;;;;;;;AAQ1D,MAAM,mBAAmB;;;;;;;;AASzB,MAAM,kBAAkB;AAExB,MAAM,OAAO,IAAI,gBACT,IAAI,YAAY,SAAS;CAAE,OAAO;CAAM,WAAW;AAAK,CAAC,CACjE"}
1
+ {"version":3,"file":"_ProtobufReader.mjs","names":[],"sources":["../../src/internal/_ProtobufReader.ts"],"sourcesContent":["import { ProtobufWire } from \"@typia/interface\";\nimport { Singleton } from \"@typia/utils\";\n\n/// @reference https://github.com/piotr-oles/as-proto/blob/main/packages/as-proto/assembly/internal/FixedReader.ts\n/**\n * Reads a Protocol Buffer message from a buffer.\n *\n * Every malformed input throws an error prefixed with\n * `typia.protobuf.decode()`. Length-prefixed bytes, message forks and field\n * skips restore their position on failure. Scalar varints may consume bytes\n * before failing, and invalid UTF-8 is reported after its byte range has been\n * consumed. Adapted from the fixed reader of as-proto.\n *\n * @evidence contracts/common.md#principled-implementation The reader decodes the wire format from a buffer with a pointer and a length-delimited boundary, throwing a typia-prefixed error for overflow, malformed varints or invalid UTF-8. Atomic bytes, fork and skip operations restore their pointer and boundary on failure; scalar varint reads can retain consumed bytes, and UTF-8 decoding can fail after bytes has completed. Varints are bounded to ten bytes with a tenth byte limited to bit 63 in every reading path, so skipping and reading agree on the wire limits.\n * @evidence contracts/common.md#clear-and-simple-design One class with public typed readers, skip methods and a message fork and close pair, and private varint readers and a bounds check shared by all of them; the fault builder and limits are module constants.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts Limits come from the wire format; invalid input throws and is never repaired by truncation or guessing.\n * @evidence contracts/common.md#meaningful-documentation A reference comment names the origin, the fields have comments and the skip and varint helpers explain their bounds.\n */\nexport class _ProtobufReader {\n /** Read buffer */\n private buf: Uint8Array;\n\n /** Read buffer pointer. */\n private ptr: number;\n\n /** DataView for buffer. */\n private view: DataView;\n\n /** Current length-delimited boundary. */\n private end: number;\n\n public constructor(buf: Uint8Array) {\n this.buf = buf;\n this.ptr = 0;\n this.view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength);\n this.end = buf.length;\n }\n\n /**\n * Return the offset of the next byte to read.\n *\n * @evidence contracts/common.md#principled-implementation Returns the read pointer, which is the offset of the next byte to be read.\n * @evidence contracts/common.md#clear-and-simple-design One accessor.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It exposes no mutable state.\n * @evidence contracts/common.md#meaningful-documentation A short comment states what is returned.\n */\n public index(): number {\n return this.ptr;\n }\n\n /**\n * Return the end of the buffer or of the open length-delimited message.\n *\n * @evidence contracts/common.md#principled-implementation Returns the current boundary, which is the end of the whole buffer or of the open length-delimited message.\n * @evidence contracts/common.md#clear-and-simple-design One accessor.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts It exposes no mutable state.\n * @evidence contracts/common.md#meaningful-documentation A short comment states what is returned.\n */\n public size(): number {\n return this.end;\n }\n\n /**\n * Read an unsigned 32-bit varint.\n *\n * @evidence contracts/common.md#principled-implementation Reads a varint and reinterprets it as an unsigned 32-bit number, so values of 2^31 or more are positive.\n * @evidence contracts/common.md#clear-and-simple-design One delegation with an unsigned shift.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The reading follows the wire format.\n * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.\n */\n public uint32(): number {\n return this.varint32() >>> 0;\n }\n\n /**\n * Read a signed 32-bit varint.\n *\n * @evidence contracts/common.md#principled-implementation Reads a varint as a signed 32-bit number, which keeps the two's-complement meaning of a ten-byte negative value after truncation to 32 bits.\n * @evidence contracts/common.md#clear-and-simple-design One delegation.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The reading follows the wire format.\n * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.\n */\n public int32(): number {\n return this.varint32();\n }\n\n /**\n * Read a ZigZag encoded signed 32-bit integer.\n *\n * @evidence contracts/common.md#principled-implementation The varint is decoded with the ZigZag inverse `(v >>> 1) ^ -(v & 1)`, where the unsigned shift treats the 32-bit pattern as unsigned.\n * @evidence contracts/common.md#clear-and-simple-design One expression over the varint reader.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is the protobuf definition.\n * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.\n */\n public sint32(): number {\n const value: number = this.varint32();\n return (value >>> 1) ^ -(value & 1);\n }\n\n /**\n * Read an unsigned 64-bit varint.\n *\n * @evidence contracts/common.md#principled-implementation Reads a varint as an unsigned bigint, rejecting a payload above bit 63 or a varint longer than ten bytes.\n * @evidence contracts/common.md#clear-and-simple-design One delegation.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The bounds are the wire format's.\n * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.\n */\n public uint64(): bigint {\n return this.varint64();\n }\n\n /**\n * Read a signed 64-bit varint.\n *\n * @evidence contracts/common.md#principled-implementation Reads the unsigned pattern and reinterprets it as a signed 64-bit bigint.\n * @evidence contracts/common.md#clear-and-simple-design One delegation with an integer cast.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The reading follows the wire format.\n * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.\n */\n public int64(): bigint {\n return BigInt.asIntN(64, this.varint64());\n }\n\n /**\n * Read a ZigZag encoded signed 64-bit integer.\n *\n * @evidence contracts/common.md#principled-implementation The varint is decoded with the ZigZag inverse on a bigint.\n * @evidence contracts/common.md#clear-and-simple-design One expression over the 64-bit reader.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The mapping is the protobuf definition.\n * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.\n */\n public sint64(): bigint {\n const value = this.varint64();\n return (value >> BigInt(0x01)) ^ -(value & BigInt(0x01));\n }\n\n /**\n * Read a boolean, which is true for any non-zero varint.\n *\n * @evidence contracts/common.md#principled-implementation A varint is true when it is not zero, as the format defines.\n * @evidence contracts/common.md#clear-and-simple-design One delegation.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The reading follows the wire format.\n * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.\n */\n public bool(): boolean {\n return this.varint32() !== 0;\n }\n\n /**\n * Read a little-endian 32-bit float.\n *\n * @evidence contracts/common.md#principled-implementation Reads four little-endian bytes through the data view after a bounds check.\n * @evidence contracts/common.md#clear-and-simple-design One checked read.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The bounds check throws rather than reading past the boundary.\n * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.\n */\n public float(): number {\n return this.view.getFloat32(this.take(4), true);\n }\n\n /**\n * Read a little-endian 64-bit float.\n *\n * @evidence contracts/common.md#principled-implementation Reads eight little-endian bytes through the data view after a bounds check.\n * @evidence contracts/common.md#clear-and-simple-design One checked read.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The bounds check throws rather than reading past the boundary.\n * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.\n */\n public double(): number {\n return this.view.getFloat64(this.take(8), true);\n }\n\n /**\n * Read a length-prefixed byte range as a view into the buffer, without\n * copying.\n *\n * @evidence contracts/common.md#principled-implementation Reads a length-prefixed byte range as a view of the buffer and not a copy, inside an atomic block that restores the pointer if the length is invalid.\n * @evidence contracts/common.md#clear-and-simple-design One function using the checked read.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The returned view shares memory with the input buffer, a stated aliasing.\n * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.\n */\n public bytes(): Uint8Array {\n return this.atomic(() => {\n const length: number = this.uint32();\n const from: number = this.take(length);\n return this.buf.subarray(from, from + length);\n });\n }\n\n /**\n * Read a length-prefixed UTF-8 string, throwing on invalid UTF-8 after\n * consuming its byte range. An invalid length restores the read position.\n *\n * @evidence contracts/common.md#principled-implementation Reads the bytes and decodes them with a decoder that is fatal on invalid UTF-8, so malformed text throws a typia error instead of producing replacement characters. A byte-range failure rolls back through bytes; a decoding failure occurs after that range has been consumed and does not rewind it.\n * @evidence contracts/common.md#clear-and-simple-design One function over bytes with a shared decoder.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The error is raised, not repaired.\n * @evidence contracts/common.md#meaningful-documentation A short comment states what is read.\n */\n public string(): string {\n const bytes: Uint8Array = this.bytes();\n const decoder: TextDecoder = utf8.get();\n try {\n return decoder.decode(bytes);\n } catch {\n throw error(\"invalid UTF-8 string.\");\n }\n }\n\n /**\n * Begin a length-delimited message and return the previous boundary to pass\n * to `close`.\n *\n * @evidence contracts/common.md#principled-implementation Reads the length prefix, checks that it fits within the current boundary, narrows the boundary to the message end and returns the previous boundary for `close`; the pointer is restored on failure.\n * @evidence contracts/common.md#clear-and-simple-design One atomic function paired with close.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The bounds check throws on an oversized prefix.\n * @evidence contracts/common.md#meaningful-documentation A short comment states what is returned.\n */\n public fork(): number {\n return this.atomic(() => {\n const previous: number = this.end;\n const length: number = this.uint32();\n this.validate(length);\n this.end = this.ptr + length;\n return previous;\n });\n }\n\n /**\n * End the message that `fork` began, which must have been consumed\n * completely.\n *\n * @evidence contracts/common.md#principled-implementation Requires that the whole message was consumed and restores the previous boundary; an unread remainder is a malformed message and throws.\n * @evidence contracts/common.md#clear-and-simple-design One check and one assignment.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The strictness is intentional and reports corruption.\n * @evidence contracts/common.md#meaningful-documentation A short comment states the check.\n */\n public close(previous: number): void {\n if (this.ptr !== this.end) throw error(\"buffer overflow.\");\n this.end = previous;\n }\n\n /**\n * Advance by exactly `length` bytes, for every length including zero.\n *\n * @evidence contracts/common.md#principled-implementation Advances exactly the given number of bytes after a bounds check, including zero, so a zero-length field is skipped without moving or failing.\n * @evidence contracts/common.md#clear-and-simple-design One checked advance.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The bounds check throws on overflow.\n * @evidence contracts/common.md#meaningful-documentation A short comment states the zero-length case.\n */\n public skip(length: number): void {\n this.take(length);\n }\n\n /**\n * Advance by exactly one varint, which carries no length prefix.\n *\n * A varint terminates at its first byte without the continuation bit, and may\n * occupy no more than {@link VARINT_MAX_BYTES}. Its tenth byte is bounded\n * twice over, by {@link lastVarintByte}: it may neither continue into an\n * eleventh byte nor carry payload above bit 63. Skipping is where that is\n * easiest to get wrong, because this path discards the bytes it reads and so\n * never notices a value it could not have represented. Relaxing either bound\n * here would accept a varint that `varint32` and `varint64` reject, making\n * the limit depend on which method happens to consume the value.\n *\n * @evidence contracts/common.md#principled-implementation Advances over one varint, which has no length prefix, using the same ten-byte and bit-63 limits as the value readers, so the limit does not depend on which method consumes the value.\n * @evidence contracts/common.md#clear-and-simple-design One atomic loop that delegates the last byte check to a shared helper.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The skipped bytes are validated, which is the point of the helper; no looser limit is used.\n * @evidence contracts/common.md#meaningful-documentation A long comment explains the bounds and why skipping must match reading.\n */\n public skipVarint(): void {\n this.atomic(() => {\n for (let i: number = 1; i < VARINT_MAX_BYTES; ++i)\n if ((this.u8() & 0x80) === 0) return;\n this.lastVarintByte();\n });\n }\n\n /**\n * Skip a field of the given wire type, including a nested group.\n *\n * @evidence contracts/common.md#principled-implementation A wire type selects how far to advance: a varint, eight bytes, a length-prefixed range, a group read until its end tag or four bytes; an unknown type throws with the offset. Group skipping recurses on nested types.\n * @evidence contracts/common.md#clear-and-simple-design One atomic function with a switch.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts Unknown wire types are an error and not skipped by guess.\n * @evidence contracts/common.md#meaningful-documentation A short comment states the supported wire types.\n */\n public skipType(wireType: ProtobufWire): void {\n this.atomic(() => {\n switch (wireType) {\n case ProtobufWire.VARIANT:\n this.skipVarint();\n break;\n case ProtobufWire.I64:\n this.skip(8);\n break;\n case ProtobufWire.LEN:\n this.skip(this.uint32());\n break;\n case ProtobufWire.START_GROUP:\n while ((wireType = this.uint32() & 0x07) !== ProtobufWire.END_GROUP)\n this.skipType(wireType);\n break;\n case ProtobufWire.I32:\n this.skip(4);\n break;\n default:\n throw error(`invalid wire type ${wireType} at offset ${this.ptr}.`);\n }\n });\n }\n\n private varint32(): number {\n let loaded: number;\n let value: number;\n\n value = (loaded = this.u8()) & 0x7f;\n if (loaded < 0x80) return value;\n\n value |= ((loaded = this.u8()) & 0x7f) << 7;\n if (loaded < 0x80) return value;\n\n value |= ((loaded = this.u8()) & 0x7f) << 14;\n if (loaded < 0x80) return value;\n\n value |= ((loaded = this.u8()) & 0x7f) << 21;\n if (loaded < 0x80) return value;\n\n value |= ((loaded = this.u8()) & 0xf) << 28;\n if (loaded < 0x80) return value;\n\n // increment position until there is no continuation bit, or until this read\n // reaches VARINT_MAX_BYTES and the value can hold no further bits\n if (this.u8() < 0x80) return value;\n if (this.u8() < 0x80) return value;\n if (this.u8() < 0x80) return value;\n if (this.u8() < 0x80) return value;\n this.lastVarintByte();\n return value;\n }\n\n private varint64(): bigint {\n let loaded: bigint;\n let value: bigint;\n\n value = (loaded = this.u8n()) & BigInt(0x7f);\n if (loaded < BigInt(0x80)) return value;\n\n value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(7);\n if (loaded < BigInt(0x80)) return value;\n\n value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(14);\n if (loaded < BigInt(0x80)) return value;\n\n value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(21);\n if (loaded < BigInt(0x80)) return value;\n\n value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(28);\n if (loaded < BigInt(0x80)) return value;\n\n value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(35);\n if (loaded < BigInt(0x80)) return value;\n\n value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(42);\n if (loaded < BigInt(0x80)) return value;\n\n value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(49);\n if (loaded < BigInt(0x80)) return value;\n\n value |= ((loaded = this.u8n()) & BigInt(0x7f)) << BigInt(56);\n if (loaded < BigInt(0x80)) return value;\n\n value |= BigInt(this.lastVarintByte()) << BigInt(63);\n return BigInt.asUintN(64, value);\n }\n\n /**\n * Read the only byte whose varint payload is limited to bit 63.\n *\n * Two distinct faults meet on this byte, and each is named for what it is. A\n * continuation bit means the varint would occupy an eleventh byte, which no\n * 64-bit value can reach. Any other payload bit means the varint terminates\n * within its ten bytes but carries a value bit above 63. Reporting the second\n * as a length fault would tell the caller something untrue about a payload\n * that is exactly ten bytes long.\n */\n private lastVarintByte(): number {\n const loaded: number = this.u8();\n if ((loaded & 0x80) !== 0)\n throw error(`varint exceeds ${VARINT_MAX_BYTES} bytes.`);\n if (loaded > 0x01) throw error(`varint exceeds ${VARINT_MAX_BITS} bits.`);\n return loaded;\n }\n\n private u8(): number {\n return this.view.getUint8(this.take(1));\n }\n\n private u8n(): bigint {\n return BigInt(this.u8());\n }\n\n private take(length: number): number {\n this.validate(length);\n const from: number = this.ptr;\n this.ptr += length;\n return from;\n }\n\n private atomic<T>(closure: () => T): T {\n const index: number = this.ptr;\n const end: number = this.end;\n try {\n return closure();\n } catch (thrown) {\n this.ptr = index;\n this.end = end;\n throw thrown;\n }\n }\n\n private validate(length: number): void {\n if (\n Number.isSafeInteger(length) === false ||\n length < 0 ||\n length > this.size() - this.ptr\n )\n throw error(\"buffer overflow.\");\n }\n}\n\n/**\n * Builds every fault this reader raises, so each one names typia as its source.\n *\n * Every decode error a caller can see must be attributable, and the prefix is\n * what attributes it. Composing it here rather than at each throw keeps a new\n * fault from silently shipping without it.\n */\nconst error = (message: string): Error =>\n new Error(`Error on typia.protobuf.decode(): ${message}`);\n\n/**\n * The most bytes a varint may occupy: a 64-bit value in seven-bit groups.\n *\n * Every path reads no further than its tenth byte and accepts only bit 63 from\n * that byte. This constant keeps the loop-driven skip path on the same limit.\n */\nconst VARINT_MAX_BYTES = 10;\n\n/**\n * The widest value a varint may carry: the 64-bit Protocol Buffer wire domain.\n *\n * The tenth byte reaches only bit 63, so a payload bit above it belongs to no\n * representable value. This names the overflow fault apart from the length\n * one.\n */\nconst VARINT_MAX_BITS = 64;\n\nconst utf8 = new Singleton(\n () => new TextDecoder(\"utf-8\", { fatal: true, ignoreBOM: true }),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,IAAa,kBAAb,MAA6B;CAa3B,YAAmB,KAAiB;EAClC,KAAK,MAAM;EACX,KAAK,MAAM;EACX,KAAK,OAAO,IAAI,SAAS,IAAI,QAAQ,IAAI,YAAY,IAAI,UAAU;EACnE,KAAK,MAAM,IAAI;CACjB;;;;;;;;;CAUA,QAAuB;EACrB,OAAO,KAAK;CACd;;;;;;;;;CAUA,OAAsB;EACpB,OAAO,KAAK;CACd;;;;;;;;;CAUA,SAAwB;EACtB,OAAO,KAAK,SAAS,MAAM;CAC7B;;;;;;;;;CAUA,QAAuB;EACrB,OAAO,KAAK,SAAS;CACvB;;;;;;;;;CAUA,SAAwB;EACtB,MAAM,QAAgB,KAAK,SAAS;EACpC,OAAQ,UAAU,IAAK,EAAE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