@resultsafe/core-fp-result 0.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 (389) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +273 -0
  3. package/README.ru.md +266 -0
  4. package/dist/LICENSE +21 -0
  5. package/dist/README.md +273 -0
  6. package/dist/cjs/constructors/Err.js +4 -0
  7. package/dist/cjs/constructors/Err.js.map +1 -0
  8. package/dist/cjs/constructors/Ok.js +4 -0
  9. package/dist/cjs/constructors/Ok.js.map +1 -0
  10. package/dist/cjs/guards/isErr.js +4 -0
  11. package/dist/cjs/guards/isErr.js.map +1 -0
  12. package/dist/cjs/guards/isErrAnd.js +5 -0
  13. package/dist/cjs/guards/isErrAnd.js.map +1 -0
  14. package/dist/cjs/guards/isOk.js +4 -0
  15. package/dist/cjs/guards/isOk.js.map +1 -0
  16. package/dist/cjs/guards/isOkAnd.js +5 -0
  17. package/dist/cjs/guards/isOkAnd.js.map +1 -0
  18. package/dist/cjs/index.js +70 -0
  19. package/dist/cjs/index.js.map +1 -0
  20. package/dist/cjs/internal/object.js +6 -0
  21. package/dist/cjs/internal/object.js.map +1 -0
  22. package/dist/cjs/internal/option.js +6 -0
  23. package/dist/cjs/internal/option.js.map +1 -0
  24. package/dist/cjs/methods/andThen.js +5 -0
  25. package/dist/cjs/methods/andThen.js.map +1 -0
  26. package/dist/cjs/methods/err.js +6 -0
  27. package/dist/cjs/methods/err.js.map +1 -0
  28. package/dist/cjs/methods/expect.js +10 -0
  29. package/dist/cjs/methods/expect.js.map +1 -0
  30. package/dist/cjs/methods/expectErr.js +10 -0
  31. package/dist/cjs/methods/expectErr.js.map +1 -0
  32. package/dist/cjs/methods/flatten.js +4 -0
  33. package/dist/cjs/methods/flatten.js.map +1 -0
  34. package/dist/cjs/methods/inspect.js +10 -0
  35. package/dist/cjs/methods/inspect.js.map +1 -0
  36. package/dist/cjs/methods/inspectErr.js +10 -0
  37. package/dist/cjs/methods/inspectErr.js.map +1 -0
  38. package/dist/cjs/methods/map.js +5 -0
  39. package/dist/cjs/methods/map.js.map +1 -0
  40. package/dist/cjs/methods/mapErr.js +5 -0
  41. package/dist/cjs/methods/mapErr.js.map +1 -0
  42. package/dist/cjs/methods/match.js +11 -0
  43. package/dist/cjs/methods/match.js.map +1 -0
  44. package/dist/cjs/methods/ok.js +6 -0
  45. package/dist/cjs/methods/ok.js.map +1 -0
  46. package/dist/cjs/methods/orElse.js +5 -0
  47. package/dist/cjs/methods/orElse.js.map +1 -0
  48. package/dist/cjs/methods/tap.js +9 -0
  49. package/dist/cjs/methods/tap.js.map +1 -0
  50. package/dist/cjs/methods/tapErr.js +10 -0
  51. package/dist/cjs/methods/tapErr.js.map +1 -0
  52. package/dist/cjs/methods/transpose.js +10 -0
  53. package/dist/cjs/methods/transpose.js.map +1 -0
  54. package/dist/cjs/methods/unwrap.js +10 -0
  55. package/dist/cjs/methods/unwrap.js.map +1 -0
  56. package/dist/cjs/methods/unwrapErr.js +10 -0
  57. package/dist/cjs/methods/unwrapErr.js.map +1 -0
  58. package/dist/cjs/methods/unwrapOr.js +5 -0
  59. package/dist/cjs/methods/unwrapOr.js.map +1 -0
  60. package/dist/cjs/methods/unwrapOrElse.js +10 -0
  61. package/dist/cjs/methods/unwrapOrElse.js.map +1 -0
  62. package/dist/cjs/package.json +3 -0
  63. package/dist/cjs/refiners/isTypedVariant.js +9 -0
  64. package/dist/cjs/refiners/isTypedVariant.js.map +1 -0
  65. package/dist/cjs/refiners/isTypedVariantOf.js +14 -0
  66. package/dist/cjs/refiners/isTypedVariantOf.js.map +1 -0
  67. package/dist/cjs/refiners/matchVariant.js +57 -0
  68. package/dist/cjs/refiners/matchVariant.js.map +1 -0
  69. package/dist/cjs/refiners/matchVariantStrict.js +37 -0
  70. package/dist/cjs/refiners/matchVariantStrict.js.map +1 -0
  71. package/dist/cjs/refiners/refineAsyncResult.js +26 -0
  72. package/dist/cjs/refiners/refineAsyncResult.js.map +1 -0
  73. package/dist/cjs/refiners/refineAsyncResultU.js +28 -0
  74. package/dist/cjs/refiners/refineAsyncResultU.js.map +1 -0
  75. package/dist/cjs/refiners/refineResult.js +21 -0
  76. package/dist/cjs/refiners/refineResult.js.map +1 -0
  77. package/dist/cjs/refiners/refineResultU.js +5 -0
  78. package/dist/cjs/refiners/refineResultU.js.map +1 -0
  79. package/dist/cjs/refiners/refineVariantMap.js +25 -0
  80. package/dist/cjs/refiners/refineVariantMap.js.map +1 -0
  81. package/dist/cjs/refiners/utils/getPayloadKeys.js +8 -0
  82. package/dist/cjs/refiners/utils/getPayloadKeys.js.map +1 -0
  83. package/dist/docs/api/README.md +9 -0
  84. package/dist/docs/api/constructors/Err.md +58 -0
  85. package/dist/docs/api/constructors/Ok.md +58 -0
  86. package/dist/docs/api/constructors/index.md +7 -0
  87. package/dist/docs/api/guards/index.md +9 -0
  88. package/dist/docs/api/guards/isErr.md +58 -0
  89. package/dist/docs/api/guards/isErrAnd.md +64 -0
  90. package/dist/docs/api/guards/isOk.md +58 -0
  91. package/dist/docs/api/guards/isOkAnd.md +64 -0
  92. package/dist/docs/api/index.md +9 -0
  93. package/dist/docs/api/methods/andThen.md +73 -0
  94. package/dist/docs/api/methods/err.md +58 -0
  95. package/dist/docs/api/methods/expect.md +68 -0
  96. package/dist/docs/api/methods/expectErr.md +68 -0
  97. package/dist/docs/api/methods/flatten.md +58 -0
  98. package/dist/docs/api/methods/index.md +24 -0
  99. package/dist/docs/api/methods/inspect.md +64 -0
  100. package/dist/docs/api/methods/inspectErr.md +64 -0
  101. package/dist/docs/api/methods/map.md +70 -0
  102. package/dist/docs/api/methods/mapErr.md +70 -0
  103. package/dist/docs/api/methods/match.md +76 -0
  104. package/dist/docs/api/methods/ok.md +58 -0
  105. package/dist/docs/api/methods/orElse.md +70 -0
  106. package/dist/docs/api/methods/tap.md +64 -0
  107. package/dist/docs/api/methods/tapErr.md +64 -0
  108. package/dist/docs/api/methods/transpose.md +58 -0
  109. package/dist/docs/api/methods/unwrap.md +62 -0
  110. package/dist/docs/api/methods/unwrapErr.md +62 -0
  111. package/dist/docs/api/methods/unwrapOr.md +64 -0
  112. package/dist/docs/api/methods/unwrapOrElse.md +64 -0
  113. package/dist/docs/api/modules.md +10 -0
  114. package/dist/docs/api/refiners/index.md +14 -0
  115. package/dist/docs/api/refiners/isTypedVariant.md +62 -0
  116. package/dist/docs/api/refiners/isTypedVariantOf.md +68 -0
  117. package/dist/docs/api/refiners/matchVariant.md +59 -0
  118. package/dist/docs/api/refiners/matchVariantStrict.md +63 -0
  119. package/dist/docs/api/refiners/refineAsyncResult.md +98 -0
  120. package/dist/docs/api/refiners/refineAsyncResultU.md +86 -0
  121. package/dist/docs/api/refiners/refineResult.md +98 -0
  122. package/dist/docs/api/refiners/refineResultU.md +86 -0
  123. package/dist/docs/api/refiners/refineVariantMap.md +79 -0
  124. package/dist/docs/api/type-aliases/Handler.md +49 -0
  125. package/dist/docs/api/type-aliases/MatchBuilder.md +57 -0
  126. package/dist/docs/api/type-aliases/Matcher.md +71 -0
  127. package/dist/docs/api/type-aliases/SyncRefinedResult.md +31 -0
  128. package/dist/docs/api/type-aliases/SyncRefinedResultUnion.md +21 -0
  129. package/dist/docs/api/type-aliases/SyncValidatorMap.md +17 -0
  130. package/dist/docs/api/type-aliases/UniversalAsyncRefinedResult.md +31 -0
  131. package/dist/docs/api/type-aliases/UniversalRefinedResult.md +31 -0
  132. package/dist/docs/api/type-aliases/VariantOf.md +23 -0
  133. package/dist/docs/api/type-aliases/index.md +14 -0
  134. package/dist/esm/constructors/Err.js +7 -0
  135. package/dist/esm/constructors/Err.js.map +1 -0
  136. package/dist/esm/constructors/Ok.js +7 -0
  137. package/dist/esm/constructors/Ok.js.map +1 -0
  138. package/dist/esm/guards/isErr.js +7 -0
  139. package/dist/esm/guards/isErr.js.map +1 -0
  140. package/dist/esm/guards/isErrAnd.js +8 -0
  141. package/dist/esm/guards/isErrAnd.js.map +1 -0
  142. package/dist/esm/guards/isOk.js +7 -0
  143. package/dist/esm/guards/isOk.js.map +1 -0
  144. package/dist/esm/guards/isOkAnd.js +8 -0
  145. package/dist/esm/guards/isOkAnd.js.map +1 -0
  146. package/dist/esm/index.js +71 -0
  147. package/dist/esm/index.js.map +1 -0
  148. package/dist/esm/internal/object.js +9 -0
  149. package/dist/esm/internal/object.js.map +1 -0
  150. package/dist/esm/internal/option.js +9 -0
  151. package/dist/esm/internal/option.js.map +1 -0
  152. package/dist/esm/methods/andThen.js +8 -0
  153. package/dist/esm/methods/andThen.js.map +1 -0
  154. package/dist/esm/methods/err.js +9 -0
  155. package/dist/esm/methods/err.js.map +1 -0
  156. package/dist/esm/methods/expect.js +13 -0
  157. package/dist/esm/methods/expect.js.map +1 -0
  158. package/dist/esm/methods/expectErr.js +13 -0
  159. package/dist/esm/methods/expectErr.js.map +1 -0
  160. package/dist/esm/methods/flatten.js +7 -0
  161. package/dist/esm/methods/flatten.js.map +1 -0
  162. package/dist/esm/methods/inspect.js +13 -0
  163. package/dist/esm/methods/inspect.js.map +1 -0
  164. package/dist/esm/methods/inspectErr.js +13 -0
  165. package/dist/esm/methods/inspectErr.js.map +1 -0
  166. package/dist/esm/methods/map.js +8 -0
  167. package/dist/esm/methods/map.js.map +1 -0
  168. package/dist/esm/methods/mapErr.js +8 -0
  169. package/dist/esm/methods/mapErr.js.map +1 -0
  170. package/dist/esm/methods/match.js +14 -0
  171. package/dist/esm/methods/match.js.map +1 -0
  172. package/dist/esm/methods/ok.js +9 -0
  173. package/dist/esm/methods/ok.js.map +1 -0
  174. package/dist/esm/methods/orElse.js +8 -0
  175. package/dist/esm/methods/orElse.js.map +1 -0
  176. package/dist/esm/methods/tap.js +12 -0
  177. package/dist/esm/methods/tap.js.map +1 -0
  178. package/dist/esm/methods/tapErr.js +13 -0
  179. package/dist/esm/methods/tapErr.js.map +1 -0
  180. package/dist/esm/methods/transpose.js +13 -0
  181. package/dist/esm/methods/transpose.js.map +1 -0
  182. package/dist/esm/methods/unwrap.js +13 -0
  183. package/dist/esm/methods/unwrap.js.map +1 -0
  184. package/dist/esm/methods/unwrapErr.js +13 -0
  185. package/dist/esm/methods/unwrapErr.js.map +1 -0
  186. package/dist/esm/methods/unwrapOr.js +8 -0
  187. package/dist/esm/methods/unwrapOr.js.map +1 -0
  188. package/dist/esm/methods/unwrapOrElse.js +13 -0
  189. package/dist/esm/methods/unwrapOrElse.js.map +1 -0
  190. package/dist/esm/refiners/isTypedVariant.js +12 -0
  191. package/dist/esm/refiners/isTypedVariant.js.map +1 -0
  192. package/dist/esm/refiners/isTypedVariantOf.js +17 -0
  193. package/dist/esm/refiners/isTypedVariantOf.js.map +1 -0
  194. package/dist/esm/refiners/matchVariant.js +60 -0
  195. package/dist/esm/refiners/matchVariant.js.map +1 -0
  196. package/dist/esm/refiners/matchVariantStrict.js +40 -0
  197. package/dist/esm/refiners/matchVariantStrict.js.map +1 -0
  198. package/dist/esm/refiners/refineAsyncResult.js +29 -0
  199. package/dist/esm/refiners/refineAsyncResult.js.map +1 -0
  200. package/dist/esm/refiners/refineAsyncResultU.js +31 -0
  201. package/dist/esm/refiners/refineAsyncResultU.js.map +1 -0
  202. package/dist/esm/refiners/refineResult.js +24 -0
  203. package/dist/esm/refiners/refineResult.js.map +1 -0
  204. package/dist/esm/refiners/refineResultU.js +8 -0
  205. package/dist/esm/refiners/refineResultU.js.map +1 -0
  206. package/dist/esm/refiners/refineVariantMap.js +29 -0
  207. package/dist/esm/refiners/refineVariantMap.js.map +1 -0
  208. package/dist/esm/refiners/utils/getPayloadKeys.js +11 -0
  209. package/dist/esm/refiners/utils/getPayloadKeys.js.map +1 -0
  210. package/dist/package.json +36 -0
  211. package/dist/types/constructors/Err.d.ts +21 -0
  212. package/dist/types/constructors/Err.d.ts.map +1 -0
  213. package/dist/types/constructors/Ok.d.ts +21 -0
  214. package/dist/types/constructors/Ok.d.ts.map +1 -0
  215. package/dist/types/constructors/index.d.ts +3 -0
  216. package/dist/types/constructors/index.d.ts.map +1 -0
  217. package/dist/types/guards/index.d.ts +5 -0
  218. package/dist/types/guards/index.d.ts.map +1 -0
  219. package/dist/types/guards/isErr.d.ts +24 -0
  220. package/dist/types/guards/isErr.d.ts.map +1 -0
  221. package/dist/types/guards/isErrAnd.d.ts +22 -0
  222. package/dist/types/guards/isErrAnd.d.ts.map +1 -0
  223. package/dist/types/guards/isOk.d.ts +24 -0
  224. package/dist/types/guards/isOk.d.ts.map +1 -0
  225. package/dist/types/guards/isOkAnd.d.ts +22 -0
  226. package/dist/types/guards/isOkAnd.d.ts.map +1 -0
  227. package/dist/types/index.d.ts +5 -0
  228. package/dist/types/index.d.ts.map +1 -0
  229. package/dist/types/internal/object.d.ts +5 -0
  230. package/dist/types/internal/object.d.ts.map +1 -0
  231. package/dist/types/internal/option.d.ts +10 -0
  232. package/dist/types/internal/option.d.ts.map +1 -0
  233. package/dist/types/methods/andThen.d.ts +26 -0
  234. package/dist/types/methods/andThen.d.ts.map +1 -0
  235. package/dist/types/methods/err.d.ts +22 -0
  236. package/dist/types/methods/err.d.ts.map +1 -0
  237. package/dist/types/methods/expect.d.ts +23 -0
  238. package/dist/types/methods/expect.d.ts.map +1 -0
  239. package/dist/types/methods/expectErr.d.ts +23 -0
  240. package/dist/types/methods/expectErr.d.ts.map +1 -0
  241. package/dist/types/methods/flatten.d.ts +21 -0
  242. package/dist/types/methods/flatten.d.ts.map +1 -0
  243. package/dist/types/methods/index.d.ts +20 -0
  244. package/dist/types/methods/index.d.ts.map +1 -0
  245. package/dist/types/methods/inspect.d.ts +22 -0
  246. package/dist/types/methods/inspect.d.ts.map +1 -0
  247. package/dist/types/methods/inspectErr.d.ts +22 -0
  248. package/dist/types/methods/inspectErr.d.ts.map +1 -0
  249. package/dist/types/methods/map.d.ts +23 -0
  250. package/dist/types/methods/map.d.ts.map +1 -0
  251. package/dist/types/methods/mapErr.d.ts +23 -0
  252. package/dist/types/methods/mapErr.d.ts.map +1 -0
  253. package/dist/types/methods/match.d.ts +24 -0
  254. package/dist/types/methods/match.d.ts.map +1 -0
  255. package/dist/types/methods/ok.d.ts +22 -0
  256. package/dist/types/methods/ok.d.ts.map +1 -0
  257. package/dist/types/methods/orElse.d.ts +23 -0
  258. package/dist/types/methods/orElse.d.ts.map +1 -0
  259. package/dist/types/methods/tap.d.ts +22 -0
  260. package/dist/types/methods/tap.d.ts.map +1 -0
  261. package/dist/types/methods/tapErr.d.ts +22 -0
  262. package/dist/types/methods/tapErr.d.ts.map +1 -0
  263. package/dist/types/methods/transpose.d.ts +22 -0
  264. package/dist/types/methods/transpose.d.ts.map +1 -0
  265. package/dist/types/methods/unwrap.d.ts +22 -0
  266. package/dist/types/methods/unwrap.d.ts.map +1 -0
  267. package/dist/types/methods/unwrapErr.d.ts +22 -0
  268. package/dist/types/methods/unwrapErr.d.ts.map +1 -0
  269. package/dist/types/methods/unwrapOr.d.ts +22 -0
  270. package/dist/types/methods/unwrapOr.d.ts.map +1 -0
  271. package/dist/types/methods/unwrapOrElse.d.ts +22 -0
  272. package/dist/types/methods/unwrapOrElse.d.ts.map +1 -0
  273. package/dist/types/refiners/index.d.ts +11 -0
  274. package/dist/types/refiners/index.d.ts.map +1 -0
  275. package/dist/types/refiners/isTypedVariant.d.ts +21 -0
  276. package/dist/types/refiners/isTypedVariant.d.ts.map +1 -0
  277. package/dist/types/refiners/isTypedVariantOf.d.ts +22 -0
  278. package/dist/types/refiners/isTypedVariantOf.d.ts.map +1 -0
  279. package/dist/types/refiners/matchVariant.d.ts +27 -0
  280. package/dist/types/refiners/matchVariant.d.ts.map +1 -0
  281. package/dist/types/refiners/matchVariantStrict.d.ts +28 -0
  282. package/dist/types/refiners/matchVariantStrict.d.ts.map +1 -0
  283. package/dist/types/refiners/refineAsyncResult.d.ts +54 -0
  284. package/dist/types/refiners/refineAsyncResult.d.ts.map +1 -0
  285. package/dist/types/refiners/refineAsyncResultU.d.ts +30 -0
  286. package/dist/types/refiners/refineAsyncResultU.d.ts.map +1 -0
  287. package/dist/types/refiners/refineResult.d.ts +54 -0
  288. package/dist/types/refiners/refineResult.d.ts.map +1 -0
  289. package/dist/types/refiners/refineResultU.d.ts +30 -0
  290. package/dist/types/refiners/refineResultU.d.ts.map +1 -0
  291. package/dist/types/refiners/refineVariantMap.d.ts +34 -0
  292. package/dist/types/refiners/refineVariantMap.d.ts.map +1 -0
  293. package/dist/types/refiners/types/Handler.d.ts +9 -0
  294. package/dist/types/refiners/types/Handler.d.ts.map +1 -0
  295. package/dist/types/refiners/types/MatchBuilder.d.ts +9 -0
  296. package/dist/types/refiners/types/MatchBuilder.d.ts.map +1 -0
  297. package/dist/types/refiners/types/Matcher.d.ts +11 -0
  298. package/dist/types/refiners/types/Matcher.d.ts.map +1 -0
  299. package/dist/types/refiners/types/SyncRefinedResult.d.ts +6 -0
  300. package/dist/types/refiners/types/SyncRefinedResult.d.ts.map +1 -0
  301. package/dist/types/refiners/types/SyncRefinedResultUnion.d.ts +8 -0
  302. package/dist/types/refiners/types/SyncRefinedResultUnion.d.ts.map +1 -0
  303. package/dist/types/refiners/types/SyncValidatorMap.d.ts +6 -0
  304. package/dist/types/refiners/types/SyncValidatorMap.d.ts.map +1 -0
  305. package/dist/types/refiners/types/UniversalAsyncRefinedResult.d.ts +6 -0
  306. package/dist/types/refiners/types/UniversalAsyncRefinedResult.d.ts.map +1 -0
  307. package/dist/types/refiners/types/UniversalRefinedResult.d.ts +6 -0
  308. package/dist/types/refiners/types/UniversalRefinedResult.d.ts.map +1 -0
  309. package/dist/types/refiners/types/VariantOf.d.ts +5 -0
  310. package/dist/types/refiners/types/VariantOf.d.ts.map +1 -0
  311. package/dist/types/refiners/types/index.d.ts +10 -0
  312. package/dist/types/refiners/types/index.d.ts.map +1 -0
  313. package/dist/types/refiners/utils/getPayloadKeys.d.ts +19 -0
  314. package/dist/types/refiners/utils/getPayloadKeys.d.ts.map +1 -0
  315. package/dist/types/refiners/utils/index.d.ts +2 -0
  316. package/dist/types/refiners/utils/index.d.ts.map +1 -0
  317. package/dist/types/shared-types.d.ts +22 -0
  318. package/dist/types/shared-types.d.ts.map +1 -0
  319. package/dist/umd/resultsafe-monorepo-core-fp-result.umd.js +2 -0
  320. package/dist/umd/resultsafe-monorepo-core-fp-result.umd.js.map +1 -0
  321. package/docs/_category_.json +6 -0
  322. package/docs/api/README.md +9 -0
  323. package/docs/api/constructors/Err.md +58 -0
  324. package/docs/api/constructors/Ok.md +58 -0
  325. package/docs/api/constructors/index.md +7 -0
  326. package/docs/api/guards/index.md +9 -0
  327. package/docs/api/guards/isErr.md +58 -0
  328. package/docs/api/guards/isErrAnd.md +64 -0
  329. package/docs/api/guards/isOk.md +58 -0
  330. package/docs/api/guards/isOkAnd.md +64 -0
  331. package/docs/api/index.md +9 -0
  332. package/docs/api/methods/andThen.md +73 -0
  333. package/docs/api/methods/err.md +58 -0
  334. package/docs/api/methods/expect.md +68 -0
  335. package/docs/api/methods/expectErr.md +68 -0
  336. package/docs/api/methods/flatten.md +58 -0
  337. package/docs/api/methods/index.md +24 -0
  338. package/docs/api/methods/inspect.md +64 -0
  339. package/docs/api/methods/inspectErr.md +64 -0
  340. package/docs/api/methods/map.md +70 -0
  341. package/docs/api/methods/mapErr.md +70 -0
  342. package/docs/api/methods/match.md +76 -0
  343. package/docs/api/methods/ok.md +58 -0
  344. package/docs/api/methods/orElse.md +70 -0
  345. package/docs/api/methods/tap.md +64 -0
  346. package/docs/api/methods/tapErr.md +64 -0
  347. package/docs/api/methods/transpose.md +58 -0
  348. package/docs/api/methods/unwrap.md +62 -0
  349. package/docs/api/methods/unwrapErr.md +62 -0
  350. package/docs/api/methods/unwrapOr.md +64 -0
  351. package/docs/api/methods/unwrapOrElse.md +64 -0
  352. package/docs/api/modules.md +10 -0
  353. package/docs/api/refiners/index.md +14 -0
  354. package/docs/api/refiners/isTypedVariant.md +62 -0
  355. package/docs/api/refiners/isTypedVariantOf.md +68 -0
  356. package/docs/api/refiners/matchVariant.md +59 -0
  357. package/docs/api/refiners/matchVariantStrict.md +63 -0
  358. package/docs/api/refiners/refineAsyncResult.md +98 -0
  359. package/docs/api/refiners/refineAsyncResultU.md +86 -0
  360. package/docs/api/refiners/refineResult.md +98 -0
  361. package/docs/api/refiners/refineResultU.md +86 -0
  362. package/docs/api/refiners/refineVariantMap.md +79 -0
  363. package/docs/api/type-aliases/Handler.md +49 -0
  364. package/docs/api/type-aliases/MatchBuilder.md +57 -0
  365. package/docs/api/type-aliases/Matcher.md +71 -0
  366. package/docs/api/type-aliases/SyncRefinedResult.md +31 -0
  367. package/docs/api/type-aliases/SyncRefinedResultUnion.md +21 -0
  368. package/docs/api/type-aliases/SyncValidatorMap.md +17 -0
  369. package/docs/api/type-aliases/UniversalAsyncRefinedResult.md +31 -0
  370. package/docs/api/type-aliases/UniversalRefinedResult.md +31 -0
  371. package/docs/api/type-aliases/VariantOf.md +23 -0
  372. package/docs/api/type-aliases/index.md +14 -0
  373. package/docs/assets/logo.svg +153 -0
  374. package/docs/examples/_category_.json +4 -0
  375. package/docs/examples/auth/_category_.json +4 -0
  376. package/docs/examples/auth/index.md +3 -0
  377. package/docs/examples/auth/token.md +5 -0
  378. package/docs/examples/connection/_category_.json +4 -0
  379. package/docs/examples/connection/connect.md +5 -0
  380. package/docs/examples/connection/index.md +3 -0
  381. package/docs/examples/connection/reconnect.md +5 -0
  382. package/docs/examples/errors/_category_.json +4 -0
  383. package/docs/examples/errors/index.md +3 -0
  384. package/docs/examples/errors/retry.md +5 -0
  385. package/docs/examples/index.md +9 -0
  386. package/docs/examples/streaming/_category_.json +4 -0
  387. package/docs/examples/streaming/index.md +3 -0
  388. package/docs/examples/streaming/text.md +5 -0
  389. package/package.json +70 -0
