@evolu/common 8.4.0 → 8.6.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 (353) hide show
  1. package/dist/src/Array.d.ts +191 -94
  2. package/dist/src/Array.d.ts.map +1 -1
  3. package/dist/src/Array.js +91 -40
  4. package/dist/src/Assert.d.ts +233 -30
  5. package/dist/src/Assert.d.ts.map +1 -1
  6. package/dist/src/Assert.js +151 -30
  7. package/dist/src/BigInt.d.ts +3 -3
  8. package/dist/src/BigInt.js +3 -3
  9. package/dist/src/Brand.d.ts +7 -7
  10. package/dist/src/Buffer.d.ts +12 -4
  11. package/dist/src/Buffer.d.ts.map +1 -1
  12. package/dist/src/Cache.d.ts +8 -3
  13. package/dist/src/Cache.d.ts.map +1 -1
  14. package/dist/src/Cache.js +8 -3
  15. package/dist/src/Callbacks.d.ts +8 -4
  16. package/dist/src/Callbacks.d.ts.map +1 -1
  17. package/dist/src/Console.d.ts +45 -30
  18. package/dist/src/Console.d.ts.map +1 -1
  19. package/dist/src/Console.js +32 -21
  20. package/dist/src/Crypto.d.ts +13 -8
  21. package/dist/src/Crypto.d.ts.map +1 -1
  22. package/dist/src/Crypto.js +6 -3
  23. package/dist/src/Eq.d.ts +107 -58
  24. package/dist/src/Eq.d.ts.map +1 -1
  25. package/dist/src/Eq.js +308 -112
  26. package/dist/src/Function.d.ts +54 -24
  27. package/dist/src/Function.d.ts.map +1 -1
  28. package/dist/src/Function.js +34 -17
  29. package/dist/src/Http.d.ts +52 -19
  30. package/dist/src/Http.d.ts.map +1 -1
  31. package/dist/src/Identicon.d.ts +9 -4
  32. package/dist/src/Identicon.d.ts.map +1 -1
  33. package/dist/src/Identicon.js +9 -4
  34. package/dist/src/LeakDetector.d.ts.map +1 -1
  35. package/dist/src/LeakDetector.js +4 -1
  36. package/dist/src/LockManager.d.ts +12 -10
  37. package/dist/src/LockManager.d.ts.map +1 -1
  38. package/dist/src/Lookup.d.ts +4 -2
  39. package/dist/src/Lookup.d.ts.map +1 -1
  40. package/dist/src/Lookup.js +5 -2
  41. package/dist/src/Number.d.ts +28 -24
  42. package/dist/src/Number.d.ts.map +1 -1
  43. package/dist/src/Number.js +16 -17
  44. package/dist/src/Object.d.ts +89 -47
  45. package/dist/src/Object.d.ts.map +1 -1
  46. package/dist/src/Object.js +88 -41
  47. package/dist/src/Option.d.ts +14 -5
  48. package/dist/src/Option.d.ts.map +1 -1
  49. package/dist/src/Option.js +14 -5
  50. package/dist/src/Order.d.ts +12 -12
  51. package/dist/src/Order.js +12 -12
  52. package/dist/src/Platform.d.ts +2 -2
  53. package/dist/src/Platform.js +1 -0
  54. package/dist/src/Random.d.ts +7 -4
  55. package/dist/src/Random.d.ts.map +1 -1
  56. package/dist/src/Redacted.d.ts +13 -6
  57. package/dist/src/Redacted.d.ts.map +1 -1
  58. package/dist/src/Redacted.js +4 -2
  59. package/dist/src/Ref.d.ts +4 -4
  60. package/dist/src/Relation.d.ts +5 -7
  61. package/dist/src/Relation.d.ts.map +1 -1
  62. package/dist/src/Relation.js +3 -3
  63. package/dist/src/Resource.d.ts +27 -12
  64. package/dist/src/Resource.d.ts.map +1 -1
  65. package/dist/src/Resource.js +9 -3
  66. package/dist/src/Result.d.ts +258 -114
  67. package/dist/src/Result.d.ts.map +1 -1
  68. package/dist/src/Result.js +74 -39
  69. package/dist/src/Schedule.d.ts +233 -116
  70. package/dist/src/Schedule.d.ts.map +1 -1
  71. package/dist/src/Schedule.js +204 -110
  72. package/dist/src/Set.d.ts +43 -24
  73. package/dist/src/Set.d.ts.map +1 -1
  74. package/dist/src/Set.js +25 -13
  75. package/dist/src/Sqlite.d.ts +4 -4
  76. package/dist/src/Sqlite.d.ts.map +1 -1
  77. package/dist/src/Sqlite.js +18 -15
  78. package/dist/src/Store.d.ts.map +1 -1
  79. package/dist/src/Store.js +3 -1
  80. package/dist/src/String.d.ts.map +1 -1
  81. package/dist/src/String.js +1 -1
  82. package/dist/src/Task.d.ts +555 -264
  83. package/dist/src/Task.d.ts.map +1 -1
  84. package/dist/src/Task.js +278 -168
  85. package/dist/src/Test.d.ts +10 -4
  86. package/dist/src/Test.d.ts.map +1 -1
  87. package/dist/src/Test.js +11 -4
  88. package/dist/src/Time.d.ts +27 -17
  89. package/dist/src/Time.d.ts.map +1 -1
  90. package/dist/src/Time.js +25 -8
  91. package/dist/src/Type.d.ts +1218 -372
  92. package/dist/src/Type.d.ts.map +1 -1
  93. package/dist/src/Type.js +1056 -379
  94. package/dist/src/Types.d.ts +95 -40
  95. package/dist/src/Types.d.ts.map +1 -1
  96. package/dist/src/Types.js +13 -4
  97. package/dist/src/WebSocket.d.ts +14 -6
  98. package/dist/src/WebSocket.d.ts.map +1 -1
  99. package/dist/src/WebSocket.js +8 -0
  100. package/dist/src/Worker.d.ts +10 -6
  101. package/dist/src/Worker.d.ts.map +1 -1
  102. package/dist/src/Worker.js +1 -1
  103. package/dist/src/intl/_en.d.ts +3 -1
  104. package/dist/src/intl/_en.d.ts.map +1 -1
  105. package/dist/src/intl/_en.js +17 -3
  106. package/dist/src/intl/ar.d.ts +3 -1
  107. package/dist/src/intl/ar.d.ts.map +1 -1
  108. package/dist/src/intl/ar.js +15 -2
  109. package/dist/src/intl/bn.d.ts +3 -1
  110. package/dist/src/intl/bn.d.ts.map +1 -1
  111. package/dist/src/intl/bn.js +16 -3
  112. package/dist/src/intl/ca.d.ts +3 -1
  113. package/dist/src/intl/ca.d.ts.map +1 -1
  114. package/dist/src/intl/ca.js +16 -3
  115. package/dist/src/intl/cs.d.ts +3 -1
  116. package/dist/src/intl/cs.d.ts.map +1 -1
  117. package/dist/src/intl/cs.js +16 -3
  118. package/dist/src/intl/da.d.ts +3 -1
  119. package/dist/src/intl/da.d.ts.map +1 -1
  120. package/dist/src/intl/da.js +16 -3
  121. package/dist/src/intl/de.d.ts +3 -1
  122. package/dist/src/intl/de.d.ts.map +1 -1
  123. package/dist/src/intl/de.js +16 -3
  124. package/dist/src/intl/el.d.ts +3 -1
  125. package/dist/src/intl/el.d.ts.map +1 -1
  126. package/dist/src/intl/el.js +16 -3
  127. package/dist/src/intl/es.d.ts +3 -1
  128. package/dist/src/intl/es.d.ts.map +1 -1
  129. package/dist/src/intl/es.js +16 -3
  130. package/dist/src/intl/fa.d.ts +3 -1
  131. package/dist/src/intl/fa.d.ts.map +1 -1
  132. package/dist/src/intl/fa.js +16 -3
  133. package/dist/src/intl/fi.d.ts +3 -1
  134. package/dist/src/intl/fi.d.ts.map +1 -1
  135. package/dist/src/intl/fi.js +16 -3
  136. package/dist/src/intl/fil.d.ts +3 -1
  137. package/dist/src/intl/fil.d.ts.map +1 -1
  138. package/dist/src/intl/fil.js +16 -3
  139. package/dist/src/intl/fr.d.ts +3 -1
  140. package/dist/src/intl/fr.d.ts.map +1 -1
  141. package/dist/src/intl/fr.js +16 -3
  142. package/dist/src/intl/he.d.ts +3 -1
  143. package/dist/src/intl/he.d.ts.map +1 -1
  144. package/dist/src/intl/he.js +16 -3
  145. package/dist/src/intl/hi.d.ts +3 -1
  146. package/dist/src/intl/hi.d.ts.map +1 -1
  147. package/dist/src/intl/hi.js +16 -3
  148. package/dist/src/intl/hr.d.ts +3 -1
  149. package/dist/src/intl/hr.d.ts.map +1 -1
  150. package/dist/src/intl/hr.js +16 -3
  151. package/dist/src/intl/hu.d.ts +2 -1
  152. package/dist/src/intl/hu.d.ts.map +1 -1
  153. package/dist/src/intl/hu.js +15 -3
  154. package/dist/src/intl/id.d.ts +3 -1
  155. package/dist/src/intl/id.d.ts.map +1 -1
  156. package/dist/src/intl/id.js +16 -3
  157. package/dist/src/intl/it.d.ts +3 -1
  158. package/dist/src/intl/it.d.ts.map +1 -1
  159. package/dist/src/intl/it.js +16 -3
  160. package/dist/src/intl/ja.d.ts +3 -1
  161. package/dist/src/intl/ja.d.ts.map +1 -1
  162. package/dist/src/intl/ja.js +16 -3
  163. package/dist/src/intl/ko.d.ts +3 -1
  164. package/dist/src/intl/ko.d.ts.map +1 -1
  165. package/dist/src/intl/ko.js +16 -3
  166. package/dist/src/intl/ml.d.ts +3 -1
  167. package/dist/src/intl/ml.d.ts.map +1 -1
  168. package/dist/src/intl/ml.js +16 -3
  169. package/dist/src/intl/mr.d.ts +3 -1
  170. package/dist/src/intl/mr.d.ts.map +1 -1
  171. package/dist/src/intl/mr.js +16 -3
  172. package/dist/src/intl/ms.d.ts +3 -1
  173. package/dist/src/intl/ms.d.ts.map +1 -1
  174. package/dist/src/intl/ms.js +15 -2
  175. package/dist/src/intl/nb.d.ts +2 -1
  176. package/dist/src/intl/nb.d.ts.map +1 -1
  177. package/dist/src/intl/nb.js +14 -2
  178. package/dist/src/intl/nl.d.ts +3 -1
  179. package/dist/src/intl/nl.d.ts.map +1 -1
  180. package/dist/src/intl/nl.js +16 -3
  181. package/dist/src/intl/pa.d.ts +3 -1
  182. package/dist/src/intl/pa.d.ts.map +1 -1
  183. package/dist/src/intl/pa.js +16 -3
  184. package/dist/src/intl/pl.d.ts +2 -0
  185. package/dist/src/intl/pl.d.ts.map +1 -1
  186. package/dist/src/intl/pl.js +15 -2
  187. package/dist/src/intl/pt-BR.d.ts +3 -1
  188. package/dist/src/intl/pt-BR.d.ts.map +1 -1
  189. package/dist/src/intl/pt-BR.js +16 -3
  190. package/dist/src/intl/pt.d.ts +3 -1
  191. package/dist/src/intl/pt.d.ts.map +1 -1
  192. package/dist/src/intl/pt.js +15 -2
  193. package/dist/src/intl/ro.d.ts +3 -1
  194. package/dist/src/intl/ro.d.ts.map +1 -1
  195. package/dist/src/intl/ro.js +16 -3
  196. package/dist/src/intl/sk.d.ts +3 -1
  197. package/dist/src/intl/sk.d.ts.map +1 -1
  198. package/dist/src/intl/sk.js +15 -2
  199. package/dist/src/intl/sl.d.ts +3 -1
  200. package/dist/src/intl/sl.d.ts.map +1 -1
  201. package/dist/src/intl/sl.js +16 -3
  202. package/dist/src/intl/sv.d.ts +3 -1
  203. package/dist/src/intl/sv.d.ts.map +1 -1
  204. package/dist/src/intl/sv.js +16 -3
  205. package/dist/src/intl/sw.d.ts +1 -0
  206. package/dist/src/intl/sw.d.ts.map +1 -1
  207. package/dist/src/intl/sw.js +14 -2
  208. package/dist/src/intl/ta.d.ts +3 -1
  209. package/dist/src/intl/ta.d.ts.map +1 -1
  210. package/dist/src/intl/ta.js +16 -3
  211. package/dist/src/intl/te.d.ts +3 -1
  212. package/dist/src/intl/te.d.ts.map +1 -1
  213. package/dist/src/intl/te.js +16 -3
  214. package/dist/src/intl/th.d.ts +3 -1
  215. package/dist/src/intl/th.d.ts.map +1 -1
  216. package/dist/src/intl/th.js +16 -3
  217. package/dist/src/intl/tr.d.ts +3 -1
  218. package/dist/src/intl/tr.d.ts.map +1 -1
  219. package/dist/src/intl/tr.js +16 -3
  220. package/dist/src/intl/uk.d.ts +3 -1
  221. package/dist/src/intl/uk.d.ts.map +1 -1
  222. package/dist/src/intl/uk.js +16 -3
  223. package/dist/src/intl/ur.d.ts +3 -1
  224. package/dist/src/intl/ur.d.ts.map +1 -1
  225. package/dist/src/intl/ur.js +15 -2
  226. package/dist/src/intl/vi.d.ts +3 -1
  227. package/dist/src/intl/vi.d.ts.map +1 -1
  228. package/dist/src/intl/vi.js +16 -3
  229. package/dist/src/intl/zh-CN.d.ts +3 -1
  230. package/dist/src/intl/zh-CN.d.ts.map +1 -1
  231. package/dist/src/intl/zh-CN.js +16 -3
  232. package/dist/src/intl/zh-TW.d.ts +3 -1
  233. package/dist/src/intl/zh-TW.d.ts.map +1 -1
  234. package/dist/src/intl/zh-TW.js +16 -3
  235. package/dist/src/local-first/Db.js +3 -2
  236. package/dist/src/local-first/Evolu.d.ts +47 -24
  237. package/dist/src/local-first/Evolu.d.ts.map +1 -1
  238. package/dist/src/local-first/Evolu.js +1 -0
  239. package/dist/src/local-first/Owner.d.ts +18 -14
  240. package/dist/src/local-first/Owner.d.ts.map +1 -1
  241. package/dist/src/local-first/Owner.js +14 -11
  242. package/dist/src/local-first/Protocol.d.ts +5 -5
  243. package/dist/src/local-first/Protocol.d.ts.map +1 -1
  244. package/dist/src/local-first/Protocol.js +35 -29
  245. package/dist/src/local-first/Query.d.ts +34 -21
  246. package/dist/src/local-first/Query.d.ts.map +1 -1
  247. package/dist/src/local-first/Query.js +27 -14
  248. package/dist/src/local-first/Relay.d.ts +12 -5
  249. package/dist/src/local-first/Relay.d.ts.map +1 -1
  250. package/dist/src/local-first/Relay.js +1 -1
  251. package/dist/src/local-first/Schema.d.ts +19 -11
  252. package/dist/src/local-first/Schema.d.ts.map +1 -1
  253. package/dist/src/local-first/Schema.js +11 -6
  254. package/dist/src/local-first/Shared.d.ts.map +1 -1
  255. package/dist/src/local-first/Shared.js +4 -2
  256. package/dist/src/local-first/Storage.d.ts +4 -2
  257. package/dist/src/local-first/Storage.d.ts.map +1 -1
  258. package/dist/src/local-first/Timestamp.d.ts.map +1 -1
  259. package/dist/src/local-first/Timestamp.js +1 -1
  260. package/package.json +3 -4
  261. package/src/Array.ts +195 -95
  262. package/src/Assert.ts +337 -31
  263. package/src/BigInt.ts +3 -3
  264. package/src/Brand.ts +7 -7
  265. package/src/Buffer.ts +12 -4
  266. package/src/Cache.ts +8 -3
  267. package/src/Callbacks.ts +8 -4
  268. package/src/Console.ts +45 -30
  269. package/src/Crypto.ts +13 -8
  270. package/src/Eq.ts +450 -122
  271. package/src/Function.ts +54 -24
  272. package/src/Http.ts +52 -19
  273. package/src/Identicon.ts +9 -4
  274. package/src/LeakDetector.ts +4 -3
  275. package/src/LockManager.ts +12 -10
  276. package/src/Lookup.ts +5 -2
  277. package/src/Number.ts +28 -24
  278. package/src/Object.ts +115 -49
  279. package/src/Option.ts +14 -5
  280. package/src/Order.ts +12 -12
  281. package/src/Platform.ts +3 -2
  282. package/src/Random.ts +7 -4
  283. package/src/Redacted.ts +13 -6
  284. package/src/Ref.ts +4 -4
  285. package/src/Relation.ts +8 -10
  286. package/src/Resource.ts +36 -15
  287. package/src/Result.ts +263 -119
  288. package/src/Schedule.ts +233 -116
  289. package/src/Set.ts +43 -24
  290. package/src/Sqlite.ts +18 -15
  291. package/src/Store.ts +3 -1
  292. package/src/String.ts +1 -1
  293. package/src/Task.ts +566 -286
  294. package/src/Test.ts +11 -4
  295. package/src/Time.ts +36 -19
  296. package/src/Type.ts +2191 -590
  297. package/src/Types.ts +108 -40
  298. package/src/WebSocket.ts +22 -6
  299. package/src/Worker.ts +11 -7
  300. package/src/intl/_en.ts +20 -4
  301. package/src/intl/ar.ts +17 -2
  302. package/src/intl/bn.ts +19 -4
  303. package/src/intl/ca.ts +19 -4
  304. package/src/intl/cs.ts +19 -4
  305. package/src/intl/da.ts +19 -4
  306. package/src/intl/de.ts +19 -4
  307. package/src/intl/el.ts +19 -4
  308. package/src/intl/es.ts +19 -4
  309. package/src/intl/fa.ts +19 -4
  310. package/src/intl/fi.ts +19 -4
  311. package/src/intl/fil.ts +19 -4
  312. package/src/intl/fr.ts +19 -4
  313. package/src/intl/he.ts +19 -4
  314. package/src/intl/hi.ts +19 -4
  315. package/src/intl/hr.ts +19 -4
  316. package/src/intl/hu.ts +18 -4
  317. package/src/intl/id.ts +19 -4
  318. package/src/intl/it.ts +19 -4
  319. package/src/intl/ja.ts +19 -4
  320. package/src/intl/ko.ts +19 -4
  321. package/src/intl/ml.ts +19 -4
  322. package/src/intl/mr.ts +19 -4
  323. package/src/intl/ms.ts +17 -2
  324. package/src/intl/nb.ts +16 -2
  325. package/src/intl/nl.ts +19 -4
  326. package/src/intl/pa.ts +19 -4
  327. package/src/intl/pl.ts +18 -2
  328. package/src/intl/pt-BR.ts +19 -4
  329. package/src/intl/pt.ts +17 -2
  330. package/src/intl/ro.ts +19 -4
  331. package/src/intl/sk.ts +17 -2
  332. package/src/intl/sl.ts +19 -4
  333. package/src/intl/sv.ts +19 -4
  334. package/src/intl/sw.ts +15 -2
  335. package/src/intl/ta.ts +19 -4
  336. package/src/intl/te.ts +19 -4
  337. package/src/intl/th.ts +19 -4
  338. package/src/intl/tr.ts +19 -4
  339. package/src/intl/uk.ts +19 -4
  340. package/src/intl/ur.ts +17 -2
  341. package/src/intl/vi.ts +19 -3
  342. package/src/intl/zh-CN.ts +19 -4
  343. package/src/intl/zh-TW.ts +19 -4
  344. package/src/local-first/Db.ts +2 -1
  345. package/src/local-first/Evolu.ts +48 -24
  346. package/src/local-first/Owner.ts +18 -14
  347. package/src/local-first/Protocol.ts +45 -35
  348. package/src/local-first/Query.ts +40 -24
  349. package/src/local-first/Relay.ts +13 -6
  350. package/src/local-first/Schema.ts +19 -11
  351. package/src/local-first/Shared.ts +4 -2
  352. package/src/local-first/Storage.ts +4 -2
  353. package/src/local-first/Timestamp.ts +1 -1
