tinybase 3.1.0-beta.2 → 3.1.0-beta.4
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/bin/cli.js +1 -1
- package/lib/checkpoints.d.ts +13 -11
- package/lib/cjs/checkpoints.d.ts +13 -11
- package/lib/cjs/indexes.d.ts +15 -7
- package/lib/cjs/metrics.d.ts +9 -7
- package/lib/cjs/persisters.d.ts +30 -24
- package/lib/cjs/queries.d.ts +10 -6
- package/lib/cjs/relationships.d.ts +15 -7
- package/lib/cjs/store.d.ts +1190 -291
- package/lib/cjs/tools.cjs +1 -1
- package/lib/cjs/tools.cjs.gz +0 -0
- package/lib/cjs/tools.d.ts +31 -31
- package/lib/cjs-es6/checkpoints.d.ts +13 -11
- package/lib/cjs-es6/indexes.d.ts +15 -7
- package/lib/cjs-es6/metrics.d.ts +9 -7
- package/lib/cjs-es6/persisters.d.ts +30 -24
- package/lib/cjs-es6/queries.d.ts +10 -6
- package/lib/cjs-es6/relationships.d.ts +15 -7
- package/lib/cjs-es6/store.d.ts +1190 -291
- package/lib/cjs-es6/tools.cjs +1 -1
- package/lib/cjs-es6/tools.cjs.gz +0 -0
- package/lib/cjs-es6/tools.d.ts +31 -31
- package/lib/debug/checkpoints.d.ts +13 -11
- package/lib/debug/indexes.d.ts +15 -7
- package/lib/debug/metrics.d.ts +9 -7
- package/lib/debug/persisters.d.ts +30 -24
- package/lib/debug/queries.d.ts +10 -6
- package/lib/debug/relationships.d.ts +15 -7
- package/lib/debug/store.d.ts +1190 -291
- package/lib/debug/tools.d.ts +31 -31
- package/lib/debug/tools.js +692 -484
- package/lib/es6/checkpoints.d.ts +13 -11
- package/lib/es6/indexes.d.ts +15 -7
- package/lib/es6/metrics.d.ts +9 -7
- package/lib/es6/persisters.d.ts +30 -24
- package/lib/es6/queries.d.ts +10 -6
- package/lib/es6/relationships.d.ts +15 -7
- package/lib/es6/store.d.ts +1190 -291
- package/lib/es6/tools.d.ts +31 -31
- package/lib/es6/tools.js +1 -1
- package/lib/es6/tools.js.gz +0 -0
- package/lib/indexes.d.ts +15 -7
- package/lib/metrics.d.ts +9 -7
- package/lib/persisters.d.ts +30 -24
- package/lib/queries.d.ts +10 -6
- package/lib/relationships.d.ts +15 -7
- package/lib/store.d.ts +1190 -291
- package/lib/tools.d.ts +31 -31
- package/lib/tools.js +1 -1
- package/lib/tools.js.gz +0 -0
- package/lib/umd/checkpoints.d.ts +13 -11
- package/lib/umd/indexes.d.ts +15 -7
- package/lib/umd/metrics.d.ts +9 -7
- package/lib/umd/persisters.d.ts +30 -24
- package/lib/umd/queries.d.ts +10 -6
- package/lib/umd/relationships.d.ts +15 -7
- package/lib/umd/store.d.ts +1190 -291
- package/lib/umd/tools.d.ts +31 -31
- package/lib/umd/tools.js +1 -1
- package/lib/umd/tools.js.gz +0 -0
- package/lib/umd-es6/checkpoints.d.ts +13 -11
- package/lib/umd-es6/indexes.d.ts +15 -7
- package/lib/umd-es6/metrics.d.ts +9 -7
- package/lib/umd-es6/persisters.d.ts +30 -24
- package/lib/umd-es6/queries.d.ts +10 -6
- package/lib/umd-es6/relationships.d.ts +15 -7
- package/lib/umd-es6/store.d.ts +1190 -291
- package/lib/umd-es6/tools.d.ts +31 -31
- package/lib/umd-es6/tools.js +1 -1
- package/lib/umd-es6/tools.js.gz +0 -0
- package/package.json +23 -23
- package/readme.md +1 -1
package/lib/relationships.d.ts
CHANGED
|
@@ -11,7 +11,13 @@
|
|
|
11
11
|
* @module relationships
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
GetCell,
|
|
16
|
+
NoSchemas,
|
|
17
|
+
OptionalSchemas,
|
|
18
|
+
RowCallback,
|
|
19
|
+
Store,
|
|
20
|
+
} from './store.d';
|
|
15
21
|
import {Id, IdOrNull, Ids} from './common.d';
|
|
16
22
|
|
|
17
23
|
/**
|
|
@@ -247,7 +253,7 @@ export type RelationshipsListenerStats = {
|
|
|
247
253
|
* @see Drawing demo
|
|
248
254
|
* @category Relationships
|
|
249
255
|
*/
|
|
250
|
-
export interface Relationships {
|
|
256
|
+
export interface Relationships<Schemas extends OptionalSchemas = NoSchemas> {
|
|
251
257
|
/**
|
|
252
258
|
* The setRelationshipDefinition method lets you set the definition of a
|
|
253
259
|
* Relationship.
|
|
@@ -339,7 +345,7 @@ export interface Relationships {
|
|
|
339
345
|
localTableId: Id,
|
|
340
346
|
remoteTableId: Id,
|
|
341
347
|
getRemoteRowId: Id | ((getCell: GetCell, localRowId: Id) => Id),
|
|
342
|
-
): Relationships
|
|
348
|
+
): Relationships<Schemas>;
|
|
343
349
|
|
|
344
350
|
/**
|
|
345
351
|
* The delRelationshipDefinition method removes an existing Relationship
|
|
@@ -379,7 +385,7 @@ export interface Relationships {
|
|
|
379
385
|
* ```
|
|
380
386
|
* @category Configuration
|
|
381
387
|
*/
|
|
382
|
-
delRelationshipDefinition(relationshipId: Id): Relationships
|
|
388
|
+
delRelationshipDefinition(relationshipId: Id): Relationships<Schemas>;
|
|
383
389
|
|
|
384
390
|
/**
|
|
385
391
|
* The getStore method returns a reference to the underlying Store that is
|
|
@@ -404,7 +410,7 @@ export interface Relationships {
|
|
|
404
410
|
* ```
|
|
405
411
|
* @category Getter
|
|
406
412
|
*/
|
|
407
|
-
getStore(): Store
|
|
413
|
+
getStore(): Store<Schemas>;
|
|
408
414
|
|
|
409
415
|
/**
|
|
410
416
|
* The getRelationshipIds method returns an array of the Relationship Ids
|
|
@@ -1081,7 +1087,7 @@ export interface Relationships {
|
|
|
1081
1087
|
* ```
|
|
1082
1088
|
* @category Listener
|
|
1083
1089
|
*/
|
|
1084
|
-
delListener(listenerId: Id): Relationships
|
|
1090
|
+
delListener(listenerId: Id): Relationships<Schemas>;
|
|
1085
1091
|
|
|
1086
1092
|
/**
|
|
1087
1093
|
* The destroy method should be called when this Relationships object is no
|
|
@@ -1198,4 +1204,6 @@ export interface Relationships {
|
|
|
1198
1204
|
* ```
|
|
1199
1205
|
* @category Creation
|
|
1200
1206
|
*/
|
|
1201
|
-
export function createRelationships
|
|
1207
|
+
export function createRelationships<Schemas extends OptionalSchemas>(
|
|
1208
|
+
store: Store<Schemas>,
|
|
1209
|
+
): Relationships<Schemas>;
|