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.
- package/lib/cjs/persisters/persister-automerge.cjs +1 -0
- package/lib/cjs/persisters/persister-automerge.cjs.gz +0 -0
- package/lib/cjs/persisters/persister-browser.cjs +1 -0
- package/lib/cjs/persisters/persister-browser.cjs.gz +0 -0
- package/lib/cjs/persisters/persister-cr-sqlite-wasm.cjs +1 -0
- package/lib/cjs/persisters/persister-cr-sqlite-wasm.cjs.gz +0 -0
- package/lib/cjs/persisters/persister-file.cjs +1 -0
- package/lib/cjs/persisters/persister-file.cjs.gz +0 -0
- package/lib/cjs/persisters/persister-remote.cjs +1 -0
- package/lib/cjs/persisters/persister-remote.cjs.gz +0 -0
- package/lib/cjs/persisters/persister-sqlite-wasm.cjs +1 -0
- package/lib/cjs/persisters/persister-sqlite-wasm.cjs.gz +0 -0
- package/lib/cjs/persisters/persister-sqlite3.cjs +1 -0
- package/lib/cjs/persisters/persister-sqlite3.cjs.gz +0 -0
- package/lib/cjs/persisters/persister-yjs.cjs +1 -0
- package/lib/cjs/persisters/persister-yjs.cjs.gz +0 -0
- package/lib/cjs/persisters.cjs +1 -1
- package/lib/cjs/persisters.cjs.gz +0 -0
- package/lib/cjs/store.cjs +1 -1
- package/lib/cjs/store.cjs.gz +0 -0
- package/lib/cjs/tinybase.cjs +1 -1
- package/lib/cjs/tinybase.cjs.gz +0 -0
- package/lib/cjs/tools.cjs +1 -1
- package/lib/cjs/tools.cjs.gz +0 -0
- package/lib/cjs/ui-react.cjs +1 -1
- package/lib/cjs/ui-react.cjs.gz +0 -0
- package/lib/cjs-es6/persisters/persister-automerge.cjs +1 -0
- package/lib/cjs-es6/persisters/persister-automerge.cjs.gz +0 -0
- package/lib/cjs-es6/persisters/persister-browser.cjs +1 -0
- package/lib/cjs-es6/persisters/persister-browser.cjs.gz +0 -0
- package/lib/cjs-es6/persisters/persister-cr-sqlite-wasm.cjs +1 -0
- package/lib/cjs-es6/persisters/persister-cr-sqlite-wasm.cjs.gz +0 -0
- package/lib/cjs-es6/persisters/persister-file.cjs +1 -0
- package/lib/cjs-es6/persisters/persister-file.cjs.gz +0 -0
- package/lib/cjs-es6/persisters/persister-remote.cjs +1 -0
- package/lib/cjs-es6/persisters/persister-remote.cjs.gz +0 -0
- package/lib/cjs-es6/persisters/persister-sqlite-wasm.cjs +1 -0
- package/lib/cjs-es6/persisters/persister-sqlite-wasm.cjs.gz +0 -0
- package/lib/cjs-es6/persisters/persister-sqlite3.cjs +1 -0
- package/lib/cjs-es6/persisters/persister-sqlite3.cjs.gz +0 -0
- package/lib/cjs-es6/persisters/persister-yjs.cjs +1 -0
- package/lib/cjs-es6/persisters/persister-yjs.cjs.gz +0 -0
- package/lib/cjs-es6/persisters.cjs +1 -1
- package/lib/cjs-es6/persisters.cjs.gz +0 -0
- package/lib/cjs-es6/store.cjs +1 -1
- package/lib/cjs-es6/store.cjs.gz +0 -0
- package/lib/cjs-es6/tinybase.cjs +1 -1
- package/lib/cjs-es6/tinybase.cjs.gz +0 -0
- package/lib/cjs-es6/tools.cjs +1 -1
- package/lib/cjs-es6/tools.cjs.gz +0 -0
- package/lib/cjs-es6/ui-react.cjs +1 -1
- package/lib/cjs-es6/ui-react.cjs.gz +0 -0
- package/lib/debug/{persister-automerge.js → persisters/persister-automerge.js} +58 -31
- package/lib/debug/{persister-browser.js → persisters/persister-browser.js} +49 -20
- package/lib/debug/persisters/persister-cr-sqlite-wasm.js +665 -0
- package/lib/debug/{persister-file.js → persisters/persister-file.js} +51 -25
- package/lib/debug/{persister-remote.js → persisters/persister-remote.js} +48 -19
- package/lib/debug/persisters/persister-sqlite-wasm.js +673 -0
- package/lib/debug/persisters/persister-sqlite3.js +676 -0
- package/lib/debug/{persister-yjs.js → persisters/persister-yjs.js} +49 -20
- package/lib/debug/persisters.js +47 -18
- package/lib/debug/store.js +79 -29
- package/lib/debug/tinybase.js +123 -46
- package/lib/debug/tools.js +121 -27
- package/lib/debug/ui-react.js +24 -0
- package/lib/es6/persisters/persister-automerge.js +1 -0
- package/lib/es6/persisters/persister-automerge.js.gz +0 -0
- package/lib/es6/persisters/persister-browser.js +1 -0
- package/lib/es6/persisters/persister-browser.js.gz +0 -0
- package/lib/es6/persisters/persister-cr-sqlite-wasm.js +1 -0
- package/lib/es6/persisters/persister-cr-sqlite-wasm.js.gz +0 -0
- package/lib/es6/persisters/persister-file.js +1 -0
- package/lib/es6/persisters/persister-file.js.gz +0 -0
- package/lib/es6/persisters/persister-remote.js +1 -0
- package/lib/es6/persisters/persister-remote.js.gz +0 -0
- package/lib/es6/persisters/persister-sqlite-wasm.js +1 -0
- package/lib/es6/persisters/persister-sqlite-wasm.js.gz +0 -0
- package/lib/es6/persisters/persister-sqlite3.js +1 -0
- package/lib/es6/persisters/persister-sqlite3.js.gz +0 -0
- package/lib/es6/persisters/persister-yjs.js +1 -0
- package/lib/es6/persisters/persister-yjs.js.gz +0 -0
- package/lib/es6/persisters.js +1 -1
- package/lib/es6/persisters.js.gz +0 -0
- package/lib/es6/store.js +1 -1
- package/lib/es6/store.js.gz +0 -0
- package/lib/es6/tinybase.js +1 -1
- package/lib/es6/tinybase.js.gz +0 -0
- package/lib/es6/tools.js +1 -1
- package/lib/es6/tools.js.gz +0 -0
- package/lib/es6/ui-react.js +1 -1
- package/lib/es6/ui-react.js.gz +0 -0
- package/lib/persisters/persister-automerge.js +1 -0
- package/lib/persisters/persister-automerge.js.gz +0 -0
- package/lib/persisters/persister-browser.js +1 -0
- package/lib/persisters/persister-browser.js.gz +0 -0
- package/lib/persisters/persister-cr-sqlite-wasm.js +1 -0
- package/lib/persisters/persister-cr-sqlite-wasm.js.gz +0 -0
- package/lib/persisters/persister-file.js +1 -0
- package/lib/persisters/persister-file.js.gz +0 -0
- package/lib/persisters/persister-remote.js +1 -0
- package/lib/persisters/persister-remote.js.gz +0 -0
- package/lib/persisters/persister-sqlite-wasm.js +1 -0
- package/lib/persisters/persister-sqlite-wasm.js.gz +0 -0
- package/lib/persisters/persister-sqlite3.js +1 -0
- package/lib/persisters/persister-sqlite3.js.gz +0 -0
- package/lib/persisters/persister-yjs.js +1 -0
- package/lib/persisters/persister-yjs.js.gz +0 -0
- package/lib/persisters.js +1 -1
- package/lib/persisters.js.gz +0 -0
- package/lib/store.js +1 -1
- package/lib/store.js.gz +0 -0
- package/lib/tinybase.js +1 -1
- package/lib/tinybase.js.gz +0 -0
- package/lib/tools.js +1 -1
- package/lib/tools.js.gz +0 -0
- package/lib/types/checkpoints.d.ts +0 -27
- package/lib/types/common.d.ts +0 -9
- package/lib/types/indexes.d.ts +0 -26
- package/lib/types/metrics.d.ts +0 -23
- package/lib/types/{persister-automerge.d.ts → persisters/persister-automerge.d.ts} +4 -6
- package/lib/types/{persister-browser.d.ts → persisters/persister-browser.d.ts} +2 -5
- package/lib/types/persisters/persister-cr-sqlite-wasm.d.ts +95 -0
- package/lib/types/{persister-file.d.ts → persisters/persister-file.d.ts} +3 -5
- package/lib/types/{persister-remote.d.ts → persisters/persister-remote.d.ts} +2 -4
- package/lib/types/persisters/persister-sqlite-wasm.d.ts +102 -0
- package/lib/types/persisters/persister-sqlite3.d.ts +109 -0
- package/lib/types/{persister-yjs.d.ts → persisters/persister-yjs.d.ts} +4 -6
- package/lib/types/persisters.d.ts +517 -27
- package/lib/types/queries.d.ts +52 -127
- package/lib/types/relationships.d.ts +0 -26
- package/lib/types/store.d.ts +347 -196
- package/lib/types/tinybase.d.ts +0 -1
- package/lib/types/tools.d.ts +15 -28
- package/lib/types/ui-react.d.ts +196 -181
- package/lib/types/with-schemas/checkpoints.d.ts +5 -32
- package/lib/types/with-schemas/common.d.ts +0 -9
- package/lib/types/with-schemas/indexes.d.ts +9 -35
- package/lib/types/with-schemas/metrics.d.ts +9 -32
- package/lib/types/with-schemas/{persister-automerge.d.ts → persisters/persister-automerge.d.ts} +4 -6
- package/lib/types/with-schemas/{persister-browser.d.ts → persisters/persister-browser.d.ts} +2 -5
- package/lib/types/with-schemas/persisters/persister-cr-sqlite-wasm.d.ts +105 -0
- package/lib/types/with-schemas/{persister-file.d.ts → persisters/persister-file.d.ts} +3 -5
- package/lib/types/with-schemas/{persister-remote.d.ts → persisters/persister-remote.d.ts} +2 -4
- package/lib/types/with-schemas/persisters/persister-sqlite-wasm.d.ts +113 -0
- package/lib/types/with-schemas/persisters/persister-sqlite3.d.ts +119 -0
- package/lib/types/with-schemas/{persister-yjs.d.ts → persisters/persister-yjs.d.ts} +4 -6
- package/lib/types/with-schemas/persisters.d.ts +534 -29
- package/lib/types/with-schemas/queries.d.ts +61 -224
- package/lib/types/with-schemas/relationships.d.ts +9 -35
- package/lib/types/with-schemas/store.d.ts +488 -239
- package/lib/types/with-schemas/tinybase.d.ts +0 -1
- package/lib/types/with-schemas/tools.d.ts +19 -32
- package/lib/types/with-schemas/ui-react.d.ts +221 -186
- package/lib/ui-react.js +1 -1
- package/lib/ui-react.js.gz +0 -0
- package/lib/umd/persisters/persister-automerge.js +1 -0
- package/lib/umd/persisters/persister-automerge.js.gz +0 -0
- package/lib/umd/persisters/persister-browser.js +1 -0
- package/lib/umd/persisters/persister-browser.js.gz +0 -0
- package/lib/umd/persisters/persister-cr-sqlite-wasm.js +1 -0
- package/lib/umd/persisters/persister-cr-sqlite-wasm.js.gz +0 -0
- package/lib/umd/persisters/persister-file.js +1 -0
- package/lib/umd/persisters/persister-file.js.gz +0 -0
- package/lib/umd/persisters/persister-remote.js +1 -0
- package/lib/umd/persisters/persister-remote.js.gz +0 -0
- package/lib/umd/persisters/persister-sqlite-wasm.js +1 -0
- package/lib/umd/persisters/persister-sqlite-wasm.js.gz +0 -0
- package/lib/umd/persisters/persister-sqlite3.js +1 -0
- package/lib/umd/persisters/persister-sqlite3.js.gz +0 -0
- package/lib/umd/persisters/persister-yjs.js +1 -0
- package/lib/umd/persisters/persister-yjs.js.gz +0 -0
- package/lib/umd/persisters.js +1 -1
- package/lib/umd/persisters.js.gz +0 -0
- package/lib/umd/store.js +1 -1
- package/lib/umd/store.js.gz +0 -0
- package/lib/umd/tinybase.js +1 -1
- package/lib/umd/tinybase.js.gz +0 -0
- package/lib/umd/tools.js +1 -1
- package/lib/umd/tools.js.gz +0 -0
- package/lib/umd/ui-react.js +1 -1
- package/lib/umd/ui-react.js.gz +0 -0
- package/lib/umd-es6/persisters/persister-automerge.js +1 -0
- package/lib/umd-es6/persisters/persister-automerge.js.gz +0 -0
- package/lib/umd-es6/persisters/persister-browser.js +1 -0
- package/lib/umd-es6/persisters/persister-browser.js.gz +0 -0
- package/lib/umd-es6/persisters/persister-cr-sqlite-wasm.js +1 -0
- package/lib/umd-es6/persisters/persister-cr-sqlite-wasm.js.gz +0 -0
- package/lib/umd-es6/persisters/persister-file.js +1 -0
- package/lib/umd-es6/persisters/persister-file.js.gz +0 -0
- package/lib/umd-es6/persisters/persister-remote.js +1 -0
- package/lib/umd-es6/persisters/persister-remote.js.gz +0 -0
- package/lib/umd-es6/persisters/persister-sqlite-wasm.js +1 -0
- package/lib/umd-es6/persisters/persister-sqlite-wasm.js.gz +0 -0
- package/lib/umd-es6/persisters/persister-sqlite3.js +1 -0
- package/lib/umd-es6/persisters/persister-sqlite3.js.gz +0 -0
- package/lib/umd-es6/persisters/persister-yjs.js +1 -0
- package/lib/umd-es6/persisters/persister-yjs.js.gz +0 -0
- package/lib/umd-es6/persisters.js +1 -1
- package/lib/umd-es6/persisters.js.gz +0 -0
- package/lib/umd-es6/store.js +1 -1
- package/lib/umd-es6/store.js.gz +0 -0
- package/lib/umd-es6/tinybase.js +1 -1
- package/lib/umd-es6/tinybase.js.gz +0 -0
- package/lib/umd-es6/tools.js +1 -1
- package/lib/umd-es6/tools.js.gz +0 -0
- package/lib/umd-es6/ui-react.js +1 -1
- package/lib/umd-es6/ui-react.js.gz +0 -0
- package/package.json +39 -22
- package/readme.md +3 -3
- package/lib/cjs/persister-automerge.cjs +0 -1
- package/lib/cjs/persister-automerge.cjs.gz +0 -0
- package/lib/cjs/persister-browser.cjs +0 -1
- package/lib/cjs/persister-browser.cjs.gz +0 -0
- package/lib/cjs/persister-file.cjs +0 -1
- package/lib/cjs/persister-file.cjs.gz +0 -0
- package/lib/cjs/persister-remote.cjs +0 -1
- package/lib/cjs/persister-remote.cjs.gz +0 -0
- package/lib/cjs/persister-yjs.cjs +0 -1
- package/lib/cjs/persister-yjs.cjs.gz +0 -0
- package/lib/cjs-es6/persister-automerge.cjs +0 -1
- package/lib/cjs-es6/persister-automerge.cjs.gz +0 -0
- package/lib/cjs-es6/persister-browser.cjs +0 -1
- package/lib/cjs-es6/persister-browser.cjs.gz +0 -0
- package/lib/cjs-es6/persister-file.cjs +0 -1
- package/lib/cjs-es6/persister-file.cjs.gz +0 -0
- package/lib/cjs-es6/persister-remote.cjs +0 -1
- package/lib/cjs-es6/persister-remote.cjs.gz +0 -0
- package/lib/cjs-es6/persister-yjs.cjs +0 -1
- package/lib/cjs-es6/persister-yjs.cjs.gz +0 -0
- package/lib/es6/persister-automerge.js +0 -1
- package/lib/es6/persister-automerge.js.gz +0 -0
- package/lib/es6/persister-browser.js +0 -1
- package/lib/es6/persister-browser.js.gz +0 -0
- package/lib/es6/persister-file.js +0 -1
- package/lib/es6/persister-file.js.gz +0 -0
- package/lib/es6/persister-remote.js +0 -1
- package/lib/es6/persister-remote.js.gz +0 -0
- package/lib/es6/persister-yjs.js +0 -1
- package/lib/es6/persister-yjs.js.gz +0 -0
- package/lib/persister-automerge.js +0 -1
- package/lib/persister-automerge.js.gz +0 -0
- package/lib/persister-browser.js +0 -1
- package/lib/persister-browser.js.gz +0 -0
- package/lib/persister-file.js +0 -1
- package/lib/persister-file.js.gz +0 -0
- package/lib/persister-remote.js +0 -1
- package/lib/persister-remote.js.gz +0 -0
- package/lib/persister-yjs.js +0 -1
- package/lib/persister-yjs.js.gz +0 -0
- package/lib/umd/persister-automerge.js +0 -1
- package/lib/umd/persister-automerge.js.gz +0 -0
- package/lib/umd/persister-browser.js +0 -1
- package/lib/umd/persister-browser.js.gz +0 -0
- package/lib/umd/persister-file.js +0 -1
- package/lib/umd/persister-file.js.gz +0 -0
- package/lib/umd/persister-remote.js +0 -1
- package/lib/umd/persister-remote.js.gz +0 -0
- package/lib/umd/persister-yjs.js +0 -1
- package/lib/umd/persister-yjs.js.gz +0 -0
- package/lib/umd-es6/persister-automerge.js +0 -1
- package/lib/umd-es6/persister-automerge.js.gz +0 -0
- package/lib/umd-es6/persister-browser.js +0 -1
- package/lib/umd-es6/persister-browser.js.gz +0 -0
- package/lib/umd-es6/persister-file.js +0 -1
- package/lib/umd-es6/persister-file.js.gz +0 -0
- package/lib/umd-es6/persister-remote.js +0 -1
- package/lib/umd-es6/persister-remote.js.gz +0 -0
- package/lib/umd-es6/persister-yjs.js +0 -1
- package/lib/umd-es6/persister-yjs.js.gz +0 -0
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* returns a new Checkpoints object. From there, you can create new checkpoints,
|
|
7
7
|
* go forwards or backwards to others, and register listeners for when the list
|
|
8
8
|
* of checkpoints change.
|
|
9
|
-
*
|
|
10
9
|
* @packageDocumentation
|
|
11
10
|
* @module checkpoints
|
|
12
11
|
*/
|
|
@@ -28,7 +27,6 @@ import {OptionalSchemas, Store} from './store.d';
|
|
|
28
27
|
* - The 'forward' checkpoint Ids that can be rolled forward to (in other words,
|
|
29
28
|
* the checkpoints in the redo stack for this Store). They are in
|
|
30
29
|
* chronological order with the newest checkpoint at the end of the array.
|
|
31
|
-
*
|
|
32
30
|
* @category Identity
|
|
33
31
|
*/
|
|
34
32
|
export type CheckpointIds = [Ids, Id | undefined, Ids];
|
|
@@ -40,7 +38,6 @@ export type CheckpointIds = [Ids, Id | undefined, Ids];
|
|
|
40
38
|
* A CheckpointCallback is provided when using the forEachCheckpoint method,
|
|
41
39
|
* so that you can do something based on every Checkpoint in the Checkpoints
|
|
42
40
|
* object. See that method for specific examples.
|
|
43
|
-
*
|
|
44
41
|
* @param checkpointId The Id of the Checkpoint that the callback can operate
|
|
45
42
|
* on.
|
|
46
43
|
* @category Callback
|
|
@@ -62,7 +59,6 @@ export type CheckpointCallback = (checkpointId: Id, label?: string) => void;
|
|
|
62
59
|
*
|
|
63
60
|
* When called, a CheckpointIdsListener is given a reference to the Checkpoints
|
|
64
61
|
* object.
|
|
65
|
-
*
|
|
66
62
|
* @param checkpoints A reference to the Checkpoints object that changed.
|
|
67
63
|
* @category Listener
|
|
68
64
|
*/
|
|
@@ -88,7 +84,6 @@ export type CheckpointIdsListener<Schemas extends OptionalSchemas> = (
|
|
|
88
84
|
*
|
|
89
85
|
* When called, a CheckpointListener is given a reference to the Checkpoints
|
|
90
86
|
* object, and the Id of the checkpoint whose label changed.
|
|
91
|
-
*
|
|
92
87
|
* @param checkpoints A reference to the Checkpoints object that changed.
|
|
93
88
|
* @param checkpointId The Id of the checkpoint that changed.
|
|
94
89
|
* @category Listener
|
|
@@ -105,7 +100,6 @@ export type CheckpointListener<Schemas extends OptionalSchemas> = (
|
|
|
105
100
|
*
|
|
106
101
|
* A CheckpointsListenerStats object is returned from the getListenerStats
|
|
107
102
|
* method, and is only populated in a debug build.
|
|
108
|
-
*
|
|
109
103
|
* @category Development
|
|
110
104
|
*/
|
|
111
105
|
export type CheckpointsListenerStats = {
|
|
@@ -137,9 +131,6 @@ export type CheckpointsListenerStats = {
|
|
|
137
131
|
* Every checkpoint can be given a label which can be used to describe the
|
|
138
132
|
* actions that changed the Store before this checkpoint. This can be useful for
|
|
139
133
|
* interfaces that let users 'Undo [last action]'.
|
|
140
|
-
*
|
|
141
|
-
* You
|
|
142
|
-
*
|
|
143
134
|
* @example
|
|
144
135
|
* This example shows a simple lifecycle of a Checkpoints object: from creation,
|
|
145
136
|
* to adding a checkpoint, getting the list of available checkpoints, and then
|
|
@@ -209,7 +200,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
209
200
|
* pruned to make room for more recent ones.
|
|
210
201
|
*
|
|
211
202
|
* The default size for a newly-created Checkpoints object is 100.
|
|
212
|
-
*
|
|
213
203
|
* @param size The number of checkpoints that this Checkpoints object should
|
|
214
204
|
* hold.
|
|
215
205
|
* @returns A reference to the Checkpoints object.
|
|
@@ -255,7 +245,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
255
245
|
* The optional `label` parameter can be used to describe the actions that
|
|
256
246
|
* changed the Store before this checkpoint. This can be useful for interfaces
|
|
257
247
|
* that let users 'Undo [last action]'.
|
|
258
|
-
*
|
|
259
248
|
* @param label An optional label to describe the actions leading up to this
|
|
260
249
|
* checkpoint.
|
|
261
250
|
* @returns The Id of the newly-created checkpoint.
|
|
@@ -309,7 +298,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
309
298
|
* change the label at a later point.
|
|
310
299
|
*
|
|
311
300
|
* You cannot add a label to a checkpoint that does not yet exist.
|
|
312
|
-
*
|
|
313
301
|
* @param checkpointId The Id of the checkpoint to set the label for.
|
|
314
302
|
* @param label A label to describe the actions leading up to this checkpoint
|
|
315
303
|
* or left undefined if you want to clear the current label.
|
|
@@ -354,6 +342,11 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
354
342
|
/**
|
|
355
343
|
* The getStore method returns a reference to the underlying Store that is
|
|
356
344
|
* backing this Checkpoints object.
|
|
345
|
+
* @returns A reference to the Store.
|
|
346
|
+
* @example
|
|
347
|
+
* This example creates a Checkpoints object against a newly-created Store
|
|
348
|
+
* and then gets its reference in order to update its data and set a
|
|
349
|
+
* checkpoint.
|
|
357
350
|
*
|
|
358
351
|
* This has schema-based typing. The following is a simplified representation:
|
|
359
352
|
*
|
|
@@ -361,12 +354,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
361
354
|
* getStore(): Store;
|
|
362
355
|
* ```
|
|
363
356
|
*
|
|
364
|
-
* @returns A reference to the Store.
|
|
365
|
-
* @example
|
|
366
|
-
* This example creates a Checkpoints object against a newly-created Store
|
|
367
|
-
* and then gets its reference in order to update its data and set a
|
|
368
|
-
* checkpoint.
|
|
369
|
-
*
|
|
370
357
|
* ```js
|
|
371
358
|
* const checkpoints = createCheckpoints(createStore());
|
|
372
359
|
* checkpoints.getStore().setCell('pets', 'fido', 'species', 'dog');
|
|
@@ -387,7 +374,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
387
374
|
* Together, these are sufficient to understand the state of the Checkpoints
|
|
388
375
|
* object and what movement is possible backward or forward through the
|
|
389
376
|
* checkpoint stack.
|
|
390
|
-
*
|
|
391
377
|
* @returns A CheckpointIds array, containing the checkpoint Ids managed by
|
|
392
378
|
* this Checkpoints object.
|
|
393
379
|
* @example
|
|
@@ -426,7 +412,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
426
412
|
* object in a functional style. The `checkpointCallback` parameter is a
|
|
427
413
|
* CheckpointCallback function that will be called with the Id of each
|
|
428
414
|
* Checkpoint.
|
|
429
|
-
*
|
|
430
415
|
* @param checkpointCallback The function that should be called for every
|
|
431
416
|
* Checkpoint.
|
|
432
417
|
* @example
|
|
@@ -451,7 +436,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
451
436
|
/**
|
|
452
437
|
* The hasCheckpoint method returns a boolean indicating whether a given
|
|
453
438
|
* Checkpoint exists in the Checkpoints object.
|
|
454
|
-
*
|
|
455
439
|
* @param checkpointId The Id of a possible Checkpoint in the Checkpoints
|
|
456
440
|
* object.
|
|
457
441
|
* @returns Whether a Checkpoint with that Id exists.
|
|
@@ -477,7 +461,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
477
461
|
*
|
|
478
462
|
* If the checkpoint has had no label provided, this method will return an
|
|
479
463
|
* empty string.
|
|
480
|
-
*
|
|
481
464
|
* @param checkpointId The Id of the checkpoint to get the label for.
|
|
482
465
|
* @returns A string label for the requested checkpoint, an empty string if it
|
|
483
466
|
* was never set, or `undefined` if the checkpoint does not exist.
|
|
@@ -534,7 +517,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
534
517
|
*
|
|
535
518
|
* The provided listener is a CheckpointIdsListener function, and will be
|
|
536
519
|
* called with a reference to the Checkpoints object.
|
|
537
|
-
*
|
|
538
520
|
* @param listener The function that will be called whenever the checkpoints
|
|
539
521
|
* change.
|
|
540
522
|
* @returns A unique Id for the listener that can later be used to remove it.
|
|
@@ -598,7 +580,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
598
580
|
* The provided listener is a CheckpointListener function, and will be called
|
|
599
581
|
* with a reference to the Checkpoints object, and the Id of the checkpoint
|
|
600
582
|
* whose label changed.
|
|
601
|
-
*
|
|
602
583
|
* @param checkpointId The Id of the checkpoint to listen to, or `null` as a
|
|
603
584
|
* wildcard.
|
|
604
585
|
* @param listener The function that will be called whenever the checkpoint
|
|
@@ -661,7 +642,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
661
642
|
*
|
|
662
643
|
* Use the Id returned by the addCheckpointIdsListener method. Note that the
|
|
663
644
|
* Checkpoints object may re-use this Id for future listeners added to it.
|
|
664
|
-
*
|
|
665
645
|
* @param listenerId The Id of the listener to remove.
|
|
666
646
|
* @returns A reference to the Checkpoints object.
|
|
667
647
|
* @example
|
|
@@ -706,7 +686,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
706
686
|
* ```
|
|
707
687
|
*
|
|
708
688
|
* If there is no previous checkpoint to return to, this method has no effect.
|
|
709
|
-
*
|
|
710
689
|
* @returns A reference to the Checkpoints object.
|
|
711
690
|
* @example
|
|
712
691
|
* This example creates a Store, a Checkpoints object, makes a change and then
|
|
@@ -750,7 +729,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
750
729
|
* changes, the forwards 'redo' stack will only exist while you do not make
|
|
751
730
|
* changes to the Store. In general the goForward method is expected to be
|
|
752
731
|
* used to redo changes that were just undone.
|
|
753
|
-
*
|
|
754
732
|
* @returns A reference to the Checkpoints object.
|
|
755
733
|
* @example
|
|
756
734
|
* This example creates a Store, a Checkpoints object, makes a change and then
|
|
@@ -831,7 +809,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
831
809
|
* ```
|
|
832
810
|
*
|
|
833
811
|
* If there is no checkpoint with the Id specified, this method has no effect.
|
|
834
|
-
*
|
|
835
812
|
* @param checkpointId The Id of the checkpoint to move to.
|
|
836
813
|
* @returns A reference to the Checkpoints object.
|
|
837
814
|
* @example
|
|
@@ -897,7 +874,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
897
874
|
* that is the baseline from which all subsequent changes are tracked.
|
|
898
875
|
*
|
|
899
876
|
* If you are listening to
|
|
900
|
-
*
|
|
901
877
|
* @returns A reference to the Checkpoints object.
|
|
902
878
|
* @example
|
|
903
879
|
* This example creates a Store, a Checkpoints object, adds a listener, makes
|
|
@@ -946,7 +922,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
946
922
|
*
|
|
947
923
|
* This guarantees that all of the listeners that the object registered with
|
|
948
924
|
* the underlying Store are removed and it can be correctly garbage collected.
|
|
949
|
-
*
|
|
950
925
|
* @example
|
|
951
926
|
* This example creates a Store, adds a Checkpoints object (that registers a
|
|
952
927
|
* CellListener with the underlying Store), and then destroys it again,
|
|
@@ -980,7 +955,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
980
955
|
* return an empty object. The method is intended to be used during
|
|
981
956
|
* development to ensure your application is not leaking listener
|
|
982
957
|
* registrations, for example.
|
|
983
|
-
*
|
|
984
958
|
* @returns A CheckpointsListenerStats object containing Checkpoints listener
|
|
985
959
|
* statistics.
|
|
986
960
|
* @example
|
|
@@ -1017,7 +991,6 @@ export interface Checkpoints<in out Schemas extends OptionalSchemas> {
|
|
|
1017
991
|
* A given Store can only have one Checkpoints object associated with it. If you
|
|
1018
992
|
* call this function twice on the same Store, your second call will return a
|
|
1019
993
|
* reference to the Checkpoints object created by the first.
|
|
1020
|
-
*
|
|
1021
994
|
* @param store The Store for which to set Checkpoints.
|
|
1022
995
|
* @returns A reference to the new Checkpoints object.
|
|
1023
996
|
* @example
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The common module of the TinyBase project provides a small collection of
|
|
3
3
|
* common types used across other modules.
|
|
4
|
-
*
|
|
5
4
|
* @packageDocumentation
|
|
6
5
|
* @module common
|
|
7
6
|
*/
|
|
@@ -9,7 +8,6 @@
|
|
|
9
8
|
/**
|
|
10
9
|
* The Json type is a simple alias for a string, but is used to indicate that
|
|
11
10
|
* the string should be considered to be a JSON serialization of an object.
|
|
12
|
-
*
|
|
13
11
|
* @category General
|
|
14
12
|
*/
|
|
15
13
|
export type Json = string;
|
|
@@ -18,7 +16,6 @@ export type Json = string;
|
|
|
18
16
|
* The Ids type is a simple alias for an array of strings, but is used to
|
|
19
17
|
* indicate that the strings should be considered to be the keys of objects
|
|
20
18
|
* (such as the Row Id strings used in a Table).
|
|
21
|
-
*
|
|
22
19
|
* @category Identity
|
|
23
20
|
*/
|
|
24
21
|
export type Ids = Id[];
|
|
@@ -27,7 +24,6 @@ export type Ids = Id[];
|
|
|
27
24
|
* The Id type is a simple alias for a string, but is used to indicate that the
|
|
28
25
|
* string should be considered to be the key of an object (such as a Row Id
|
|
29
26
|
* string used in a Table).
|
|
30
|
-
*
|
|
31
27
|
* @category Identity
|
|
32
28
|
*/
|
|
33
29
|
export type Id = string;
|
|
@@ -37,7 +33,6 @@ export type Id = string;
|
|
|
37
33
|
* where the string should be considered to be the key of an objects (such as a
|
|
38
34
|
* Row Id string used in a Table), and typically `null` indicates a wildcard -
|
|
39
35
|
* such as when used in the Store addRowListener method.
|
|
40
|
-
*
|
|
41
36
|
* @category Identity
|
|
42
37
|
*/
|
|
43
38
|
export type IdOrNull = Id | null;
|
|
@@ -45,7 +40,6 @@ export type IdOrNull = Id | null;
|
|
|
45
40
|
/**
|
|
46
41
|
* The ParameterizedCallback type represents a generic function that will take
|
|
47
42
|
* an optional parameter - such as the handler of a DOM event.
|
|
48
|
-
*
|
|
49
43
|
* @category Callback
|
|
50
44
|
*/
|
|
51
45
|
export type ParameterizedCallback<Parameter> = (parameter?: Parameter) => void;
|
|
@@ -53,14 +47,12 @@ export type ParameterizedCallback<Parameter> = (parameter?: Parameter) => void;
|
|
|
53
47
|
/**
|
|
54
48
|
* The Callback type represents a function that is used as a callback and which
|
|
55
49
|
* does not take a parameter.
|
|
56
|
-
*
|
|
57
50
|
* @category Callback
|
|
58
51
|
*/
|
|
59
52
|
export type Callback = () => void;
|
|
60
53
|
|
|
61
54
|
/**
|
|
62
55
|
* The SortKey type represents a value that can be used by a sort function.
|
|
63
|
-
*
|
|
64
56
|
* @category Parameter
|
|
65
57
|
*/
|
|
66
58
|
export type SortKey = string | number | boolean;
|
|
@@ -70,7 +62,6 @@ export type SortKey = string | number | boolean;
|
|
|
70
62
|
* alphanumerically, and can be provided to the `sliceIdSorter` and
|
|
71
63
|
* `rowIdSorter` parameters of the setIndexDefinition method in the indexes
|
|
72
64
|
* module, for example.
|
|
73
|
-
*
|
|
74
65
|
* @param sortKey1 The first item of the pair to compare.
|
|
75
66
|
* @param sortKey2 The second item of the pair to compare.
|
|
76
67
|
* @returns A number indicating how to sort the pair.
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
* returns a new Indexes object. From there, you can create new Index
|
|
7
7
|
* definitions, access the contents of those Indexes directly, and register
|
|
8
8
|
* listeners for when they change.
|
|
9
|
-
*
|
|
10
9
|
* @packageDocumentation
|
|
11
10
|
* @module indexes
|
|
12
11
|
*/
|
|
@@ -31,7 +30,6 @@ import {Id, IdOrNull, Ids, SortKey} from './common.d';
|
|
|
31
30
|
* Note that the Index type is not actually used in the API, and you instead
|
|
32
31
|
* enumerate and access its structure with the getSliceIds method and
|
|
33
32
|
* getSliceRowIds method.
|
|
34
|
-
*
|
|
35
33
|
* @category Concept
|
|
36
34
|
*/
|
|
37
35
|
export type Index = {[sliceId: Id]: Slice};
|
|
@@ -45,7 +43,6 @@ export type Index = {[sliceId: Id]: Slice};
|
|
|
45
43
|
*
|
|
46
44
|
* Note that the Slice type is not actually used in the API, and you instead get
|
|
47
45
|
* Row Ids directly with the getSliceRowIds method.
|
|
48
|
-
*
|
|
49
46
|
* @category Concept
|
|
50
47
|
*/
|
|
51
48
|
export type Slice = Ids;
|
|
@@ -66,7 +63,6 @@ export type Slice = Ids;
|
|
|
66
63
|
* A IndexCallback is provided when using the forEachIndex method, so that you
|
|
67
64
|
* can do something based on every Index in the Indexes object. See that method
|
|
68
65
|
* for specific examples.
|
|
69
|
-
*
|
|
70
66
|
* @param indexId The Id of the Index that the callback can operate on.
|
|
71
67
|
* @param forEachRow A function that will let you iterate over the Slice objects
|
|
72
68
|
* in this Index.
|
|
@@ -93,7 +89,6 @@ export type IndexCallback<Schema extends OptionalTablesSchema> = (
|
|
|
93
89
|
* A SliceCallback is provided when using the forEachSlice method, so that you
|
|
94
90
|
* can do something based on every Slice in an Index. See that method for
|
|
95
91
|
* specific examples.
|
|
96
|
-
*
|
|
97
92
|
* @param sliceId The Id of the Slice that the callback can operate on.
|
|
98
93
|
* @param forEachRow A function that will let you iterate over the Row objects
|
|
99
94
|
* in this Slice.
|
|
@@ -119,7 +114,6 @@ export type SliceCallback<Schema extends OptionalTablesSchema> = (
|
|
|
119
114
|
*
|
|
120
115
|
* When called, a SliceIdsListener is given a reference to the Indexes object,
|
|
121
116
|
* and the Id of the Index that changed.
|
|
122
|
-
*
|
|
123
117
|
* @param indexes A reference to the Indexes object that changed.
|
|
124
118
|
* @param indexId The Id of the Index that changed.
|
|
125
119
|
* @category Listener
|
|
@@ -149,7 +143,6 @@ export type SliceIdsListener<Schemas extends OptionalSchemas> = (
|
|
|
149
143
|
* When called, a SliceRowIdsListener is given a reference to the Indexes
|
|
150
144
|
* object, the Id of the Index that changed, and the Id of the Slice whose Row
|
|
151
145
|
* Ids changed.
|
|
152
|
-
*
|
|
153
146
|
* @param indexes A reference to the Indexes object that changed.
|
|
154
147
|
* @param indexId The Id of the Index that changed.
|
|
155
148
|
* @param sliceId The Id of the Slice that changed.
|
|
@@ -167,7 +160,6 @@ export type SliceRowIdsListener<Schemas extends OptionalSchemas> = (
|
|
|
167
160
|
*
|
|
168
161
|
* A IndexesListenerStats object is returned from the getListenerStats method,
|
|
169
162
|
* and is only populated in a debug build.
|
|
170
|
-
*
|
|
171
163
|
* @category Development
|
|
172
164
|
*/
|
|
173
165
|
export type IndexesListenerStats = {
|
|
@@ -198,7 +190,6 @@ export type IndexesListenerStats = {
|
|
|
198
190
|
*
|
|
199
191
|
* This module defaults to indexing Row objects by one of their Cell values.
|
|
200
192
|
* However, far more complex indexes can be configured with a custom function.
|
|
201
|
-
*
|
|
202
193
|
* @example
|
|
203
194
|
* This example shows a very simple lifecycle of an Indexes object: from
|
|
204
195
|
* creation, to adding a definition, getting its contents, and then registering
|
|
@@ -297,7 +288,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
297
288
|
* Slice Id parameter, in case you want to sort Row Ids differently in each
|
|
298
289
|
* Slice. You can use the convenient defaultSorter function to default this to
|
|
299
290
|
* be alphanumeric.
|
|
300
|
-
*
|
|
301
291
|
* @param indexId The Id of the Index to define.
|
|
302
292
|
* @param tableId The Id of the Table the Index will be generated from.
|
|
303
293
|
* @param getSliceIdOrIds Either the Id of the Cell containing, or a function
|
|
@@ -420,6 +410,11 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
420
410
|
|
|
421
411
|
/**
|
|
422
412
|
* The delIndexDefinition method removes an existing Index definition.
|
|
413
|
+
* @param indexId The Id of the Index to remove.
|
|
414
|
+
* @returns A reference to the Indexes object.
|
|
415
|
+
* @example
|
|
416
|
+
* This example creates a Store, creates an Indexes object, defines a simple
|
|
417
|
+
* Index, and then removes it.
|
|
423
418
|
*
|
|
424
419
|
* This has schema-based typing. The following is a simplified representation:
|
|
425
420
|
*
|
|
@@ -427,12 +422,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
427
422
|
* delIndexDefinition(indexId: Id): Indexes;
|
|
428
423
|
* ```
|
|
429
424
|
*
|
|
430
|
-
* @param indexId The Id of the Index to remove.
|
|
431
|
-
* @returns A reference to the Indexes object.
|
|
432
|
-
* @example
|
|
433
|
-
* This example creates a Store, creates an Indexes object, defines a simple
|
|
434
|
-
* Index, and then removes it.
|
|
435
|
-
*
|
|
436
425
|
* ```js
|
|
437
426
|
* const store = createStore().setTable('pets', {
|
|
438
427
|
* fido: {species: 'dog'},
|
|
@@ -456,6 +445,10 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
456
445
|
/**
|
|
457
446
|
* The getStore method returns a reference to the underlying Store that is
|
|
458
447
|
* backing this Indexes object.
|
|
448
|
+
* @returns A reference to the Store.
|
|
449
|
+
* @example
|
|
450
|
+
* This example creates an Indexes object against a newly-created Store and
|
|
451
|
+
* then gets its reference in order to update its data.
|
|
459
452
|
*
|
|
460
453
|
* This has schema-based typing. The following is a simplified representation:
|
|
461
454
|
*
|
|
@@ -463,11 +456,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
463
456
|
* getStore(): Store;
|
|
464
457
|
* ```
|
|
465
458
|
*
|
|
466
|
-
* @returns A reference to the Store.
|
|
467
|
-
* @example
|
|
468
|
-
* This example creates an Indexes object against a newly-created Store and
|
|
469
|
-
* then gets its reference in order to update its data.
|
|
470
|
-
*
|
|
471
459
|
* ```js
|
|
472
460
|
* const indexes = createIndexes(createStore());
|
|
473
461
|
* indexes.setIndexDefinition('bySpecies', 'pets', 'species');
|
|
@@ -482,7 +470,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
482
470
|
/**
|
|
483
471
|
* The getIndexIds method returns an array of the Index Ids registered with
|
|
484
472
|
* this Indexes object.
|
|
485
|
-
*
|
|
486
473
|
* @returns An array of Ids.
|
|
487
474
|
* @example
|
|
488
475
|
* This example creates an Indexes object with two definitions, and then gets
|
|
@@ -515,7 +502,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
515
502
|
* IndexCallback function that will be called with the Id of each Index, and
|
|
516
503
|
* with a function that can then be used to iterate over each Slice of the
|
|
517
504
|
* Index, should you wish.
|
|
518
|
-
*
|
|
519
505
|
* @param indexCallback The function that should be called for every Index.
|
|
520
506
|
* @example
|
|
521
507
|
* This example iterates over each Index in an Indexes object, and lists each
|
|
@@ -560,7 +546,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
560
546
|
* in a functional style. The `rowCallback` parameter is a RowCallback
|
|
561
547
|
* function that will be called with the Id and value of each Row in the
|
|
562
548
|
* Slice.
|
|
563
|
-
*
|
|
564
549
|
* @param indexId The Id of the Index to iterate over.
|
|
565
550
|
* @param sliceCallback The function that should be called for every Slice.
|
|
566
551
|
* @example
|
|
@@ -592,7 +577,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
592
577
|
/**
|
|
593
578
|
* The hasIndex method returns a boolean indicating whether a given Index
|
|
594
579
|
* exists in the Indexes object.
|
|
595
|
-
*
|
|
596
580
|
* @param indexId The Id of a possible Index in the Indexes object.
|
|
597
581
|
* @returns Whether an Index with that Id exists.
|
|
598
582
|
* @example
|
|
@@ -613,7 +597,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
613
597
|
/**
|
|
614
598
|
* The hasSlice method returns a boolean indicating whether a given Slice
|
|
615
599
|
* exists in the Indexes object.
|
|
616
|
-
*
|
|
617
600
|
* @param indexId The Id of a possible Index in the Indexes object.
|
|
618
601
|
* @param sliceId The Id of a possible Slice in the Index.
|
|
619
602
|
* @returns Whether a Slice with that Id exists.
|
|
@@ -648,7 +631,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
648
631
|
* ```
|
|
649
632
|
*
|
|
650
633
|
* If the Index Id is invalid, the method returns `undefined`.
|
|
651
|
-
*
|
|
652
634
|
* @param indexId The Id of an Index.
|
|
653
635
|
* @returns The Id of the Table backing the Index, or `undefined`.
|
|
654
636
|
* @example
|
|
@@ -675,7 +657,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
675
657
|
*
|
|
676
658
|
* If the identified Index does not exist (or if the definition references a
|
|
677
659
|
* Table that does not exist) then an empty array is returned.
|
|
678
|
-
*
|
|
679
660
|
* @param indexId The Id of the Index.
|
|
680
661
|
* @returns The Slice Ids in the Index, or an empty array.
|
|
681
662
|
* @example
|
|
@@ -708,7 +689,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
708
689
|
*
|
|
709
690
|
* If the identified Index or Slice do not exist (or if the definition
|
|
710
691
|
* references a Table that does not exist) then an empty array is returned.
|
|
711
|
-
*
|
|
712
692
|
* @param indexId The Id of the Index.
|
|
713
693
|
* @param sliceId The Id of the Slice in the Index.
|
|
714
694
|
* @returns The Row Ids in the Slice, or an empty array.
|
|
@@ -756,7 +736,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
756
736
|
* The provided listener is a SliceIdsListener function, and will be called
|
|
757
737
|
* with a reference to the Indexes object, and the Id of the Index that
|
|
758
738
|
* changed.
|
|
759
|
-
*
|
|
760
739
|
* @param indexId The Id of the Index to listen to, or `null` as a wildcard.
|
|
761
740
|
* @param listener The function that will be called whenever the Slice Ids in
|
|
762
741
|
* the Index change.
|
|
@@ -853,7 +832,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
853
832
|
* The provided listener is a SliceRowIdsListener function, and will be called
|
|
854
833
|
* with a reference to the Indexes object, the Id of the Index, and the Id of
|
|
855
834
|
* the Slice that changed.
|
|
856
|
-
*
|
|
857
835
|
* @param indexId The Id of the Index to listen to, or `null` as a wildcard.
|
|
858
836
|
* @param sliceId The Id of the Slice to listen to, or `null` as a wildcard.
|
|
859
837
|
* @param listener The function that will be called whenever the Row Ids in
|
|
@@ -943,7 +921,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
943
921
|
* Use the Id returned by whichever method was used to add the listener. Note
|
|
944
922
|
* that the Indexes object may re-use this Id for future listeners added to
|
|
945
923
|
* it.
|
|
946
|
-
*
|
|
947
924
|
* @param listenerId The Id of the listener to remove.
|
|
948
925
|
* @returns A reference to the Indexes object.
|
|
949
926
|
* @example
|
|
@@ -986,7 +963,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
986
963
|
*
|
|
987
964
|
* This guarantees that all of the listeners that the object registered with
|
|
988
965
|
* the underlying Store are removed and it can be correctly garbage collected.
|
|
989
|
-
*
|
|
990
966
|
* @example
|
|
991
967
|
* This example creates a Store, adds an Indexes object with a
|
|
992
968
|
* definition (that registers a RowListener with the underlying Store),
|
|
@@ -1025,7 +1001,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
1025
1001
|
* return an empty object. The method is intended to be used during
|
|
1026
1002
|
* development to ensure your application is not leaking listener
|
|
1027
1003
|
* registrations, for example.
|
|
1028
|
-
*
|
|
1029
1004
|
* @returns A IndexesListenerStats object containing Indexes listener
|
|
1030
1005
|
* statistics.
|
|
1031
1006
|
* @example
|
|
@@ -1062,7 +1037,6 @@ export interface Indexes<in out Schemas extends OptionalSchemas> {
|
|
|
1062
1037
|
* A given Store can only have one Indexes object associated with it. If you
|
|
1063
1038
|
* call this function twice on the same Store, your second call will return a
|
|
1064
1039
|
* reference to the Indexes object created by the first.
|
|
1065
|
-
*
|
|
1066
1040
|
* @param store The Store for which to register Index definitions.
|
|
1067
1041
|
* @returns A reference to the new Indexes object.
|
|
1068
1042
|
* @example
|