tinybase 4.0.0-beta.4 → 4.0.0-beta.5.1

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 (269) hide show
  1. package/lib/cjs/persisters/persister-automerge.cjs +1 -0
  2. package/lib/cjs/persisters/persister-automerge.cjs.gz +0 -0
  3. package/lib/cjs/persisters/persister-browser.cjs +1 -0
  4. package/lib/cjs/persisters/persister-browser.cjs.gz +0 -0
  5. package/lib/cjs/persisters/persister-cr-sqlite-wasm.cjs +1 -0
  6. package/lib/cjs/persisters/persister-cr-sqlite-wasm.cjs.gz +0 -0
  7. package/lib/cjs/persisters/persister-file.cjs +1 -0
  8. package/lib/cjs/persisters/persister-file.cjs.gz +0 -0
  9. package/lib/cjs/persisters/persister-remote.cjs +1 -0
  10. package/lib/cjs/persisters/persister-remote.cjs.gz +0 -0
  11. package/lib/cjs/persisters/persister-sqlite-wasm.cjs +1 -0
  12. package/lib/cjs/persisters/persister-sqlite-wasm.cjs.gz +0 -0
  13. package/lib/cjs/persisters/persister-sqlite3.cjs +1 -0
  14. package/lib/cjs/persisters/persister-sqlite3.cjs.gz +0 -0
  15. package/lib/cjs/persisters/persister-yjs.cjs +1 -0
  16. package/lib/cjs/persisters/persister-yjs.cjs.gz +0 -0
  17. package/lib/cjs/persisters.cjs +1 -1
  18. package/lib/cjs/persisters.cjs.gz +0 -0
  19. package/lib/cjs/store.cjs +1 -1
  20. package/lib/cjs/store.cjs.gz +0 -0
  21. package/lib/cjs/tinybase.cjs +1 -1
  22. package/lib/cjs/tinybase.cjs.gz +0 -0
  23. package/lib/cjs/tools.cjs +1 -1
  24. package/lib/cjs/tools.cjs.gz +0 -0
  25. package/lib/cjs/ui-react.cjs +1 -1
  26. package/lib/cjs/ui-react.cjs.gz +0 -0
  27. package/lib/cjs-es6/persisters/persister-automerge.cjs +1 -0
  28. package/lib/cjs-es6/persisters/persister-automerge.cjs.gz +0 -0
  29. package/lib/cjs-es6/persisters/persister-browser.cjs +1 -0
  30. package/lib/cjs-es6/persisters/persister-browser.cjs.gz +0 -0
  31. package/lib/cjs-es6/persisters/persister-cr-sqlite-wasm.cjs +1 -0
  32. package/lib/cjs-es6/persisters/persister-cr-sqlite-wasm.cjs.gz +0 -0
  33. package/lib/cjs-es6/persisters/persister-file.cjs +1 -0
  34. package/lib/cjs-es6/persisters/persister-file.cjs.gz +0 -0
  35. package/lib/cjs-es6/persisters/persister-remote.cjs +1 -0
  36. package/lib/cjs-es6/persisters/persister-remote.cjs.gz +0 -0
  37. package/lib/cjs-es6/persisters/persister-sqlite-wasm.cjs +1 -0
  38. package/lib/cjs-es6/persisters/persister-sqlite-wasm.cjs.gz +0 -0
  39. package/lib/cjs-es6/persisters/persister-sqlite3.cjs +1 -0
  40. package/lib/cjs-es6/persisters/persister-sqlite3.cjs.gz +0 -0
  41. package/lib/cjs-es6/persisters/persister-yjs.cjs +1 -0
  42. package/lib/cjs-es6/persisters/persister-yjs.cjs.gz +0 -0
  43. package/lib/cjs-es6/persisters.cjs +1 -1
  44. package/lib/cjs-es6/persisters.cjs.gz +0 -0
  45. package/lib/cjs-es6/store.cjs +1 -1
  46. package/lib/cjs-es6/store.cjs.gz +0 -0
  47. package/lib/cjs-es6/tinybase.cjs +1 -1
  48. package/lib/cjs-es6/tinybase.cjs.gz +0 -0
  49. package/lib/cjs-es6/tools.cjs +1 -1
  50. package/lib/cjs-es6/tools.cjs.gz +0 -0
  51. package/lib/cjs-es6/ui-react.cjs +1 -1
  52. package/lib/cjs-es6/ui-react.cjs.gz +0 -0
  53. package/lib/debug/{persister-automerge.js → persisters/persister-automerge.js} +58 -31
  54. package/lib/debug/{persister-browser.js → persisters/persister-browser.js} +49 -20
  55. package/lib/debug/persisters/persister-cr-sqlite-wasm.js +665 -0
  56. package/lib/debug/{persister-file.js → persisters/persister-file.js} +51 -25
  57. package/lib/debug/{persister-remote.js → persisters/persister-remote.js} +48 -19
  58. package/lib/debug/persisters/persister-sqlite-wasm.js +673 -0
  59. package/lib/debug/persisters/persister-sqlite3.js +676 -0
  60. package/lib/debug/{persister-yjs.js → persisters/persister-yjs.js} +49 -20
  61. package/lib/debug/persisters.js +47 -18
  62. package/lib/debug/store.js +79 -29
  63. package/lib/debug/tinybase.js +123 -46
  64. package/lib/debug/tools.js +121 -27
  65. package/lib/debug/ui-react.js +24 -0
  66. package/lib/es6/persisters/persister-automerge.js +1 -0
  67. package/lib/es6/persisters/persister-automerge.js.gz +0 -0
  68. package/lib/es6/persisters/persister-browser.js +1 -0
  69. package/lib/es6/persisters/persister-browser.js.gz +0 -0
  70. package/lib/es6/persisters/persister-cr-sqlite-wasm.js +1 -0
  71. package/lib/es6/persisters/persister-cr-sqlite-wasm.js.gz +0 -0
  72. package/lib/es6/persisters/persister-file.js +1 -0
  73. package/lib/es6/persisters/persister-file.js.gz +0 -0
  74. package/lib/es6/persisters/persister-remote.js +1 -0
  75. package/lib/es6/persisters/persister-remote.js.gz +0 -0
  76. package/lib/es6/persisters/persister-sqlite-wasm.js +1 -0
  77. package/lib/es6/persisters/persister-sqlite-wasm.js.gz +0 -0
  78. package/lib/es6/persisters/persister-sqlite3.js +1 -0
  79. package/lib/es6/persisters/persister-sqlite3.js.gz +0 -0
  80. package/lib/es6/persisters/persister-yjs.js +1 -0
  81. package/lib/es6/persisters/persister-yjs.js.gz +0 -0
  82. package/lib/es6/persisters.js +1 -1
  83. package/lib/es6/persisters.js.gz +0 -0
  84. package/lib/es6/store.js +1 -1
  85. package/lib/es6/store.js.gz +0 -0
  86. package/lib/es6/tinybase.js +1 -1
  87. package/lib/es6/tinybase.js.gz +0 -0
  88. package/lib/es6/tools.js +1 -1
  89. package/lib/es6/tools.js.gz +0 -0
  90. package/lib/es6/ui-react.js +1 -1
  91. package/lib/es6/ui-react.js.gz +0 -0
  92. package/lib/persisters/persister-automerge.js +1 -0
  93. package/lib/persisters/persister-automerge.js.gz +0 -0
  94. package/lib/persisters/persister-browser.js +1 -0
  95. package/lib/persisters/persister-browser.js.gz +0 -0
  96. package/lib/persisters/persister-cr-sqlite-wasm.js +1 -0
  97. package/lib/persisters/persister-cr-sqlite-wasm.js.gz +0 -0
  98. package/lib/persisters/persister-file.js +1 -0
  99. package/lib/persisters/persister-file.js.gz +0 -0
  100. package/lib/persisters/persister-remote.js +1 -0
  101. package/lib/persisters/persister-remote.js.gz +0 -0
  102. package/lib/persisters/persister-sqlite-wasm.js +1 -0
  103. package/lib/persisters/persister-sqlite-wasm.js.gz +0 -0
  104. package/lib/persisters/persister-sqlite3.js +1 -0
  105. package/lib/persisters/persister-sqlite3.js.gz +0 -0
  106. package/lib/persisters/persister-yjs.js +1 -0
  107. package/lib/persisters/persister-yjs.js.gz +0 -0
  108. package/lib/persisters.js +1 -1
  109. package/lib/persisters.js.gz +0 -0
  110. package/lib/store.js +1 -1
  111. package/lib/store.js.gz +0 -0
  112. package/lib/tinybase.js +1 -1
  113. package/lib/tinybase.js.gz +0 -0
  114. package/lib/tools.js +1 -1
  115. package/lib/tools.js.gz +0 -0
  116. package/lib/types/checkpoints.d.ts +0 -27
  117. package/lib/types/common.d.ts +0 -9
  118. package/lib/types/indexes.d.ts +0 -26
  119. package/lib/types/metrics.d.ts +0 -23
  120. package/lib/types/{persister-automerge.d.ts → persisters/persister-automerge.d.ts} +4 -6
  121. package/lib/types/{persister-browser.d.ts → persisters/persister-browser.d.ts} +2 -5
  122. package/lib/types/persisters/persister-cr-sqlite-wasm.d.ts +95 -0
  123. package/lib/types/{persister-file.d.ts → persisters/persister-file.d.ts} +3 -5
  124. package/lib/types/{persister-remote.d.ts → persisters/persister-remote.d.ts} +2 -4
  125. package/lib/types/persisters/persister-sqlite-wasm.d.ts +102 -0
  126. package/lib/types/persisters/persister-sqlite3.d.ts +109 -0
  127. package/lib/types/{persister-yjs.d.ts → persisters/persister-yjs.d.ts} +4 -6
  128. package/lib/types/persisters.d.ts +517 -27
  129. package/lib/types/queries.d.ts +52 -127
  130. package/lib/types/relationships.d.ts +0 -26
  131. package/lib/types/store.d.ts +347 -196
  132. package/lib/types/tinybase.d.ts +0 -1
  133. package/lib/types/tools.d.ts +15 -28
  134. package/lib/types/ui-react.d.ts +196 -181
  135. package/lib/types/with-schemas/checkpoints.d.ts +5 -32
  136. package/lib/types/with-schemas/common.d.ts +0 -9
  137. package/lib/types/with-schemas/indexes.d.ts +9 -35
  138. package/lib/types/with-schemas/metrics.d.ts +9 -32
  139. package/lib/types/with-schemas/{persister-automerge.d.ts → persisters/persister-automerge.d.ts} +4 -6
  140. package/lib/types/with-schemas/{persister-browser.d.ts → persisters/persister-browser.d.ts} +2 -5
  141. package/lib/types/with-schemas/persisters/persister-cr-sqlite-wasm.d.ts +105 -0
  142. package/lib/types/with-schemas/{persister-file.d.ts → persisters/persister-file.d.ts} +3 -5
  143. package/lib/types/with-schemas/{persister-remote.d.ts → persisters/persister-remote.d.ts} +2 -4
  144. package/lib/types/with-schemas/persisters/persister-sqlite-wasm.d.ts +113 -0
  145. package/lib/types/with-schemas/persisters/persister-sqlite3.d.ts +119 -0
  146. package/lib/types/with-schemas/{persister-yjs.d.ts → persisters/persister-yjs.d.ts} +4 -6
  147. package/lib/types/with-schemas/persisters.d.ts +534 -29
  148. package/lib/types/with-schemas/queries.d.ts +61 -224
  149. package/lib/types/with-schemas/relationships.d.ts +9 -35
  150. package/lib/types/with-schemas/store.d.ts +488 -239
  151. package/lib/types/with-schemas/tinybase.d.ts +0 -1
  152. package/lib/types/with-schemas/tools.d.ts +19 -32
  153. package/lib/types/with-schemas/ui-react.d.ts +221 -186
  154. package/lib/ui-react.js +1 -1
  155. package/lib/ui-react.js.gz +0 -0
  156. package/lib/umd/persisters/persister-automerge.js +1 -0
  157. package/lib/umd/persisters/persister-automerge.js.gz +0 -0
  158. package/lib/umd/persisters/persister-browser.js +1 -0
  159. package/lib/umd/persisters/persister-browser.js.gz +0 -0
  160. package/lib/umd/persisters/persister-cr-sqlite-wasm.js +1 -0
  161. package/lib/umd/persisters/persister-cr-sqlite-wasm.js.gz +0 -0
  162. package/lib/umd/persisters/persister-file.js +1 -0
  163. package/lib/umd/persisters/persister-file.js.gz +0 -0
  164. package/lib/umd/persisters/persister-remote.js +1 -0
  165. package/lib/umd/persisters/persister-remote.js.gz +0 -0
  166. package/lib/umd/persisters/persister-sqlite-wasm.js +1 -0
  167. package/lib/umd/persisters/persister-sqlite-wasm.js.gz +0 -0
  168. package/lib/umd/persisters/persister-sqlite3.js +1 -0
  169. package/lib/umd/persisters/persister-sqlite3.js.gz +0 -0
  170. package/lib/umd/persisters/persister-yjs.js +1 -0
  171. package/lib/umd/persisters/persister-yjs.js.gz +0 -0
  172. package/lib/umd/persisters.js +1 -1
  173. package/lib/umd/persisters.js.gz +0 -0
  174. package/lib/umd/store.js +1 -1
  175. package/lib/umd/store.js.gz +0 -0
  176. package/lib/umd/tinybase.js +1 -1
  177. package/lib/umd/tinybase.js.gz +0 -0
  178. package/lib/umd/tools.js +1 -1
  179. package/lib/umd/tools.js.gz +0 -0
  180. package/lib/umd/ui-react.js +1 -1
  181. package/lib/umd/ui-react.js.gz +0 -0
  182. package/lib/umd-es6/persisters/persister-automerge.js +1 -0
  183. package/lib/umd-es6/persisters/persister-automerge.js.gz +0 -0
  184. package/lib/umd-es6/persisters/persister-browser.js +1 -0
  185. package/lib/umd-es6/persisters/persister-browser.js.gz +0 -0
  186. package/lib/umd-es6/persisters/persister-cr-sqlite-wasm.js +1 -0
  187. package/lib/umd-es6/persisters/persister-cr-sqlite-wasm.js.gz +0 -0
  188. package/lib/umd-es6/persisters/persister-file.js +1 -0
  189. package/lib/umd-es6/persisters/persister-file.js.gz +0 -0
  190. package/lib/umd-es6/persisters/persister-remote.js +1 -0
  191. package/lib/umd-es6/persisters/persister-remote.js.gz +0 -0
  192. package/lib/umd-es6/persisters/persister-sqlite-wasm.js +1 -0
  193. package/lib/umd-es6/persisters/persister-sqlite-wasm.js.gz +0 -0
  194. package/lib/umd-es6/persisters/persister-sqlite3.js +1 -0
  195. package/lib/umd-es6/persisters/persister-sqlite3.js.gz +0 -0
  196. package/lib/umd-es6/persisters/persister-yjs.js +1 -0
  197. package/lib/umd-es6/persisters/persister-yjs.js.gz +0 -0
  198. package/lib/umd-es6/persisters.js +1 -1
  199. package/lib/umd-es6/persisters.js.gz +0 -0
  200. package/lib/umd-es6/store.js +1 -1
  201. package/lib/umd-es6/store.js.gz +0 -0
  202. package/lib/umd-es6/tinybase.js +1 -1
  203. package/lib/umd-es6/tinybase.js.gz +0 -0
  204. package/lib/umd-es6/tools.js +1 -1
  205. package/lib/umd-es6/tools.js.gz +0 -0
  206. package/lib/umd-es6/ui-react.js +1 -1
  207. package/lib/umd-es6/ui-react.js.gz +0 -0
  208. package/package.json +39 -22
  209. package/readme.md +3 -3
  210. package/lib/cjs/persister-automerge.cjs +0 -1
  211. package/lib/cjs/persister-automerge.cjs.gz +0 -0
  212. package/lib/cjs/persister-browser.cjs +0 -1
  213. package/lib/cjs/persister-browser.cjs.gz +0 -0
  214. package/lib/cjs/persister-file.cjs +0 -1
  215. package/lib/cjs/persister-file.cjs.gz +0 -0
  216. package/lib/cjs/persister-remote.cjs +0 -1
  217. package/lib/cjs/persister-remote.cjs.gz +0 -0
  218. package/lib/cjs/persister-yjs.cjs +0 -1
  219. package/lib/cjs/persister-yjs.cjs.gz +0 -0
  220. package/lib/cjs-es6/persister-automerge.cjs +0 -1
  221. package/lib/cjs-es6/persister-automerge.cjs.gz +0 -0
  222. package/lib/cjs-es6/persister-browser.cjs +0 -1
  223. package/lib/cjs-es6/persister-browser.cjs.gz +0 -0
  224. package/lib/cjs-es6/persister-file.cjs +0 -1
  225. package/lib/cjs-es6/persister-file.cjs.gz +0 -0
  226. package/lib/cjs-es6/persister-remote.cjs +0 -1
  227. package/lib/cjs-es6/persister-remote.cjs.gz +0 -0
  228. package/lib/cjs-es6/persister-yjs.cjs +0 -1
  229. package/lib/cjs-es6/persister-yjs.cjs.gz +0 -0
  230. package/lib/es6/persister-automerge.js +0 -1
  231. package/lib/es6/persister-automerge.js.gz +0 -0
  232. package/lib/es6/persister-browser.js +0 -1
  233. package/lib/es6/persister-browser.js.gz +0 -0
  234. package/lib/es6/persister-file.js +0 -1
  235. package/lib/es6/persister-file.js.gz +0 -0
  236. package/lib/es6/persister-remote.js +0 -1
  237. package/lib/es6/persister-remote.js.gz +0 -0
  238. package/lib/es6/persister-yjs.js +0 -1
  239. package/lib/es6/persister-yjs.js.gz +0 -0
  240. package/lib/persister-automerge.js +0 -1
  241. package/lib/persister-automerge.js.gz +0 -0
  242. package/lib/persister-browser.js +0 -1
  243. package/lib/persister-browser.js.gz +0 -0
  244. package/lib/persister-file.js +0 -1
  245. package/lib/persister-file.js.gz +0 -0
  246. package/lib/persister-remote.js +0 -1
  247. package/lib/persister-remote.js.gz +0 -0
  248. package/lib/persister-yjs.js +0 -1
  249. package/lib/persister-yjs.js.gz +0 -0
  250. package/lib/umd/persister-automerge.js +0 -1
  251. package/lib/umd/persister-automerge.js.gz +0 -0
  252. package/lib/umd/persister-browser.js +0 -1
  253. package/lib/umd/persister-browser.js.gz +0 -0
  254. package/lib/umd/persister-file.js +0 -1
  255. package/lib/umd/persister-file.js.gz +0 -0
  256. package/lib/umd/persister-remote.js +0 -1
  257. package/lib/umd/persister-remote.js.gz +0 -0
  258. package/lib/umd/persister-yjs.js +0 -1
  259. package/lib/umd/persister-yjs.js.gz +0 -0
  260. package/lib/umd-es6/persister-automerge.js +0 -1
  261. package/lib/umd-es6/persister-automerge.js.gz +0 -0
  262. package/lib/umd-es6/persister-browser.js +0 -1
  263. package/lib/umd-es6/persister-browser.js.gz +0 -0
  264. package/lib/umd-es6/persister-file.js +0 -1
  265. package/lib/umd-es6/persister-file.js.gz +0 -0
  266. package/lib/umd-es6/persister-remote.js +0 -1
  267. package/lib/umd-es6/persister-remote.js.gz +0 -0
  268. package/lib/umd-es6/persister-yjs.js +0 -1
  269. package/lib/umd-es6/persister-yjs.js.gz +0 -0
