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.
Files changed (72) hide show
  1. package/bin/cli.js +1 -1
  2. package/lib/checkpoints.d.ts +13 -11
  3. package/lib/cjs/checkpoints.d.ts +13 -11
  4. package/lib/cjs/indexes.d.ts +15 -7
  5. package/lib/cjs/metrics.d.ts +9 -7
  6. package/lib/cjs/persisters.d.ts +30 -24
  7. package/lib/cjs/queries.d.ts +10 -6
  8. package/lib/cjs/relationships.d.ts +15 -7
  9. package/lib/cjs/store.d.ts +1190 -291
  10. package/lib/cjs/tools.cjs +1 -1
  11. package/lib/cjs/tools.cjs.gz +0 -0
  12. package/lib/cjs/tools.d.ts +31 -31
  13. package/lib/cjs-es6/checkpoints.d.ts +13 -11
  14. package/lib/cjs-es6/indexes.d.ts +15 -7
  15. package/lib/cjs-es6/metrics.d.ts +9 -7
  16. package/lib/cjs-es6/persisters.d.ts +30 -24
  17. package/lib/cjs-es6/queries.d.ts +10 -6
  18. package/lib/cjs-es6/relationships.d.ts +15 -7
  19. package/lib/cjs-es6/store.d.ts +1190 -291
  20. package/lib/cjs-es6/tools.cjs +1 -1
  21. package/lib/cjs-es6/tools.cjs.gz +0 -0
  22. package/lib/cjs-es6/tools.d.ts +31 -31
  23. package/lib/debug/checkpoints.d.ts +13 -11
  24. package/lib/debug/indexes.d.ts +15 -7
  25. package/lib/debug/metrics.d.ts +9 -7
  26. package/lib/debug/persisters.d.ts +30 -24
  27. package/lib/debug/queries.d.ts +10 -6
  28. package/lib/debug/relationships.d.ts +15 -7
  29. package/lib/debug/store.d.ts +1190 -291
  30. package/lib/debug/tools.d.ts +31 -31
  31. package/lib/debug/tools.js +692 -484
  32. package/lib/es6/checkpoints.d.ts +13 -11
  33. package/lib/es6/indexes.d.ts +15 -7
  34. package/lib/es6/metrics.d.ts +9 -7
  35. package/lib/es6/persisters.d.ts +30 -24
  36. package/lib/es6/queries.d.ts +10 -6
  37. package/lib/es6/relationships.d.ts +15 -7
  38. package/lib/es6/store.d.ts +1190 -291
  39. package/lib/es6/tools.d.ts +31 -31
  40. package/lib/es6/tools.js +1 -1
  41. package/lib/es6/tools.js.gz +0 -0
  42. package/lib/indexes.d.ts +15 -7
  43. package/lib/metrics.d.ts +9 -7
  44. package/lib/persisters.d.ts +30 -24
  45. package/lib/queries.d.ts +10 -6
  46. package/lib/relationships.d.ts +15 -7
  47. package/lib/store.d.ts +1190 -291
  48. package/lib/tools.d.ts +31 -31
  49. package/lib/tools.js +1 -1
  50. package/lib/tools.js.gz +0 -0
  51. package/lib/umd/checkpoints.d.ts +13 -11
  52. package/lib/umd/indexes.d.ts +15 -7
  53. package/lib/umd/metrics.d.ts +9 -7
  54. package/lib/umd/persisters.d.ts +30 -24
  55. package/lib/umd/queries.d.ts +10 -6
  56. package/lib/umd/relationships.d.ts +15 -7
  57. package/lib/umd/store.d.ts +1190 -291
  58. package/lib/umd/tools.d.ts +31 -31
  59. package/lib/umd/tools.js +1 -1
  60. package/lib/umd/tools.js.gz +0 -0
  61. package/lib/umd-es6/checkpoints.d.ts +13 -11
  62. package/lib/umd-es6/indexes.d.ts +15 -7
  63. package/lib/umd-es6/metrics.d.ts +9 -7
  64. package/lib/umd-es6/persisters.d.ts +30 -24
  65. package/lib/umd-es6/queries.d.ts +10 -6
  66. package/lib/umd-es6/relationships.d.ts +15 -7
  67. package/lib/umd-es6/store.d.ts +1190 -291
  68. package/lib/umd-es6/tools.d.ts +31 -31
  69. package/lib/umd-es6/tools.js +1 -1
  70. package/lib/umd-es6/tools.js.gz +0 -0
  71. package/package.json +23 -23
  72. package/readme.md +1 -1
@@ -11,7 +11,13 @@
11
11
  * @module relationships
12
12
  */
13
13
 
14
- import {GetCell, RowCallback, Store} from './store.d';
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(store: Store): Relationships;
1207
+ export function createRelationships<Schemas extends OptionalSchemas>(
1208
+ store: Store<Schemas>,
1209
+ ): Relationships<Schemas>;