package/src/intl/te.ts CHANGED
@@ -30,6 +30,7 @@ import type {
30
30
  LessThanError,
31
31
  LessThanOrEqualToError,
32
32
  LiteralError,
33
+ MapError,
33
34
  MaxLengthError,
34
35
  MinLengthError,
35
36
  MnemonicError,
@@ -335,10 +336,6 @@ export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
335
336
  if (error.reason.kind === "NotSet") {
336
337
  return `విలువ ${safelyStringifyUnknownValue(error.reason.value)} Set కాదు.`;
337
338
  }
338
- if (error.reason.kind === "UnexpectedPrototype") {
339
- return "విలువ Set subclass యొక్క instance, కానీ Set Output నేరుగా Set instance అయి ఉండాలి.";
340
- }
341
-
342
339
  const issue = error.reason.issues[0];
343
340
 
344
341
  switch (issue.kind) {
@@ -349,6 +346,24 @@ export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
349
346
  }
350
347
  };
351
348
 
349
+ /** MapErrorను తెలుగులో ఫార్మాట్ చేస్తుంది. */
350
+ export const formatMapError: TypeErrorFormatter<MapError> = (error) => {
351
+ if (error.reason.kind === "NotMap") {
352
+ return `విలువ ${safelyStringifyUnknownValue(error.reason.value)} Map కాదు.`;
353
+ }
354
+ const issue = error.reason.issues[0];
355
+
356
+ switch (issue.kind) {
357
+ case "ExcessProperty":
358
+ return `అదనపు Map property ${safelyStringifyUnknownValue(issue.key)} అనుమతించబడదు.`;
359
+ case "Key":
360
+ case "Value":
361
+ return `సూచిక ${issue.index} వద్ద Map element చెల్లదు.`;
362
+ case "Collision":
363
+ return `Map keys ${safelyStringifyUnknownValue(issue.previousKey)} మరియు ${safelyStringifyUnknownValue(issue.key)} ఒకే key ${safelyStringifyUnknownValue(issue.outputKey)} కు decode అవుతాయి.`;
364
+ }
365
+ };
366
+
352
367
  /** TupleErrorను తెలుగులో ఫార్మాట్ చేస్తుంది. */