@@ -0,0 +1,71 @@
1
+ [**@resultsafe/core-fp-result v0.1.0**](../README.md)
2
+
3
+ ***
4
+
5
+ [@resultsafe/core-fp-result](../README.md) / Matcher
6
+
7
+ # Type Alias: Matcher\<T, R\>
8
+
9
+ > **Matcher**\<`T`, `R`\> = `object`
10
+
11
+ Описывает форму нестрогого builder для matcher.
12
+
13
+ ## Type Parameters
14
+
15
+ ### T
16
+
17
+ `T` *extends* [`VariantOf`](VariantOf.md)
18
+
19
+ ### R
20
+
21
+ `R`
22
+
23
+ ## Properties
24
+
25
+ ### with()
26
+
27
+ > `readonly` **with**: \<`K`\>(`variant`, `fn`) => `Matcher`\<`T`, `R`\>
28
+
29
+ #### Type Parameters
30
+
31
+ ##### K
32
+
33
+ `K` *extends* `T`\[`"type"`\]
34
+
35
+ #### Parameters
36
+
37
+ ##### variant
38
+
39
+ `K`
40
+
41
+ ##### fn
42
+
43
+ (`value`) => `R`
44
+
45
+ #### Returns
46
+
47
+ `Matcher`\<`T`, `R`\>
48
+
49
+ ***
50
+
51
+ ### otherwise()
52
+
53
+ > `readonly` **otherwise**: (`fn`) => `object`
54
+
55
+ #### Parameters
56
+
57
+ ##### fn
58
+
59
+ (`value`) => `R`
60
+
61
+ #### Returns
62
+
63
+ `object`
64
+
65
+ ##### run()
66
+
67
+ > `readonly` **run**: () => `R`
68
+
69
+ ###### Returns
70
+
71
+ `R`
@@ -0,0 +1,31 @@
1
+ [**@resultsafe/core-fp-result v0.1.0**](../README.md)
2
+
3
+ ***
4
+
5
+ [@resultsafe/core-fp-result](../README.md) / SyncRefinedResult
6
+
7
+ # Type Alias: SyncRefinedResult\<K, TMap, _TValidators\>
8
+
9
+ > **SyncRefinedResult**\<`K`, `TMap`, `_TValidators`\> = `object` & `Record`\<`PayloadKeys`\<`TMap`\[`K`\]\>, `unknown`\>
10
+
11
+ Описывает синхронно уточненное конкретное значение варианта.
12
+
13
+ ## Type Declaration
14
+
15
+ ### type
16
+
17
+ > **type**: `K`
18
+
19
+ ## Type Parameters
20
+
21
+ ### K
22
+
23
+ `K` *extends* keyof `TMap` & `string`
24
+
25
+ ### TMap
26
+
27
+ `TMap` *extends* `Record`\<`string`, `VariantConfig`\>
28
+
29
+ ### _TValidators
30
+
31
+ `_TValidators` *extends* `Partial`\<`Record`\<`PayloadKeys`\<`TMap`\[`K`\]\>, `ValidatorFn`\>\>
@@ -0,0 +1,21 @@
1
+ [**@resultsafe/core-fp-result v0.1.0**](../README.md)
2
+
3
+ ***
4
+
5
+ [@resultsafe/core-fp-result](../README.md) / SyncRefinedResultUnion
6
+
7
+ # Type Alias: SyncRefinedResultUnion\<TMap, TValidators\>
8
+
9
+ > **SyncRefinedResultUnion**\<`TMap`, `TValidators`\> = `{ [K in keyof TMap & string]: SyncRefinedResult<K, TMap, NonNullable<TValidators[K]>> }`\[keyof `TMap` & `string`\]
10
+
11
+ Описывает объединение синхронно уточненных вариантов.
12
+
13
+ ## Type Parameters
14
+
15
+ ### TMap
16
+
17
+ `TMap` *extends* `Record`\<`string`, `VariantConfig`\>
18
+
19
+ ### TValidators
20
+
21
+ `TValidators` *extends* [`SyncValidatorMap`](SyncValidatorMap.md)\<`TMap`\>
@@ -0,0 +1,17 @@
1
+ [**@resultsafe/core-fp-result v0.1.0**](../README.md)
2
+
3
+ ***
4
+
5
+ [@resultsafe/core-fp-result](../README.md) / SyncValidatorMap
6
+
7
+ # Type Alias: SyncValidatorMap\<TMap\>
8
+
9
+ > **SyncValidatorMap**\<`TMap`\> = `{ [K in keyof TMap]?: Partial<Record<PayloadKeys<TMap[K]>, ValidatorFn>> }`
10
+
11
+ Описывает наборы валидаторов, сгруппированные по ключу варианта.
12
+
13
+ ## Type Parameters
14
+
15
+ ### TMap
16
+
17
+ `TMap` *extends* `Record`\<`string`, `VariantConfig`\>
@@ -0,0 +1,31 @@
1
+ [**@resultsafe/core-fp-result v0.1.0**](../README.md)
2
+
3
+ ***
4
+
5
+ [@resultsafe/core-fp-result](../README.md) / UniversalAsyncRefinedResult
6
+
7
+ # Type Alias: UniversalAsyncRefinedResult\<K, TMap, _TValidators\>
8
+
9
+ > **UniversalAsyncRefinedResult**\<`K`, `TMap`, `_TValidators`\> = `object` & `Record`\<`string`, `unknown`\>
10
+
11
+ Описывает обобщенное асинхронно уточненное значение варианта.
12
+
13
+ ## Type Declaration
14
+
15
+ ### type
16
+
17
+ > **type**: `K`
18
+
19
+ ## Type Parameters
20
+
21
+ ### K
22
+
23
+ `K` *extends* keyof `TMap` & `string`
24
+
25
+ ### TMap
26
+
27
+ `TMap` *extends* `Record`\<`string`, `VariantConfig`\>
28
+
29
+ ### _TValidators
30
+
31
+ `_TValidators` *extends* `Record`\<`string`, `unknown`\>
@@ -0,0 +1,31 @@
1
+ [**@resultsafe/core-fp-result v0.1.0**](../README.md)
2
+
3
+ ***
4
+
5
+ [@resultsafe/core-fp-result](../README.md) / UniversalRefinedResult
6
+
7
+ # Type Alias: UniversalRefinedResult\<K, TMap, _TValidators\>
8
+
9
+ > **UniversalRefinedResult**\<`K`, `TMap`, `_TValidators`\> = `object` & `Record`\<`string`, `unknown`\>
10
+
11
+ Описывает обобщенное синхронно уточненное значение варианта.
12
+
13
+ ## Type Declaration
14
+
15
+ ### type
16
+
17
+ > **type**: `K`
18
+
19
+ ## Type Parameters
20
+
21
+ ### K
22
+
23
+ `K` *extends* keyof `TMap` & `string`
24
+
25
+ ### TMap
26
+
27
+ `TMap` *extends* `Record`\<`string`, `VariantConfig`\>
28
+
29
+ ### _TValidators
30
+
31
+ `_TValidators` *extends* `Record`\<`string`, `unknown`\>
@@ -0,0 +1,23 @@
1
+ [**@resultsafe/core-fp-result v0.1.0**](../README.md)
2
+
3
+ ***
4
+
5
+ [@resultsafe/core-fp-result](../README.md) / VariantOf
6
+
7
+ # Type Alias: VariantOf\<K\>
8
+
9
+ > **VariantOf**\<`K`\> = `object`
10
+
11
+ Описывает минимальный контракт дискриминированного объединения.
12
+
13
+ ## Type Parameters
14
+
15
+ ### K
16
+
17
+ `K` *extends* `string` = `string`
18
+
19
+ ## Properties
20
+
21
+ ### type
22
+
23
+ > **type**: `K`
@@ -0,0 +1,14 @@
1
+ # Type Aliases
2
+
3
+ > [Back to package README](../../../README.md) | [Back to API index](../index.md)
4
+
5
+ Published helper type aliases:
6
+ - [Handler](./Handler.md)
7
+ - [MatchBuilder](./MatchBuilder.md)
8
+ - [Matcher](./Matcher.md)
9
+ - [SyncRefinedResult](./SyncRefinedResult.md)
10
+ - [SyncRefinedResultUnion](./SyncRefinedResultUnion.md)
11
+ - [SyncValidatorMap](./SyncValidatorMap.md)
12
+ - [UniversalAsyncRefinedResult](./UniversalAsyncRefinedResult.md)
13
+ - [UniversalRefinedResult](./UniversalRefinedResult.md)
14
+ - [VariantOf](./VariantOf.md)
@@ -0,0 +1,153 @@
1
+ <svg width="100%" viewBox="0 0 960 310" xmlns="http://www.w3.org/2000/svg">
2
+ <defs>
3
+ <marker id="arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M2 1L8 5L2 9" fill="none" stroke="context-stroke" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></marker>
4
+ <clipPath id="ec"><rect x="0" y="0" width="960" height="300" rx="16"/></clipPath>
5
+ <mask id="imagine-text-gaps-e1f1yu" maskUnits="userSpaceOnUse"><rect x="0" y="0" width="960" height="310" fill="white"/><rect x="353.801513671875" y="38.58457946777344" width="251.25546264648438" height="17.698503494262695" fill="black" rx="2"/><rect x="325.8604736328125" y="56.32911682128906" width="308.526123046875" height="79.34176635742188" fill="black" rx="2"/><rect x="273.1533508300781" y="120.30149841308594" width="412.7049865722656" height="21.12312889099121" fill="black" rx="2"/><rect x="264" y="156.7215118408203" width="32.18642044067383" height="16.556961059570312" fill="black" rx="2"/><rect x="394" y="156.7215118408203" width="68.44821548461914" height="16.556961059570312" fill="black" rx="2"/><rect x="490.3411865234375" y="154.4384307861328" width="12.566167831420898" height="21.12312889099121" fill="black" rx="2"/><rect x="524" y="156.7215118408203" width="68.44821548461914" height="16.556961059570312" fill="black" rx="2"/><rect x="630.159912109375" y="157.86306762695312" width="37.680091857910156" height="14.27387809753418" fill="black" rx="2"/><rect x="689.4384765625" y="157.86306762695312" width="24.740617752075195" height="14.27387809753418" fill="black" rx="2"/><rect x="91.99711608886719" y="197.7261199951172" width="94.86421203613281" height="16.556961059570312" fill="black" rx="2"/><rect x="100.5943603515625" y="226.57998657226562" width="79.11006927490234" height="18.840045928955078" fill="black" rx="2"/><rect x="66.1064453125" y="269.2922668457031" width="36.84121322631836" height="15.415419578552246" fill="black" rx="2"/><rect x="174.5011444091797" y="269.2922668457031" width="41.197662353515625" height="15.415419578552246" fill="black" rx="2"/><rect x="384.92864990234375" y="197.7261199951172" width="69.00114822387695" height="16.556961059570312" fill="black" rx="2"/><rect x="300.4888000488281" y="226.86306762695312" width="33.880897521972656" height="14.27387809753418" fill="black" rx="2"/><rect x="372.1007080078125" y="226.86306762695312" width="28.54475975036621" height="14.27387809753418" fill="black" rx="2"/><rect x="434.2102966308594" y="226.86306762695312" width="48.327491760253906" height="14.27387809753418" fill="black" rx="2"/><rect x="515.1599731445312" y="226.86306762695312" width="38.43612480163574" height="14.27387809753418" fill="black" rx="2"/><rect x="386.4562683105469" y="271.1507568359375" width="87.25355529785156" height="13.132335662841797" fill="black" rx="2"/><rect x="637.9456176757812" y="197.7261199951172" width="82.96720123291016" height="16.556961059570312" fill="black" rx="2"/><rect x="620" y="229.29229736328125" width="85.18158721923828" height="15.415419578552246" fill="black" rx="2"/><rect x="620" y="259.8630676269531" width="112.62137603759766" height="14.27387809753418" fill="black" rx="2"/><rect x="829.1204833984375" y="197.7261199951172" width="76.61737060546875" height="16.556961059570312" fill="black" rx="2"/><rect x="807.9999389648438" y="223.15074157714844" width="100.49047088623047" height="17.698503494262695" fill="black" rx="2"/><rect x="806.8583984375" y="241.1507568359375" width="90.26348114013672" height="18.840045928955078" fill="black" rx="2"/><rect x="806.8583984375" y="259.1507568359375" width="89.81826782226562" height="17.698503494262695" fill="black" rx="2"/><rect x="807.9999389648438" y="277.1507568359375" width="79.57998657226562" height="17.69852066040039" fill="black" rx="2"/></mask></defs>
6
+
7
+ <!-- Card -->
8
+ <rect x="0" y="0" width="960" height="300" rx="16" fill="var(--color-background-secondary)" stroke="var(--color-border-tertiary)" stroke-width="0.8" style="fill:rgb(38, 38, 36);stroke:rgba(222, 220, 209, 0.15);color:rgb(255, 255, 255);stroke-width:0.8px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
9
+
10
+ <g clip-path="url(#ec)" style="fill:rgb(0, 0, 0);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto">
11
+ <!-- Subtle corner triangles -->
12
+ <path d="M0 0 L80 0 L0 50 Z" fill="#D85A30" opacity="0.035" style="fill:rgb(216, 90, 48);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.035;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
13
+ <path d="M960 0 L880 0 L960 50 Z" fill="#378ADD" opacity="0.035" style="fill:rgb(55, 138, 221);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.035;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
14
+ <path d="M0 300 L80 300 L0 250 Z" fill="#1D9E75" opacity="0.025" style="fill:rgb(29, 158, 117);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.025;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
15
+ <path d="M960 300 L880 300 L960 250 Z" fill="#EF9F27" opacity="0.025" style="fill:rgb(239, 159, 39);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.025;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
16
+ </g>
17
+
18
+ <!-- ====== TOP RULE ====== -->
19
+ <line x1="40" y1="20" x2="920" y2="20" stroke="var(--color-text-primary)" stroke-width="2" opacity="0.12" style="fill:rgb(0, 0, 0);stroke:rgb(250, 249, 245);color:rgb(255, 255, 255);stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.12;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
20
+ <line x1="40" y1="24" x2="920" y2="24" stroke="var(--color-text-primary)" stroke-width="0.5" opacity="0.08" style="fill:rgb(0, 0, 0);stroke:rgb(250, 249, 245);color:rgb(255, 255, 255);stroke-width:0.5px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.08;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
21
+
22
+ <!-- ====== MASTHEAD — centered ====== -->
23
+ <text x="480" y="52" text-anchor="middle" style="font-family:var(--font-serif);font-size:11px;letter-spacing:4px;opacity:0.35;fill:rgb(194, 192, 182);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.35;font-family:&quot;Anthropic Serif&quot;, Georgia, &quot;Times New Roman&quot;, serif;font-size:11px;font-weight:400;text-anchor:middle;dominant-baseline:auto" fill="var(--color-text-secondary)">THE RESULTSAFE PROJECT</text>
24
+
25
+ <!-- Big title -->
26
+ <text x="480" y="96" text-anchor="middle" dominant-baseline="central" style="font-family:var(--font-serif);font-size:60px;font-weight:500;letter-spacing:-1px;fill:rgb(250, 249, 245);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Serif&quot;, Georgia, &quot;Times New Roman&quot;, serif;font-size:60px;font-weight:500;text-anchor:middle;dominant-baseline:central" fill="var(--color-text-primary)">Result<tspan fill="#7F77DD" style="fill:rgb(127, 119, 221);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Serif&quot;, Georgia, &quot;Times New Roman&quot;, serif;font-size:60px;font-weight:500;text-anchor:middle;dominant-baseline:central">Safe</tspan></text>
27
+
28
+ <!-- Thin rule under title -->
29
+ <line x1="300" y1="116" x2="660" y2="116" stroke="var(--color-text-primary)" stroke-width="0.5" opacity="0.1" mask="url(#imagine-text-gaps-e1f1yu)" style="fill:rgb(0, 0, 0);stroke:rgb(250, 249, 245);color:rgb(255, 255, 255);stroke-width:0.5px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
30
+
31
+ <!-- Centered subtitle -->
32
+ <text x="480" y="136" text-anchor="middle" style="font-family:var(--font-serif);font-size:14px;letter-spacing:0.3px;fill:rgb(194, 192, 182);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Serif&quot;, Georgia, &quot;Times New Roman&quot;, serif;font-size:14px;font-weight:400;text-anchor:middle;dominant-baseline:auto" fill="var(--color-text-secondary)">Rust-style Result&lt;T, E&gt; brought to TypeScript &amp; JavaScript</text>
33
+
34
+ <!-- ====== LANGUAGE BRIDGE — centered ornamental ====== -->
35
+
36
+ <!-- Rust -->
37
+ <rect x="240" y="152" width="76" height="26" rx="13" fill="#D85A30" opacity="0.1" stroke="#D85A30" stroke-width="0.5" style="fill:rgb(216, 90, 48);stroke:rgb(216, 90, 48);color:rgb(255, 255, 255);stroke-width:0.5px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
38
+ <circle cx="256" cy="165" r="4.5" fill="none" stroke="#D85A30" stroke-width="0.9" style="fill:none;stroke:rgb(216, 90, 48);color:rgb(255, 255, 255);stroke-width:0.9px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
39
+ <circle cx="256" cy="165" r="2" fill="#D85A30" opacity="0.3" style="fill:rgb(216, 90, 48);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.3;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
40
+ <text x="268" y="165" dominant-baseline="central" style="font-family:var(--font-mono);font-size:11px;font-weight:500;fill:rgb(153, 60, 29);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:ui-monospace, monospace;font-size:11px;font-weight:500;text-anchor:start;dominant-baseline:central" fill="#993C1D">Rust</text>
41
+
42
+ <!-- Ornamental arrow -->
43
+ <line x1="324" y1="165" x2="354" y2="165" stroke="#7F77DD" stroke-width="1" opacity="0.4" style="fill:rgb(0, 0, 0);stroke:rgb(127, 119, 221);color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.4;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
44
+ <circle cx="339" cy="165" r="2" fill="#7F77DD" opacity="0.3" style="fill:rgb(127, 119, 221);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.3;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
45
+ <line x1="354" y1="165" x2="370" y2="165" stroke="#7F77DD" stroke-width="1.2" marker-end="url(#arrow)" opacity="0.5" style="fill:rgb(0, 0, 0);stroke:rgb(127, 119, 221);color:rgb(255, 255, 255);stroke-width:1.2px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.5;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
46
+
47
+ <!-- TS -->
48
+ <rect x="378" y="152" width="106" height="26" rx="13" fill="#378ADD" opacity="0.1" stroke="#378ADD" stroke-width="0.5" style="fill:rgb(55, 138, 221);stroke:rgb(55, 138, 221);color:rgb(255, 255, 255);stroke-width:0.5px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
49
+ <text x="398" y="165" dominant-baseline="central" style="font-family:var(--font-mono);font-size:11px;font-weight:500;fill:rgb(24, 95, 165);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:ui-monospace, monospace;font-size:11px;font-weight:500;text-anchor:start;dominant-baseline:central" fill="#185FA5">TypeScript</text>
50
+
51
+ <!-- · -->
52
+ <text x="496" y="165" text-anchor="middle" dominant-baseline="central" style="font-family:var(--font-sans);font-size:14px;opacity:0.2;fill:rgb(194, 192, 182);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.2;font-family:&quot;Anthropic Sans&quot;, sans-serif;font-size:14px;font-weight:400;text-anchor:middle;dominant-baseline:central" fill="var(--color-text-secondary)">·</text>
53
+
54
+ <!-- JS -->
55
+ <rect x="508" y="152" width="100" height="26" rx="13" fill="#EF9F27" opacity="0.1" stroke="#EF9F27" stroke-width="0.5" style="fill:rgb(239, 159, 39);stroke:rgb(239, 159, 39);color:rgb(255, 255, 255);stroke-width:0.5px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
56
+ <text x="528" y="165" dominant-baseline="central" style="font-family:var(--font-mono);font-size:11px;font-weight:500;fill:rgb(133, 79, 11);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:ui-monospace, monospace;font-size:11px;font-weight:500;text-anchor:start;dominant-baseline:central" fill="#854F0B">JavaScript</text>
57
+
58
+ <!-- Badges -->
59
+ <rect x="624" y="154" width="50" height="22" rx="11" fill="var(--color-background-primary)" stroke="var(--color-border-tertiary)" stroke-width="0.4" style="fill:rgb(48, 48, 46);stroke:rgba(222, 220, 209, 0.15);color:rgb(255, 255, 255);stroke-width:0.4px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
60
+ <text x="649" y="165" text-anchor="middle" dominant-baseline="central" style="font-family:var(--font-mono);font-size:9px;fill:rgb(156, 154, 146);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:ui-monospace, monospace;font-size:9px;font-weight:400;text-anchor:middle;dominant-baseline:central" fill="var(--color-text-tertiary)">0 deps</text>
61
+
62
+ <rect x="682" y="154" width="40" height="22" rx="11" fill="var(--color-background-primary)" stroke="var(--color-border-tertiary)" stroke-width="0.4" style="fill:rgb(48, 48, 46);stroke:rgba(222, 220, 209, 0.15);color:rgb(255, 255, 255);stroke-width:0.4px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
63
+ <text x="702" y="165" text-anchor="middle" dominant-baseline="central" style="font-family:var(--font-mono);font-size:9px;fill:rgb(156, 154, 146);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:ui-monospace, monospace;font-size:9px;font-weight:400;text-anchor:middle;dominant-baseline:central" fill="var(--color-text-tertiary)">MIT</text>
64
+
65
+ <!-- ====== MAIN RULE ====== -->
66
+ <line x1="40" y1="192" x2="920" y2="192" stroke="var(--color-text-primary)" stroke-width="0.5" opacity="0.1" style="fill:rgb(0, 0, 0);stroke:rgb(250, 249, 245);color:rgb(255, 255, 255);stroke-width:0.5px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
67
+
68
+ <!-- ====== 4-COLUMN LAYOUT ====== -->
69
+
70
+ <!-- COL 1: Ok / Err -->
71
+ <text x="140" y="210" text-anchor="middle" style="font-family:var(--font-serif);font-size:10px;letter-spacing:1.5px;opacity:0.35;fill:rgb(194, 192, 182);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.35;font-family:&quot;Anthropic Serif&quot;, Georgia, &quot;Times New Roman&quot;, serif;font-size:10px;font-weight:400;text-anchor:middle;dominant-baseline:auto" fill="var(--color-text-secondary)">RESULT TYPE</text>
72
+
73
+ <g style="fill:rgb(0, 0, 0);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto">
74
+ <rect x="86" y="222" width="108" height="28" rx="7" stroke-width="0.5" style="fill:rgb(60, 52, 137);stroke:rgb(175, 169, 236);color:rgb(255, 255, 255);stroke-width:0.5px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
75
+ <text x="140" y="236" text-anchor="middle" dominant-baseline="central" style="font-size:12px;fill:rgb(206, 203, 246);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:12px;font-weight:500;text-anchor:middle;dominant-baseline:central">Result&lt;T, E&gt;</text>
76
+ </g>
77
+
78
+ <line x1="112" y1="250" x2="92" y2="264" stroke="#1D9E75" stroke-width="0.8" marker-end="url(#arrow)" style="fill:rgb(0, 0, 0);stroke:rgb(29, 158, 117);color:rgb(255, 255, 255);stroke-width:0.8px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
79
+ <line x1="168" y1="250" x2="188" y2="264" stroke="#E24B4A" stroke-width="0.8" marker-end="url(#arrow)" style="fill:rgb(0, 0, 0);stroke:rgb(226, 75, 74);color:rgb(255, 255, 255);stroke-width:0.8px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
80
+
81
+ <rect x="56" y="266" width="58" height="22" rx="11" fill="#1D9E75" opacity="0.15" stroke="#1D9E75" stroke-width="0.4" style="fill:rgb(29, 158, 117);stroke:rgb(29, 158, 117);color:rgb(255, 255, 255);stroke-width:0.4px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.15;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
82
+ <text x="85" y="277" text-anchor="middle" dominant-baseline="central" style="font-family:var(--font-mono);font-size:10px;font-weight:500;fill:rgb(15, 110, 86);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:ui-monospace, monospace;font-size:10px;font-weight:500;text-anchor:middle;dominant-baseline:central" fill="#0F6E56">Ok&lt;T&gt;</text>
83
+
84
+ <rect x="166" y="266" width="58" height="22" rx="11" fill="#E24B4A" opacity="0.15" stroke="#E24B4A" stroke-width="0.4" style="fill:rgb(226, 75, 74);stroke:rgb(226, 75, 74);color:rgb(255, 255, 255);stroke-width:0.4px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.15;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
85
+ <text x="195" y="277" text-anchor="middle" dominant-baseline="central" style="font-family:var(--font-mono);font-size:10px;font-weight:500;fill:rgb(163, 45, 45);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:ui-monospace, monospace;font-size:10px;font-weight:500;text-anchor:middle;dominant-baseline:central" fill="#A32D2D">Err&lt;E&gt;</text>
86
+
87
+ <!-- COL SEPARATOR -->
88
+ <line x1="264" y1="200" x2="264" y2="290" stroke="var(--color-text-primary)" stroke-width="0.3" opacity="0.08" style="fill:rgb(0, 0, 0);stroke:rgb(250, 249, 245);color:rgb(255, 255, 255);stroke-width:0.3px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.08;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
89
+
90
+ <!-- COL 2: Pipeline -->
91
+ <text x="420" y="210" text-anchor="middle" style="font-family:var(--font-serif);font-size:10px;letter-spacing:1.5px;opacity:0.35;fill:rgb(194, 192, 182);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.35;font-family:&quot;Anthropic Serif&quot;, Georgia, &quot;Times New Roman&quot;, serif;font-size:10px;font-weight:400;text-anchor:middle;dominant-baseline:auto" fill="var(--color-text-secondary)">PIPELINE</text>
92
+
93
+ <!-- Compact vertical pipeline -->
94
+ <rect x="292" y="224" width="52" height="20" rx="5" fill="#1D9E75" opacity="0.1" stroke="#1D9E75" stroke-width="0.4" style="fill:rgb(29, 158, 117);stroke:rgb(29, 158, 117);color:rgb(255, 255, 255);stroke-width:0.4px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
95
+ <text x="318" y="234" text-anchor="middle" dominant-baseline="central" style="font-family:var(--font-mono);font-size:9px;font-weight:500;fill:rgb(15, 110, 86);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:ui-monospace, monospace;font-size:9px;font-weight:500;text-anchor:middle;dominant-baseline:central" fill="#0F6E56">Ok(v)</text>
96
+
97
+ <line x1="348" y1="234" x2="358" y2="234" stroke="#7F77DD" stroke-width="0.7" marker-end="url(#arrow)" opacity="0.4" style="fill:rgb(0, 0, 0);stroke:rgb(127, 119, 221);color:rgb(255, 255, 255);stroke-width:0.7px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.4;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
98
+
99
+ <rect x="364" y="224" width="44" height="20" rx="5" fill="#7F77DD" opacity="0.08" stroke="#7F77DD" stroke-width="0.4" style="fill:rgb(127, 119, 221);stroke:rgb(127, 119, 221);color:rgb(255, 255, 255);stroke-width:0.4px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.08;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
100
+ <text x="386" y="234" text-anchor="middle" dominant-baseline="central" style="font-family:var(--font-mono);font-size:9px;font-weight:500;fill:rgb(83, 74, 183);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:ui-monospace, monospace;font-size:9px;font-weight:500;text-anchor:middle;dominant-baseline:central" fill="#534AB7">.map</text>
101
+
102
+ <line x1="412" y1="234" x2="422" y2="234" stroke="#7F77DD" stroke-width="0.7" marker-end="url(#arrow)" opacity="0.4" style="fill:rgb(0, 0, 0);stroke:rgb(127, 119, 221);color:rgb(255, 255, 255);stroke-width:0.7px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.4;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
103
+
104
+ <rect x="428" y="224" width="60" height="20" rx="5" fill="#7F77DD" opacity="0.08" stroke="#7F77DD" stroke-width="0.4" style="fill:rgb(127, 119, 221);stroke:rgb(127, 119, 221);color:rgb(255, 255, 255);stroke-width:0.4px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.08;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
105
+ <text x="458" y="234" text-anchor="middle" dominant-baseline="central" style="font-family:var(--font-mono);font-size:9px;font-weight:500;fill:rgb(83, 74, 183);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:ui-monospace, monospace;font-size:9px;font-weight:500;text-anchor:middle;dominant-baseline:central" fill="#534AB7">.flatMap</text>
106
+
107
+ <line x1="492" y1="234" x2="502" y2="234" stroke="#7F77DD" stroke-width="0.7" marker-end="url(#arrow)" opacity="0.4" style="fill:rgb(0, 0, 0);stroke:rgb(127, 119, 221);color:rgb(255, 255, 255);stroke-width:0.7px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.4;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
108
+
109
+ <rect x="508" y="224" width="52" height="20" rx="5" fill="#7F77DD" opacity="0.08" stroke="#7F77DD" stroke-width="0.4" style="fill:rgb(127, 119, 221);stroke:rgb(127, 119, 221);color:rgb(255, 255, 255);stroke-width:0.4px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.08;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
110
+ <text x="534" y="234" text-anchor="middle" dominant-baseline="central" style="font-family:var(--font-mono);font-size:9px;font-weight:500;fill:rgb(83, 74, 183);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:ui-monospace, monospace;font-size:9px;font-weight:500;text-anchor:middle;dominant-baseline:central" fill="#534AB7">.match</text>
111
+
112
+ <!-- Err bypass -->
113
+ <path d="M318 248 Q318 264 430 264 Q534 264 534 248" fill="none" stroke="#E24B4A" stroke-width="0.6" stroke-dasharray="3 2" opacity="0.3" style="fill:none;stroke:rgb(226, 75, 74);color:rgb(255, 255, 255);stroke-width:0.6px;stroke-dasharray:3px, 2px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.3;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
114
+ <text x="430" y="280" text-anchor="middle" style="font-family:var(--font-mono);font-size:8px;opacity:0.3;fill:rgb(163, 45, 45);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.3;font-family:ui-monospace, monospace;font-size:8px;font-weight:400;text-anchor:middle;dominant-baseline:auto" fill="#A32D2D">Err short-circuits</text>
115
+
116
+ <!-- COL SEPARATOR -->
117
+ <line x1="580" y1="200" x2="580" y2="290" stroke="var(--color-text-primary)" stroke-width="0.3" opacity="0.08" style="fill:rgb(0, 0, 0);stroke:rgb(250, 249, 245);color:rgb(255, 255, 255);stroke-width:0.3px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.08;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
118
+
119
+ <!-- COL 3: Monorepo -->
120
+ <text x="680" y="210" text-anchor="middle" style="font-family:var(--font-serif);font-size:10px;letter-spacing:1.5px;opacity:0.35;fill:rgb(194, 192, 182);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.35;font-family:&quot;Anthropic Serif&quot;, Georgia, &quot;Times New Roman&quot;, serif;font-size:10px;font-weight:400;text-anchor:middle;dominant-baseline:auto" fill="var(--color-text-secondary)">MONOREPO</text>
121
+
122
+ <rect x="608" y="224" width="144" height="26" rx="5" fill="var(--color-background-primary)" stroke="#7F77DD" stroke-width="0.6" style="fill:rgb(48, 48, 46);stroke:rgb(127, 119, 221);color:rgb(255, 255, 255);stroke-width:0.6px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
123
+ <rect x="614" y="230" width="3" height="14" rx="1.5" fill="#7F77DD" style="fill:rgb(127, 119, 221);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
124
+ <text x="624" y="237" dominant-baseline="central" style="font-family:var(--font-mono);font-size:10px;font-weight:500;fill:rgb(250, 249, 245);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:ui-monospace, monospace;font-size:10px;font-weight:500;text-anchor:start;dominant-baseline:central" fill="var(--color-text-primary)">core-fp-result</text>
125
+ <circle cx="740" cy="237" r="3" fill="#1D9E75" opacity="0.6" style="fill:rgb(29, 158, 117);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.6;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
126
+
127
+ <g opacity="0.35" style="fill:rgb(0, 0, 0);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.35;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto">
128
+ <rect x="608" y="256" width="144" height="22" rx="5" fill="var(--color-background-primary)" stroke="var(--color-border-tertiary)" stroke-width="0.4" stroke-dasharray="3 2" style="fill:rgb(48, 48, 46);stroke:rgba(222, 220, 209, 0.15);color:rgb(255, 255, 255);stroke-width:0.4px;stroke-dasharray:3px, 2px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
129
+ <rect x="614" y="261" width="3" height="12" rx="1.5" fill="var(--color-text-tertiary)" opacity="0.4" style="fill:rgb(156, 154, 146);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.4;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
130
+ <text x="624" y="267" dominant-baseline="central" style="font-family:var(--font-mono);font-size:9px;fill:rgb(156, 154, 146);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:ui-monospace, monospace;font-size:9px;font-weight:400;text-anchor:start;dominant-baseline:central" fill="var(--color-text-tertiary)">fp-option · fp-either</text>
131
+ </g>
132
+
133
+ <!-- COL SEPARATOR -->
134
+ <line x1="776" y1="200" x2="776" y2="290" stroke="var(--color-text-primary)" stroke-width="0.3" opacity="0.08" style="fill:rgb(0, 0, 0);stroke:rgb(250, 249, 245);color:rgb(255, 255, 255);stroke-width:0.3px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.08;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
135
+
136
+ <!-- COL 4: Features -->
137
+ <text x="868" y="210" text-anchor="middle" style="font-family:var(--font-serif);font-size:10px;letter-spacing:1.5px;opacity:0.35;fill:rgb(194, 192, 182);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.35;font-family:&quot;Anthropic Serif&quot;, Georgia, &quot;Times New Roman&quot;, serif;font-size:10px;font-weight:400;text-anchor:middle;dominant-baseline:auto" fill="var(--color-text-secondary)">FEATURES</text>
138
+
139
+ <g opacity="0.55" style="fill:rgb(0, 0, 0);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.55;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto">
140
+ <circle cx="802" cy="232" r="2.5" fill="#1D9E75" opacity="0.6" style="fill:rgb(29, 158, 117);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.6;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
141
+ <text x="812" y="232" dominant-baseline="central" style="font-family:var(--font-sans);font-size:11px;fill:rgb(194, 192, 182);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, sans-serif;font-size:11px;font-weight:400;text-anchor:start;dominant-baseline:central" fill="var(--color-text-secondary)">Exhaustive match</text>
142
+
143
+ <circle cx="802" cy="250" r="2.5" fill="#1D9E75" opacity="0.6" style="fill:rgb(29, 158, 117);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.6;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
144
+ <text x="812" y="250" dominant-baseline="central" style="font-family:var(--font-sans);font-size:11px;fill:rgb(194, 192, 182);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, sans-serif;font-size:11px;font-weight:400;text-anchor:start;dominant-baseline:central" fill="var(--color-text-secondary)">Type narrowing</text>
145
+
146
+ <circle cx="802" cy="268" r="2.5" fill="#1D9E75" opacity="0.6" style="fill:rgb(29, 158, 117);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.6;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
147
+ <text x="812" y="268" dominant-baseline="central" style="font-family:var(--font-sans);font-size:11px;fill:rgb(194, 192, 182);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, sans-serif;font-size:11px;font-weight:400;text-anchor:start;dominant-baseline:central" fill="var(--color-text-secondary)">Tree-shakeable</text>
148
+
149
+ <circle cx="802" cy="286" r="2.5" fill="#1D9E75" opacity="0.6" style="fill:rgb(29, 158, 117);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:0.6;font-family:&quot;Anthropic Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, sans-serif;font-size:16px;font-weight:400;text-anchor:start;dominant-baseline:auto"/>
150
+ <text x="812" y="286" dominant-baseline="central" style="font-family:var(--font-sans);font-size:11px;fill:rgb(194, 192, 182);stroke:none;color:rgb(255, 255, 255);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;opacity:1;font-family:&quot;Anthropic Sans&quot;, sans-serif;font-size:11px;font-weight:400;text-anchor:start;dominant-baseline:central" fill="var(--color-text-secondary)">Full inference</text>
151
+ </g>
152
+
153
+ </svg>
@@ -0,0 +1,4 @@
1
+ {
2
+ "label": "Examples",
3
+ "position": 1
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "label": "Auth",
3
+ "position": 2
4
+ }
@@ -0,0 +1,3 @@
1
+ # Примеры auth
2
+
3
+ Используйте Result для получения валидированных auth-значений.
@@ -0,0 +1,5 @@
1
+ # token
2
+
3
+ Скрипт: `__examples__/auth/token.js`
4
+
5
+ Демонстрирует `map` для преобразования значений токена.
@@ -0,0 +1,4 @@
1
+ {
2
+ "label": "Connection",
3
+ "position": 1
4
+ }
@@ -0,0 +1,5 @@
1
+ # connect
2
+
3
+ Скрипт: `__examples__/connection/connect.js`
4
+
5
+ Демонстрирует `Ok` + `andThen` для перехода состояния соединения.
@@ -0,0 +1,3 @@
1
+ # Примеры connection
2
+
3
+ Используйте утилиты Result для моделирования потоков connect/reconnect.
@@ -0,0 +1,5 @@
1
+ # reconnect
2
+
3
+ Скрипт: `__examples__/connection/reconnect.js`
4
+
5
+ Демонстрирует fallback-сценарий с `Err` + `orElse`.
@@ -0,0 +1,4 @@
1
+ {
2
+ "label": "Errors",
3
+ "position": 4
4
+ }
@@ -0,0 +1,3 @@
1
+ # Примеры errors
2
+
3
+ Используйте fallback-утилиты Result для устойчивой стратегии повторов.
@@ -0,0 +1,5 @@
1
+ # retry
2
+
3
+ Скрипт: `__examples__/errors/retry.js`
4
+
5
+ Демонстрирует генерацию fallback-сообщения через `unwrapOrElse`.
@@ -0,0 +1,9 @@
1
+ # Карта примеров
2
+
3
+ Пакет предоставляет каноничную реализацию `Result<T, E>` и набор утилит.
4
+
5
+ Карта доменов:
6
+ - connection: установка соединения и восстановление состояния транспорта
7
+ - auth: преобразование Result-значений в заголовки/токены авторизации
8
+ - streaming: обработка успешных чанков и отказов
9
+ - errors: предсказуемые стратегии повторов и fallback-веток
@@ -0,0 +1,4 @@
1
+ {
2
+ "label": "Streaming",
3
+ "position": 3
4
+ }
@@ -0,0 +1,3 @@
1
+ # Примеры streaming
2
+
3
+ Используйте сопоставление Result для безопасной обработки чанков потока.
@@ -0,0 +1,5 @@
1
+ # text
2
+
3
+ Скрипт: `__examples__/streaming/text.js`
4
+
5
+ Демонстрирует безопасное ветвление форматирования через `match`.
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "@resultsafe/core-fp-result",
3
+ "version": "0.1.0",
4
+ "author": "Denis Savasteev",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "sideEffects": false,
8
+ "publishConfig": {
9
+ "access": "public",
10
+ "provenance": true,
11
+ "tag": "latest"
12
+ },
13
+ "engines": {
14
+ "node": ">=20.10.0",
15
+ "pnpm": ">=10.0.0"
16
+ },
17
+ "scripts": {
18
+ "clean:dist": "rimraf dist .tsbuildinfo",
19
+ "build:types": "tsc -b ./config/tsconfig.build.types.json --force",
20
+ "build:esm": "vite build --config ./config/vite.config.build.esm.ts",
21
+ "build:cjs": "vite build --config ./config/vite.config.build.cjs.ts && node ./__scripts__/build/write-cjs-package-json.mjs",
22
+ "build:umd": "vite build --config ./config/vite.config.build.umd.ts",
23
+ "prepare:dist:publish": "node ./__scripts__/build/prepare-dist-publish.mjs",
24
+ "check:release:artifacts": "node ./__scripts__/build/validate-release-artifacts.mjs",
25
+ "check:release:pack": "npm pack --dry-run ./dist",
26
+ "build:all": "pnpm run clean:dist && pnpm run build:esm && pnpm run build:cjs && pnpm run build:umd && pnpm run build:types",
27
+ "build:release": "pnpm run build:all && pnpm run prepare:dist:publish",
28
+ "verify:release": "pnpm run build:release && pnpm run check:release:artifacts && pnpm run test && pnpm run check:release:pack",
29
+ "docs:api:clean": "rimraf docs/api",
30
+ "docs:api:generate": "typedoc --options typedoc.json --out docs/api",
31
+ "docs:api:mirror": "node ./__scripts__/docs/mirror-typedoc-api.mjs",
32
+ "docs:api": "pnpm run docs:api:generate && pnpm run docs:api:mirror",
33
+ "docs:api:check": "typedoc --options typedoc.json --emit none",
34
+ "docs:api:all": "pnpm run docs:api:clean && pnpm run docs:api && pnpm run docs:api:check && pnpm run test",
35
+ "test": "vitest run --config ./config/vitest.config.ts",
36
+ "test:coverage": "vitest run --config ./config/vitest.config.ts --coverage",
37
+ "lint": "eslint . --ext .ts,.tsx --config config/eslint.config.mjs",
38
+ "lint:fix": "eslint . --ext .ts,.tsx --config config/eslint.config.mjs --fix",
39
+ "prepublishOnly": "pnpm run verify:release",
40
+ "npm:publish:dry": "pnpm run verify:release && npm publish ./dist --dry-run --access public",
41
+ "npm:publish:public": "npm publish ./dist --access public --provenance"
42
+ },
43
+ "main": "dist/cjs/index.js",
44
+ "module": "dist/esm/index.js",
45
+ "browser": "dist/umd/resultsafe-monorepo-core-fp-result.umd.js",
46
+ "types": "dist/types/index.d.ts",
47
+ "exports": {
48
+ ".": {
49
+ "types": "./dist/types/index.d.ts",
50
+ "import": "./dist/esm/index.js",
51
+ "require": "./dist/cjs/index.js"
52
+ },
53
+ "./Ok": {
54
+ "types": "./dist/types/constructors/Ok.d.ts",
55
+ "import": "./dist/esm/constructors/Ok.js",
56
+ "require": "./dist/cjs/constructors/Ok.js"
57
+ },
58
+ "./Err": {
59
+ "types": "./dist/types/constructors/Err.d.ts",
60
+ "import": "./dist/esm/constructors/Err.js",
61
+ "require": "./dist/cjs/constructors/Err.js"
62
+ }
63
+ },
64
+ "files": [
65
+ "dist",
66
+ "docs",
67
+ "README.md",
68
+ "LICENSE"
69
+ ]
70
+ }