@@ -6,7 +6,6 @@
6
6
  * which returns a new Relationships object. From there, you can create new
7
7
  * Relationship definitions, access the associations within those Relationships
8
8
  * directly, and register listeners for when they change.
9
- *
10
9
  * @packageDocumentation
11
10
  * @module relationships
12
11
  */
@@ -37,7 +36,6 @@ import {Id, IdOrNull, Ids} from './common.d';
37
36
  * Note that the Relationship type is not actually used in the API, and you
38
37
  * instead enumerate and access its structure with the getRemoteRowId method,
39
38
  * the getLocalRowIds method, and the getLinkedRowIds method.
40
- *
41
39
  * @category Concept
42
40
  */
43
41
  export type Relationship = {
@@ -62,7 +60,6 @@ export type Relationship = {
62
60
  * A RelationshipCallback is provided when using the forEachRelationship method,
63
61
  * so that you can do something based on every Relationship in the Relationships
64
62
  * object. See that method for specific examples.
65
- *
66
63
  * @param relationshipId The Id of the Relationship that the callback can
67
64
  * operate on.
68
65
  * @param forEachRow A function that will let you iterate over the local Row
@@ -94,7 +91,6 @@ export type RelationshipCallback<Schema extends OptionalTablesSchema> = (
94
91
  * When called, a RemoteRowIdListener is given a reference to the Relationships
95
92
  * object, the Id of the Relationship that changed, and the Id of the local Row
96
93
  * whose remote Row Id changed.
97
- *
98
94
  * @param relationships A reference to the Relationships object that changed.
99
95
  * @param relationshipId The Id of the Relationship that changed.
100
96
  * @param localRowId The Id of the local Row whose remote Row Id changed.
@@ -126,7 +122,6 @@ export type RemoteRowIdListener<Schemas extends OptionalSchemas> = (
126
122
  * When called, a LocalRowIdsListener is given a reference to the Relationships
127
123
  * object, the Id of the Relationship that changed, and the Id of the remote Row
128
124
  * whose local Row Ids changed.
129
- *
130
125
  * @param relationships A reference to the Relationships object that changed.
131
126
  * @param relationshipId The Id of the Relationship that changed.
132
127
  * @param remoteRowId The Id of the remote Row whose local Row Ids changed.
@@ -158,7 +153,6 @@ export type LocalRowIdsListener<Schemas extends OptionalSchemas> = (
158
153
  * When called, a LinkedRowIdsListener is given a reference to the Relationships
159
154
  * object, the Id of the Relationship that changed, and the Id of the first Row
160
155
  * of the the linked list whose members changed.
161
- *
162
156
  * @param relationships A reference to the Relationships object that changed.
163
157
  * @param relationshipId The Id of the Relationship that changed.
164
158
  * @param firstRowId The Id of the first Row of the the linked list whose
@@ -178,7 +172,6 @@ export type LinkedRowIdsListener<Schemas extends OptionalSchemas> = (
178
172
  *
179
173
  * A RelationshipsListenerStats object is returned from the getListenerStats
180
174
  * method, and is only populated in a debug build.
181
- *
182
175
  * @category Development
183
176
  */
184
177
  export type RelationshipsListenerStats = {
@@ -218,7 +211,6 @@ export type RelationshipsListenerStats = {
218
211
  * This module defaults to creating relationships between Row objects by using
219
212
  * one of their Cell values. However, far more complex relationships can be
220
213
  * configured with a custom function.
221
- *
222
214
  * @example
223
215
  * This example shows a very simple lifecycle of a Relationships object: from
224
216
  * creation, to adding definitions (both local/remote table and linked list),
@@ -327,7 +319,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
327
319
  * Cell values contains the (remote) Row Id, using the `getRemoteRowId`
328
320
  * parameter. Alternatively, a custom function can be provided that produces
329
321
  * your own remote Row Id from the local Row as a whole.
330
- *
331
322
  * @param relationshipId The Id of the Relationship to define.
332
323
  * @param localTableId The Id of the local Table for the Relationship.
333
324
  * @param remoteTableId The Id of the remote Table for the Relationship (or
@@ -403,6 +394,11 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
403
394
  /**
404
395
  * The delRelationshipDefinition method removes an existing Relationship
405
396
  * definition.
397
+ * @param relationshipId The Id of the Relationship to remove.
398
+ * @returns A reference to the Relationships object.
399
+ * @example
400
+ * This example creates a Store, creates a Relationships object, defines a
401
+ * simple Relationship, and then removes it.
406
402
  *
407
403
  * This has schema-based typing. The following is a simplified representation:
408
404
  *
@@ -410,12 +406,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
410
406
  * delRelationshipDefinition(relationshipId: Id): Relationships;
411
407
  * ```
412
408
  *
413
- * @param relationshipId The Id of the Relationship to remove.
414
- * @returns A reference to the Relationships object.
415
- * @example
416
- * This example creates a Store, creates a Relationships object, defines a
417
- * simple Relationship, and then removes it.
418
- *
419
409
  * ```js
420
410
  * const store = createStore()
421
411
  * .setTable('pets', {
@@ -449,6 +439,10 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
449
439
  /**
450
440
  * The getStore method returns a reference to the underlying Store that is
451
441
  * backing this Relationships object.
442
+ * @returns A reference to the Store.
443
+ * @example
444
+ * This example creates a Relationships object against a newly-created Store
445
+ * and then gets its reference in order to update its data.
452
446
  *
453
447
  * This has schema-based typing. The following is a simplified representation:
454
448
  *
@@ -456,11 +450,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
456
450
  * getStore(): Store;
457
451
  * ```
458
452
  *
459
- * @returns A reference to the Store.
460
- * @example
461
- * This example creates a Relationships object against a newly-created Store
462
- * and then gets its reference in order to update its data.
463
- *
464
453
  * ```js
465
454
  * const relationships = createRelationships(createStore());
466
455
  * relationships.setRelationshipDefinition(
@@ -480,7 +469,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
480
469
  /**
481
470
  * The getRelationshipIds method returns an array of the Relationship Ids
482
471
  * registered with this Relationships object.
483
- *
484
472
  * @returns An array of Ids.
485
473
  * @example
486
474
  * This example creates a Relationships object with two definitions, and then
@@ -512,7 +500,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
512
500
  * RelationshipCallback function that will be called with the Id of each
513
501
  * Relationship, and with a function that can then be used to iterate over
514
502
  * each local Row involved in the Relationship.
515
- *
516
503
  * @param relationshipCallback The function that should be called for every
517
504
  * Relationship.
518
505
  * @example
@@ -551,7 +538,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
551
538
  /**
552
539
  * The hasRelationship method returns a boolean indicating whether a given
553
540
  * Relationship exists in the Relationships object.
554
- *
555
541
  * @param relationshipId The Id of a possible Relationship in the
556
542
  * Relationships object.
557
543
  * @returns Whether a Relationship with that Id exists.
@@ -582,7 +568,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
582
568
  * ```
583
569
  *
584
570
  * If the Relationship Id is invalid, the method returns `undefined`.
585
- *
586
571
  * @param relationshipId The Id of a Relationship.
587
572
  * @returns The Id of the local Table backing the Relationship, or
588
573
  * `undefined`.
@@ -622,7 +607,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
622
607
  * ```
623
608
  *
624
609
  * If the Relationship Id is invalid, the method returns `undefined`.
625
- *
626
610
  * @param relationshipId The Id of a Relationship.
627
611
  * @returns The Id of the remote Table backing the Relationship, or
628
612
  * `undefined`.
@@ -657,7 +641,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
657
641
  *
658
642
  * If the identified Relationship or Row does not exist (or if the definition
659
643
  * references a Table that does not exist) then `undefined` is returned.
660
- *
661
644
  * @param relationshipId The Id of the Relationship.
662
645
  * @param localRowId The Id of the local Row in the Relationship.
663
646
  * @returns The remote Row Id in the Relationship, or `undefined`.
@@ -704,7 +687,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
704
687
  *
705
688
  * If the identified Relationship or Row does not exist (or if the definition
706
689
  * references a Table that does not exist) then an empty array is returned.
707
- *
708
690
  * @param relationshipId The Id of the Relationship.
709
691
  * @param remoteRowId The Id of the remote Row in the Relationship.
710
692
  * @returns The local Row Ids in the Relationship, or an empty array.
@@ -756,7 +738,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
756
738
  * If the identified Relationship or Row does not exist (or if the definition
757
739
  * references a Table that does not exist) then an array containing just the
758
740
  * first Row Id is returned.
759
- *
760
741
  * @param relationshipId The Id of the Relationship.
761
742
  * @param firstRowId The Id of the first Row in the linked list Relationship.
762
743
  * @returns The linked Row Ids in the Relationship.
@@ -822,7 +803,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
822
803
  * The provided listener is a RemoteRowIdListener function, and will be called
823
804
  * with a reference to the Relationships object, the Id of the Relationship,
824
805
  * and the Id of the local Row that had its remote Row change.
825
- *
826
806
  * @param relationshipId The Id of the Relationship to listen to, or `null` as
827
807
  * a wildcard.
828
808
  * @param localRowId The Id of the local Row to listen to, or `null` as a
@@ -963,7 +943,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
963
943
  * The provided listener is a LocalRowIdsListener function, and will be called
964
944
  * with a reference to the Relationships object, the Id of the Relationship,
965
945
  * and the Id of the remote Row that had its local Row objects change.
966
- *
967
946
  * @param relationshipId The Id of the Relationship to listen to, or `null` as
968
947
  * a wildcard.
969
948
  * @param remoteRowId The Id of the remote Row to listen to, or `null` as a
@@ -1102,7 +1081,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
1102
1081
  * The provided listener is a LinkedRowIdsListener function, and will be
1103
1082
  * called with a reference to the Relationships object, the Id of the
1104
1083
  * Relationship, and the Id of the first Row that had its linked list change.
1105
- *
1106
1084
  * @param relationshipId The Id of the Relationship to listen to.
1107
1085
  * @param firstRowId The Id of the first Row of the linked list to listen to.
1108
1086
  * @param listener The function that will be called whenever the linked Row
@@ -1165,7 +1143,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
1165
1143
  * Use the Id returned by whichever method was used to add the listener. Note
1166
1144
  * that the Relationships object may re-use this Id for future listeners added
1167
1145
  * to it.
1168
- *
1169
1146
  * @param listenerId The Id of the listener to remove.
1170
1147
  * @returns A reference to the Relationships object.
1171
1148
  * @example
@@ -1220,7 +1197,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
1220
1197
  *
1221
1198
  * This guarantees that all of the listeners that the object registered with
1222
1199
  * the underlying Store are removed and it can be correctly garbage collected.
1223
- *
1224
1200
  * @example
1225
1201
  * This example creates a Store, adds a Relationships object with a
1226
1202
  * definition (that registers a RowListener with the underlying Store),
@@ -1270,7 +1246,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
1270
1246
  * return an empty object. The method is intended to be used during
1271
1247
  * development to ensure your application is not leaking listener
1272
1248
  * registrations, for example.
1273
- *
1274
1249
  * @returns A RelationshipsListenerStats object containing Relationships
1275
1250
  * listener statistics.
1276
1251
  * @example
@@ -1310,7 +1285,6 @@ export interface Relationships<in out Schemas extends OptionalSchemas> {
1310
1285
  * A given Store can only have one Relationships object associated with it. If
1311
1286
  * you call this function twice on the same Store, your second call will return
1312
1287
  * a reference to the Relationships object created by the first.
1313
- *
1314
1288
  * @param store The Store for which to register Relationships.
1315
1289
  * @returns A reference to the new Relationships object.
1316
1290
  * @example