353
368
  export const formatTupleError: TypeErrorFormatter<
354
369
  TupleError | TupleElementsError<TypeError>
package/src/intl/th.ts CHANGED
@@ -30,6 +30,7 @@ import type {
30
30
  LessThanError,
31
31
  LessThanOrEqualToError,
32
32
  LiteralError,
33
+ MapError,
33
34
  MaxLengthError,
34
35
  MinLengthError,
35
36
  MnemonicError,
@@ -332,10 +333,6 @@ export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
332
333
  if (error.reason.kind === "NotSet") {
333
334
  return `ค่า ${safelyStringifyUnknownValue(error.reason.value)} ไม่ใช่ Set`;
334
335
  }
335
- if (error.reason.kind === "UnexpectedPrototype") {
336
- return "ค่านี้เป็นอินสแตนซ์ของคลาสย่อย Set แต่ Set Output ต้องเป็นอินสแตนซ์ของ Set โดยตรง";
337
- }
338
-
339
336
  const issue = error.reason.issues[0];
340
337
 
341
338
  switch (issue.kind) {
@@ -346,6 +343,24 @@ export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
346
343
  }
347
344
  };
348
345
 
346
+ /** จัดรูปแบบ MapError เป็นภาษาไทย */
347
+ export const formatMapError: TypeErrorFormatter<MapError> = (error) => {
348
+ if (error.reason.kind === "NotMap") {
349
+ return `ค่า ${safelyStringifyUnknownValue(error.reason.value)} ไม่ใช่ Map`;
350
+ }
351
+ const issue = error.reason.issues[0];
352
+
353
+ switch (issue.kind) {
354
+ case "ExcessProperty":
355
+ return `ไม่อนุญาตให้มี Map property ส่วนเกิน ${safelyStringifyUnknownValue(issue.key)}`;
356
+ case "Key":
357
+ case "Value":
358
+ return `องค์ประกอบ Map ที่ดัชนี ${issue.index} ไม่ถูกต้อง`;
359
+ case "Collision":
360
+ return `คีย์ Map ${safelyStringifyUnknownValue(issue.previousKey)} และ ${safelyStringifyUnknownValue(issue.key)} ถอดรหัสเป็นคีย์เดียวกัน ${safelyStringifyUnknownValue(issue.outputKey)}`;
361
+ }
362
+ };
363
+
349
364
  /** จัดรูปแบบ TupleError เป็นภาษาไทย */
350
365
  export const formatTupleError: TypeErrorFormatter<
351
366
  TupleError | TupleElementsError<TypeError>
package/src/intl/tr.ts CHANGED
@@ -30,6 +30,7 @@ import type {
30
30
  LessThanError,
31
31
  LessThanOrEqualToError,
32
32
  LiteralError,
33
+ MapError,
33
34
  MaxLengthError,
34
35
  MinLengthError,
35
36
  MnemonicError,
@@ -335,10 +336,6 @@ export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
335
336
  if (error.reason.kind === "NotSet") {
336
337
  return `Değer ${safelyStringifyUnknownValue(error.reason.value)} bir Set değildir.`;
337
338
  }
338
- if (error.reason.kind === "UnexpectedPrototype") {
339
- return "Değer bir Set alt sınıfının örneğidir, ancak bir Set Output doğrudan bir Set örneği olmalıdır.";
340
- }
341
-
342
339
  const issue = error.reason.issues[0];
343
340
 
344
341
  switch (issue.kind) {
@@ -349,6 +346,24 @@ export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
349
346
  }
350
347
  };
351
348
 
349
+ /** Formats a MapError in Turkish. */
350
+ export const formatMapError: TypeErrorFormatter<MapError> = (error) => {
351
+ if (error.reason.kind === "NotMap") {
352
+ return `Değer ${safelyStringifyUnknownValue(error.reason.value)} bir Map değildir.`;
353
+ }
354
+ const issue = error.reason.issues[0];
355
+
356
+ switch (issue.kind) {
357
+ case "ExcessProperty":
358
+ return `Fazladan Map özelliğine ${safelyStringifyUnknownValue(issue.key)} izin verilmez.`;
359
+ case "Key":
360
+ case "Value":
361
+ return `${issue.index} dizinindeki Map öğesi geçersiz.`;
362
+ case "Collision":
363
+ return `Map anahtarları ${safelyStringifyUnknownValue(issue.previousKey)} ve ${safelyStringifyUnknownValue(issue.key)}, aynı ${safelyStringifyUnknownValue(issue.outputKey)} anahtarına çözümleniyor.`;
364
+ }
365
+ };
366
+
352
367
  /** Formats a TupleError in Turkish. */
353
368
  export const formatTupleError: TypeErrorFormatter<
354
369
  TupleError | TupleElementsError<TypeError>
package/src/intl/uk.ts CHANGED
@@ -30,6 +30,7 @@ import type {
30
30
  LessThanError,
31
31
  LessThanOrEqualToError,
32
32
  LiteralError,
33
+ MapError,
33
34
  MaxLengthError,
34
35
  MinLengthError,
35
36
  MnemonicError,
@@ -336,10 +337,6 @@ export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
336
337
  if (error.reason.kind === "NotSet") {
337
338
  return `A value ${safelyStringifyUnknownValue(error.reason.value)} is not a Set.`;
338
339
  }
339
- if (error.reason.kind === "UnexpectedPrototype") {
340
- return "The value is an instance of a Set subclass, but a Set Output must be a direct Set instance.";
341
- }
342
-
343
340
  const issue = error.reason.issues[0];
344
341
 
345
342
  switch (issue.kind) {
@@ -350,6 +347,24 @@ export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
350
347
  }
351
348
  };
352
349
 
350
+ /** Formats a MapError in English. */
351
+ export const formatMapError: TypeErrorFormatter<MapError> = (error) => {
352
+ if (error.reason.kind === "NotMap") {
353
+ return `A value ${safelyStringifyUnknownValue(error.reason.value)} is not a Map.`;
354
+ }
355
+ const issue = error.reason.issues[0];
356
+
357
+ switch (issue.kind) {
358
+ case "ExcessProperty":
359
+ return `An excess Map property ${safelyStringifyUnknownValue(issue.key)} is not allowed.`;
360
+ case "Key":
361
+ case "Value":
362
+ return `A Map element at index ${issue.index} is invalid.`;
363
+ case "Collision":
364
+ return `Map keys ${safelyStringifyUnknownValue(issue.previousKey)} and ${safelyStringifyUnknownValue(issue.key)} decode to the same key ${safelyStringifyUnknownValue(issue.outputKey)}.`;
365
+ }
366
+ };
367
+
353
368
  /** Formats a TupleError in English. */
354
369
  export const formatTupleError: TypeErrorFormatter<
355
370
  TupleError | TupleElementsError<TypeError>
package/src/intl/ur.ts CHANGED
@@ -30,6 +30,7 @@ import type {
30
30
  LessThanError,
31
31
  LessThanOrEqualToError,
32
32
  LiteralError,
33
+ MapError,
33
34
  MaxLengthError,
34
35
  MinLengthError,
35
36
  MnemonicError,
@@ -284,8 +285,6 @@ export const formatArrayError: TypeErrorFormatter<ArrayError> = (error) => {
284
285
  export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
285
286
  if (error.reason.kind === "NotSet")
286
287
  return `قدر ${safelyStringifyUnknownValue(error.reason.value)} Set نہیں ہے۔`;
287
- if (error.reason.kind === "UnexpectedPrototype")
288
- return "قدر Set subclass کی instance ہے، لیکن Set Output براہ راست Set instance ہونا چاہیے۔";
289
288
  const issue = error.reason.issues[0];
290
289
  switch (issue.kind) {
291
290
  case "ExcessProperty":
@@ -294,6 +293,22 @@ export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
294
293
  return `index ${issue.index} پر Set element درست نہیں ہے۔`;
295
294
  }
296
295
  };
296
+
297
+ /** MapError کو اردو میں فارمیٹ کرتا ہے۔ */
298
+ export const formatMapError: TypeErrorFormatter<MapError> = (error) => {
299
+ if (error.reason.kind === "NotMap")
300
+ return `قدر ${safelyStringifyUnknownValue(error.reason.value)} Map نہیں ہے۔`;
301
+ const issue = error.reason.issues[0];
302
+ switch (issue.kind) {
303
+ case "ExcessProperty":
304
+ return `اضافی Map property ${safelyStringifyUnknownValue(issue.key)} کی اجازت نہیں ہے۔`;
305
+ case "Key":
306
+ case "Value":
307
+ return `index ${issue.index} پر Map element درست نہیں ہے۔`;
308
+ case "Collision":
309
+ return `Map keys ${safelyStringifyUnknownValue(issue.previousKey)} اور ${safelyStringifyUnknownValue(issue.key)} decode ہونے کے بعد ایک ہی key ${safelyStringifyUnknownValue(issue.outputKey)} بن جاتے ہیں۔`;
310
+ }
311
+ };
297
312
  /** TupleError کو اردو میں فارمیٹ کرتا ہے۔ */
298
313
  export const formatTupleError: TypeErrorFormatter<
299
314
  TupleError | TupleElementsError<TypeError>
package/src/intl/vi.ts CHANGED
@@ -30,6 +30,7 @@ import type {
30
30
  LessThanError,
31
31
  LessThanOrEqualToError,
32
32
  LiteralError,
33
+ MapError,
33
34
  MaxLengthError,
34
35
  MinLengthError,
35
36
  MnemonicError,
@@ -289,9 +290,6 @@ export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
289
290
  if (error.reason.kind === "NotSet") {
290
291
  return `Giá trị ${safelyStringifyUnknownValue(error.reason.value)} không phải là Set.`;
291
292
  }
292
- if (error.reason.kind === "UnexpectedPrototype") {
293
- return "Giá trị là một thể hiện của lớp con Set, nhưng Set Output phải là một thể hiện Set trực tiếp.";
294
- }
295
293
  const issue = error.reason.issues[0];
296
294
 
297
295
  switch (issue.kind) {
@@ -302,6 +300,24 @@ export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
302
300
  }
303
301
  };
304
302
 
303
+ /** Định dạng MapError bằng tiếng Việt. */
304
+ export const formatMapError: TypeErrorFormatter<MapError> = (error) => {
305
+ if (error.reason.kind === "NotMap") {
306
+ return `Giá trị ${safelyStringifyUnknownValue(error.reason.value)} không phải là Map.`;
307
+ }
308
+ const issue = error.reason.issues[0];
309
+
310
+ switch (issue.kind) {
311
+ case "ExcessProperty":
312
+ return `Không cho phép thuộc tính Map dư thừa ${safelyStringifyUnknownValue(issue.key)}.`;
313
+ case "Key":
314
+ case "Value":
315
+ return `Phần tử Map tại chỉ mục ${issue.index} không hợp lệ.`;
316
+ case "Collision":
317
+ return `Các khóa Map ${safelyStringifyUnknownValue(issue.previousKey)} và ${safelyStringifyUnknownValue(issue.key)} giải mã thành cùng một khóa ${safelyStringifyUnknownValue(issue.outputKey)}.`;
318
+ }
319
+ };
320
+
305
321
  /** Định dạng TupleError bằng tiếng Việt. */
306
322
  export const formatTupleError: TypeErrorFormatter<
307
323
  TupleError | TupleElementsError<TypeError>
package/src/intl/zh-CN.ts CHANGED
@@ -30,6 +30,7 @@ import type {
30
30
  LessThanError,
31
31
  LessThanOrEqualToError,
32
32
  LiteralError,
33
+ MapError,
33
34
  MaxLengthError,
34
35
  MinLengthError,
35
36
  MnemonicError,
@@ -330,10 +331,6 @@ export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
330
331
  if (error.reason.kind === "NotSet") {
331
332
  return `值 ${safelyStringifyUnknownValue(error.reason.value)} 不是 Set。`;
332
333
  }
333
- if (error.reason.kind === "UnexpectedPrototype") {
334
- return "该值是 Set 子类的实例,但 Set Output 必须是直接的 Set 实例。";
335
- }
336
-
337
334
  const issue = error.reason.issues[0];
338
335
 
339
336
  switch (issue.kind) {
@@ -344,6 +341,24 @@ export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
344
341
  }
345
342
  };
346
343
 
344
+ /** 以简体中文格式化 MapError。 */
345
+ export const formatMapError: TypeErrorFormatter<MapError> = (error) => {
346
+ if (error.reason.kind === "NotMap") {
347
+ return `值 ${safelyStringifyUnknownValue(error.reason.value)} 不是 Map。`;
348
+ }
349
+ const issue = error.reason.issues[0];
350
+
351
+ switch (issue.kind) {
352
+ case "ExcessProperty":
353
+ return `不允许多余的 Map 属性 ${safelyStringifyUnknownValue(issue.key)}。`;
354
+ case "Key":
355
+ case "Value":
356
+ return `索引 ${issue.index} 处的 Map 元素无效。`;
357
+ case "Collision":
358
+ return `Map 键 ${safelyStringifyUnknownValue(issue.previousKey)} 和 ${safelyStringifyUnknownValue(issue.key)} 解码后得到相同的键 ${safelyStringifyUnknownValue(issue.outputKey)}。`;
359
+ }
360
+ };
361
+
347
362
  /** 以简体中文格式化 TupleError。 */
348
363
  export const formatTupleError: TypeErrorFormatter<
349
364
  TupleError | TupleElementsError<TypeError>
package/src/intl/zh-TW.ts CHANGED
@@ -30,6 +30,7 @@ import type {
30
30
  LessThanError,
31
31
  LessThanOrEqualToError,
32
32
  LiteralError,
33
+ MapError,
33
34
  MaxLengthError,
34
35
  MinLengthError,
35
36
  MnemonicError,
@@ -330,10 +331,6 @@ export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
330
331
  if (error.reason.kind === "NotSet") {
331
332
  return `值 ${safelyStringifyUnknownValue(error.reason.value)} 不是 Set。`;
332
333
  }
333
- if (error.reason.kind === "UnexpectedPrototype") {
334
- return "此值是 Set 子類別的執行個體,但 Set Output 必須是直接的 Set 執行個體。";
335
- }
336
-
337
334
  const issue = error.reason.issues[0];
338
335
 
339
336
  switch (issue.kind) {
@@ -344,6 +341,24 @@ export const formatSetError: TypeErrorFormatter<SetError> = (error) => {
344
341
  }
345
342
  };
346
343
 
344
+ /** 以繁體中文格式化 MapError。 */
345
+ export const formatMapError: TypeErrorFormatter<MapError> = (error) => {
346
+ if (error.reason.kind === "NotMap") {
347
+ return `值 ${safelyStringifyUnknownValue(error.reason.value)} 不是 Map。`;
348
+ }
349
+ const issue = error.reason.issues[0];
350
+
351
+ switch (issue.kind) {
352
+ case "ExcessProperty":
353
+ return `不允許多餘的 Map 屬性 ${safelyStringifyUnknownValue(issue.key)}。`;
354
+ case "Key":
355
+ case "Value":
356
+ return `索引 ${issue.index} 的 Map 元素無效。`;
357
+ case "Collision":
358
+ return `Map 鍵 ${safelyStringifyUnknownValue(issue.previousKey)} 和 ${safelyStringifyUnknownValue(issue.key)} 解碼為相同的鍵 ${safelyStringifyUnknownValue(issue.outputKey)}。`;
359
+ }
360
+ };
361
+
347
362
  /** 以繁體中文格式化 TupleError。 */
348
363
  export const formatTupleError: TypeErrorFormatter<
349
364
  TupleError | TupleElementsError<TypeError>
@@ -924,7 +924,8 @@ const applyMessages =
924
924
  */
925
925
  updateOwnerUsage(deps)(
926
926
  ownerIdBytes,
927
- onePositiveInt, // Placeholder until proper tracking implemented
927
+ // Placeholder until proper tracking implemented
928
+ onePositiveInt,
928
929
  firstTimestamp,
929
930
  lastTimestamp,
930
931
  );
@@ -97,10 +97,10 @@ export interface EvoluConfig {
97
97
  * ### Example
98
98
  *
99
99
  * ```ts
100
- * import { AppName } from "@evolu/common";
100
+ * import { AppName, assertEqual } from "@evolu/common";
101
101
  *
102
102
  * const appName = AppName.orThrow("MyApp");
103
- * expect(appName).toBe("MyApp");
103
+ * assertEqual(appName, "MyApp");
104
104
  * ```
105
105
  */
106
106
  readonly appName: AppName;
@@ -164,6 +164,7 @@ export interface EvoluConfig {
164
164
  *
165
165
  * ```ts
166
166
  * import {
167
+ * assertEqual,
167
168
  * createAppOwner,
168
169
  * createOwnerWebSocketTransport,
169
170
  * createOwnerSecret,
@@ -177,19 +178,19 @@ export interface EvoluConfig {
177
178
  * );
178
179
  *
179
180
  * // Use one relay.
180
- * const singleRelay = [
181
+ * const _singleRelay = [
181
182
  * { type: "WebSocket", url: "wss://relay1.example.com" },
182
183
  * ] satisfies ReadonlyArray<OwnerTransport>;
183
184
  *
184
185
  * // Use independent relays for redundancy.
185
- * const redundantRelays = [
186
+ * const _redundantRelays = [
186
187
  * { type: "WebSocket", url: "wss://relay1.example.com" },
187
188
  * { type: "WebSocket", url: "wss://relay2.example.com" },
188
189
  * ] satisfies ReadonlyArray<OwnerTransport>;
189
190
  *
190
191
  * // Start local-only before authentication. After authentication, pass an
191
192
  * // owner-scoped transport to evolu.useOwner.
192
- * const localOnlyBeforeAuthentication =
193
+ * const _localOnlyBeforeAuthentication =
193
194
  * [] satisfies ReadonlyArray<OwnerTransport>;
194
195
  *
195
196
  * // Include the OwnerId when the relay authenticates owners.
@@ -200,7 +201,8 @@ export interface EvoluConfig {
200
201
  * }),
201
202
  * ];
202
203
  *
203
- * expect(authenticatedRelay[0]?.url).toBe(
204
+ * assertEqual(
205
+ * authenticatedRelay[0]?.url,
204
206
  * `wss://relay.example.com?ownerId=${appOwner.id}`,
205
207
  * );
206
208
  * ```
@@ -231,6 +233,7 @@ export interface EvoluConfig {
231
233
  * ```ts
232
234
  * import {
233
235
  * AppName,
236
+ * assertTrue,
234
237
  * createAppOwner,
235
238
  * createEvolu,
236
239
  * createOwnerSecret,
@@ -259,7 +262,7 @@ export interface EvoluConfig {
259
262
  * ],
260
263
  * });
261
264
  *
262
- * expect(createTodoEvolu).toBeTypeOf("function");
265
+ * assertTrue(typeof createTodoEvolu === "function");
263
266
  * ```
264
267
  */
265
268
  readonly indexes?: IndexesConfig;
@@ -340,6 +343,7 @@ export interface Evolu<
340
343
  *
341
344
  * ```ts
342
345
  * import {
346
+ * assertType,
343
347
  * id,
344
348
  * NonEmptyTrimmedString100,
345
349
  * type Evolu,
@@ -366,12 +370,13 @@ export interface Evolu<
366
370
  * { onComplete },
367
371
  * ).id;
368
372
  *
369
- * expectTypeOf<
373
+ * assertType<
374
+ * [TodoId, TodoId],
370
375
  * [
371
376
  * ReturnType<typeof insertTodo>,
372
377
  * ReturnType<typeof insertTodoAndNotify>,
373
378
  * ]
374
- * >().toEqualTypeOf<[TodoId, TodoId]>();
379
+ * >();
375
380
  * ```
376
381
  *
377
382
  * @see {@link Mutation}
@@ -387,6 +392,7 @@ export interface Evolu<
387
392
  *
388
393
  * ```ts
389
394
  * import {
395
+ * assertType,
390
396
  * id,
391
397
  * NonEmptyTrimmedString100,
392
398
  * sqliteTrue,
@@ -408,9 +414,10 @@ export interface Evolu<
408
414
  * const softDeleteTodo = (evolu: Evolu<typeof Schema>, todoId: TodoId) =>
409
415
  * evolu.update("todo", { id: todoId, isDeleted: sqliteTrue }).id;
410
416
  *
411
- * expectTypeOf<
417
+ * assertType<
418
+ * [TodoId, TodoId],
412
419
  * [ReturnType<typeof renameTodo>, ReturnType<typeof softDeleteTodo>]
413
- * >().toEqualTypeOf<[TodoId, TodoId]>();
420
+ * >();
414
421
  * ```
415
422
  *
416
423
  * @see {@link Mutation}
@@ -433,6 +440,7 @@ export interface Evolu<
433
440
  *
434
441
  * ```ts
435
442
  * import {
443
+ * assertType,
436
444
  * createIdFromString,
437
445
  * id,
438
446
  * NonEmptyTrimmedString100,
@@ -451,7 +459,7 @@ export interface Evolu<
451
459
  * title: NonEmptyTrimmedString100.orThrow("Learn Evolu"),
452
460
  * }).id;
453
461
  *
454
- * expectTypeOf(upsertTodo).returns.toEqualTypeOf<TodoId>();
462
+ * assertType<TodoId, ReturnType<typeof upsertTodo>>();
455
463
  * ```
456
464
  *
457
465
  * @see {@link Mutation}
@@ -477,6 +485,7 @@ export interface Evolu<
477
485
  *
478
486
  * ```ts
479
487
  * import {
488
+ * assertType,
480
489
  * createQueryBuilder,
481
490
  * id,
482
491
  * NonEmptyTrimmedString100,
@@ -496,8 +505,9 @@ export interface Evolu<
496
505
  * return rows;
497
506
  * };
498
507
  *
499
- * expectTypeOf(loadTodos).returns.toEqualTypeOf<
500
- * Promise<QueryRows<typeof allTodos.Row>>
508
+ * assertType<
509
+ * Promise<QueryRows<typeof allTodos.Row>>,
510
+ * ReturnType<typeof loadTodos>
501
511
  * >();
502
512
  * ```
503
513
  */
@@ -514,6 +524,7 @@ export interface Evolu<
514
524
  *
515
525
  * ```ts
516
526
  * import {
527
+ * assertType,
517
528
  * createIdFromString,
518
529
  * createQueryBuilder,
519
530
  * id,
@@ -541,11 +552,12 @@ export interface Evolu<
541
552
  * const loadTodoQueries = (evolu: Evolu<typeof Schema>) =>
542
553
  * evolu.loadQueries([allTodos, firstTodo]);
543
554
  *
544
- * expectTypeOf(loadTodoQueries).returns.toEqualTypeOf<
555
+ * assertType<
545
556
  * [
546
557
  * Promise<QueryRows<typeof allTodos.Row>>,
547
558
  * Promise<QueryRows<typeof firstTodo.Row>>,
548
- * ]
559
+ * ],
560
+ * ReturnType<typeof loadTodoQueries>
549
561
  * >();
550
562
  * ```
551
563
  */
@@ -560,6 +572,7 @@ export interface Evolu<
560
572
  *
561
573
  * ```ts
562
574
  * import {
575
+ * assertType,
563
576
  * createQueryBuilder,
564
577
  * id,
565
578
  * NonEmptyTrimmedString100,
@@ -583,7 +596,7 @@ export interface Evolu<
583
596
  * onRows(evolu.getQueryRows(allTodos));
584
597
  * });
585
598
  *
586
- * expectTypeOf(subscribeToTodos).returns.toEqualTypeOf<Unsubscribe>();
599
+ * assertType<Unsubscribe, ReturnType<typeof subscribeToTodos>>();
587
600
  * ```
588
601
  */
589
602
  readonly subscribeQuery: (
@@ -597,6 +610,7 @@ export interface Evolu<
597
610
  *
598
611
  * ```ts
599
612
  * import {
613
+ * assertType,
600
614
  * createQueryBuilder,
601
615
  * id,
602
616
  * NonEmptyTrimmedString100,
@@ -614,8 +628,9 @@ export interface Evolu<
614
628
  * const getTodos = (evolu: Evolu<typeof Schema>) =>
615
629
  * evolu.getQueryRows(allTodos);
616
630
  *
617
- * expectTypeOf(getTodos).returns.toEqualTypeOf<
618
- * QueryRows<typeof allTodos.Row>
631
+ * assertType<
632
+ * QueryRows<typeof allTodos.Row>,
633
+ * ReturnType<typeof getTodos>
619
634
  * >();
620
635
  * ```
621
636
  */
@@ -683,6 +698,7 @@ export interface Evolu<
683
698
  *
684
699
  * ```ts
685
700
  * import {
701
+ * assertEqual,
686
702
  * createAppOwner,
687
703
  * createOwnerWebSocketTransport,
688
704
  * createOwnerSecret,
@@ -702,10 +718,10 @@ export interface Evolu<
702
718
  * url: "wss://relay.example.com",
703
719
  * ownerId: shardOwner.id,
704
720
  * });
705
- * const useShardOwner = (evolu: Evolu): UnuseOwner =>
721
+ * const _useShardOwner = (evolu: Evolu): UnuseOwner =>
706
722
  * evolu.useOwner(shardOwner, [shardTransport]);
707
723
  *
708
- * const useOwners = (
724
+ * const _useOwners = (
709
725
  * evolu: Evolu,
710
726
  * owners: ReadonlyArray<ReadonlyOwner>,
711
727
  * ): UnuseOwner => {
@@ -723,7 +739,7 @@ export interface Evolu<
723
739
  * };
724
740
  *
725
741
  * // Call each returned UnuseOwner once to stop syncing.
726
- * expect(shardTransport).toEqual({
742
+ * assertEqual(shardTransport, {
727
743
  * type: "WebSocket",
728
744
  * url: `wss://relay.example.com?ownerId=${shardOwner.id}`,
729
745
  * });
@@ -748,7 +764,12 @@ export interface EvoluErrorDep {
748
764
  * ### Example
749
765
  *
750
766
  * ```ts
751
- * import { createStore, Millis, type EvoluError } from "@evolu/common";
767
+ * import {
768
+ * assertEqual,
769
+ * createStore,
770
+ * Millis,
771
+ * type EvoluError,
772
+ * } from "@evolu/common";
752
773
  * import type { EvoluErrorDep } from "@evolu/common/local-first";
753
774
  *
754
775
  * // Stand-in for run.deps.evoluError from createEvoluDeps.
@@ -763,6 +784,7 @@ export interface EvoluErrorDep {
763
784
  * const error = deps.evoluError.get();
764
785
  * if (!error) return;
765
786
  *
787
+ * // oxlint-disable-next-line typescript/switch-exhaustiveness-check -- The default intentionally handles every other EvoluError.
766
788
  * switch (error.type) {
767
789
  * case "TimestampDriftError":
768
790
  * // Show guidance specific to the detected error.
@@ -781,7 +803,8 @@ export interface EvoluErrorDep {
781
803
  * next: Millis.orThrow(360000),
782
804
  * now: Millis.orThrow(0),
783
805
  * });
784
- * expect(displayedMessage).toBe(
806
+ * assertEqual(
807
+ * displayedMessage,
785
808
  * "Your system clock appears incorrect. Please fix it.",
786
809
  * );
787
810
  * ```
@@ -1248,6 +1271,7 @@ export const createEvolu =
1248
1271
  console.info("disposeEvolu");
1249
1272
  });
1250
1273
 
1274
+ // oxlint-disable-next-line react/rules-of-hooks -- useOwner manages sync ownership and is not a React Hook.
1251
1275
  if (isNonEmptyArray(transports)) useOwner(appOwner);
1252
1276
 
1253
1277
  run.signal.throwIfAborted();