tinybase 3.1.0-beta.4 → 3.1.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.
- package/lib/debug/ui-react.js +2 -2
- package/lib/{checkpoints.d.ts → types/checkpoints.d.ts} +13 -13
- package/lib/{debug → types}/indexes.d.ts +10 -16
- package/lib/{debug → types}/metrics.d.ts +49 -50
- package/lib/{debug → types}/persisters.d.ts +26 -30
- package/lib/{cjs-es6 → types}/queries.d.ts +474 -309
- package/lib/{debug → types}/relationships.d.ts +11 -17
- package/lib/{debug → types}/store.d.ts +180 -1038
- package/lib/types/tinybase.d.ts +14 -0
- package/lib/{debug → types}/tools.d.ts +12 -12
- package/lib/{debug → types}/ui-react.d.ts +11 -5
- package/lib/{cjs-es6 → types/with-schemas}/checkpoints.d.ts +93 -7
- package/lib/{cjs → types/with-schemas}/indexes.d.ts +136 -18
- package/lib/types/with-schemas/internal/queries.d.ts +15 -0
- package/lib/types/with-schemas/internal/store.d.ts +101 -0
- package/lib/types/with-schemas/internal/ui-react.d.ts +776 -0
- package/lib/{cjs → types/with-schemas}/metrics.d.ts +115 -50
- package/lib/{cjs → types/with-schemas}/persisters.d.ts +102 -4
- package/lib/{debug → types/with-schemas}/queries.d.ts +865 -346
- package/lib/{cjs → types/with-schemas}/relationships.d.ts +151 -20
- package/lib/{cjs-es6 → types/with-schemas}/store.d.ts +1082 -801
- package/lib/types/with-schemas/tinybase.d.ts +14 -0
- package/lib/{cjs-es6 → types/with-schemas}/tools.d.ts +21 -10
- package/lib/{cjs-es6 → types/with-schemas}/ui-react.d.ts +1871 -1314
- package/package.json +145 -29
- package/readme.md +14 -14
- package/lib/cjs/checkpoints.d.ts +0 -961
- package/lib/cjs/queries.d.ts +0 -3028
- package/lib/cjs/store.d.ts +0 -6143
- package/lib/cjs/tinybase.d.ts +0 -14
- package/lib/cjs/tools.d.ts +0 -536
- package/lib/cjs/ui-react.d.ts +0 -10921
- package/lib/cjs-es6/indexes.d.ts +0 -974
- package/lib/cjs-es6/metrics.d.ts +0 -829
- package/lib/cjs-es6/persisters.d.ts +0 -733
- package/lib/cjs-es6/relationships.d.ts +0 -1209
- package/lib/cjs-es6/tinybase.d.ts +0 -14
- package/lib/common.d.ts +0 -115
- package/lib/debug/checkpoints.d.ts +0 -961
- package/lib/debug/common.d.ts +0 -115
- package/lib/debug/tinybase.d.ts +0 -14
- package/lib/es6/checkpoints.d.ts +0 -961
- package/lib/es6/common.d.ts +0 -115
- package/lib/es6/indexes.d.ts +0 -974
- package/lib/es6/metrics.d.ts +0 -829
- package/lib/es6/persisters.d.ts +0 -733
- package/lib/es6/queries.d.ts +0 -3028
- package/lib/es6/relationships.d.ts +0 -1209
- package/lib/es6/store.d.ts +0 -6143
- package/lib/es6/tinybase.d.ts +0 -14
- package/lib/es6/tools.d.ts +0 -536
- package/lib/es6/ui-react.d.ts +0 -10921
- package/lib/indexes.d.ts +0 -974
- package/lib/metrics.d.ts +0 -829
- package/lib/persisters.d.ts +0 -733
- package/lib/queries.d.ts +0 -3028
- package/lib/relationships.d.ts +0 -1209
- package/lib/store.d.ts +0 -6143
- package/lib/tinybase.d.ts +0 -14
- package/lib/tools.d.ts +0 -536
- package/lib/ui-react.d.ts +0 -10921
- package/lib/umd/checkpoints.d.ts +0 -961
- package/lib/umd/common.d.ts +0 -115
- package/lib/umd/indexes.d.ts +0 -974
- package/lib/umd/metrics.d.ts +0 -829
- package/lib/umd/persisters.d.ts +0 -733
- package/lib/umd/queries.d.ts +0 -3028
- package/lib/umd/relationships.d.ts +0 -1209
- package/lib/umd/store.d.ts +0 -6143
- package/lib/umd/tinybase.d.ts +0 -14
- package/lib/umd/tools.d.ts +0 -536
- package/lib/umd/ui-react.d.ts +0 -10921
- package/lib/umd-es6/checkpoints.d.ts +0 -961
- package/lib/umd-es6/common.d.ts +0 -115
- package/lib/umd-es6/indexes.d.ts +0 -974
- package/lib/umd-es6/metrics.d.ts +0 -829
- package/lib/umd-es6/persisters.d.ts +0 -733
- package/lib/umd-es6/queries.d.ts +0 -3028
- package/lib/umd-es6/relationships.d.ts +0 -1209
- package/lib/umd-es6/store.d.ts +0 -6143
- package/lib/umd-es6/tinybase.d.ts +0 -14
- package/lib/umd-es6/tools.d.ts +0 -536
- package/lib/umd-es6/ui-react.d.ts +0 -10921
- /package/lib/{cjs-es6 → types}/common.d.ts +0 -0
- /package/lib/{cjs → types/with-schemas}/common.d.ts +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is everything.
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export * from './checkpoints.d';
|
|
8
|
+
export * from './common.d';
|
|
9
|
+
export * from './indexes.d';
|
|
10
|
+
export * from './metrics.d';
|
|
11
|
+
export * from './persisters.d';
|
|
12
|
+
export * from './queries.d';
|
|
13
|
+
export * from './relationships.d';
|
|
14
|
+
export * from './store.d';
|
|
@@ -10,13 +10,7 @@
|
|
|
10
10
|
* @since v2.2.0
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {
|
|
14
|
-
NoSchemas,
|
|
15
|
-
OptionalSchemas,
|
|
16
|
-
Store,
|
|
17
|
-
TablesSchema,
|
|
18
|
-
ValuesSchema,
|
|
19
|
-
} from './store.d';
|
|
13
|
+
import {OptionalSchemas, Store} from './store.d';
|
|
20
14
|
import {Id} from './common.d';
|
|
21
15
|
|
|
22
16
|
/**
|
|
@@ -90,6 +84,9 @@ export type StoreStatsTableDetail = {
|
|
|
90
84
|
* The number of Cell objects in the Table, across all Row objects.
|
|
91
85
|
*/
|
|
92
86
|
tableCells: number;
|
|
87
|
+
/**
|
|
88
|
+
* Detail about the Table object.
|
|
89
|
+
*/
|
|
93
90
|
rows: {[rowId: Id]: StoreStatsRowDetail};
|
|
94
91
|
};
|
|
95
92
|
|
|
@@ -115,7 +112,7 @@ export type StoreStatsRowDetail = {
|
|
|
115
112
|
* @category Tools
|
|
116
113
|
* @since v2.2.0
|
|
117
114
|
*/
|
|
118
|
-
export interface Tools<Schemas extends OptionalSchemas
|
|
115
|
+
export interface Tools<in out Schemas extends OptionalSchemas> {
|
|
119
116
|
/* eslint-disable max-len */
|
|
120
117
|
/**
|
|
121
118
|
* The getStoreStats method provides a set of statistics about the Store, and
|
|
@@ -174,6 +171,7 @@ export interface Tools<Schemas extends OptionalSchemas = NoSchemas> {
|
|
|
174
171
|
* @since v2.2.0
|
|
175
172
|
*/
|
|
176
173
|
getStoreStats(detail?: boolean): StoreStats;
|
|
174
|
+
|
|
177
175
|
/* eslint-enable max-len */
|
|
178
176
|
|
|
179
177
|
/**
|
|
@@ -236,7 +234,7 @@ export interface Tools<Schemas extends OptionalSchemas = NoSchemas> {
|
|
|
236
234
|
* @category Modelling
|
|
237
235
|
* @since v3.0.0
|
|
238
236
|
*/
|
|
239
|
-
getStoreTablesSchema():
|
|
237
|
+
getStoreTablesSchema(): Schemas[0];
|
|
240
238
|
|
|
241
239
|
/**
|
|
242
240
|
* The getStoreValuesSchema method returns the ValuesSchema of the Store as an
|
|
@@ -275,7 +273,7 @@ export interface Tools<Schemas extends OptionalSchemas = NoSchemas> {
|
|
|
275
273
|
* @category Modelling
|
|
276
274
|
* @since v3.0.0
|
|
277
275
|
*/
|
|
278
|
-
getStoreValuesSchema():
|
|
276
|
+
getStoreValuesSchema(): Schemas[1];
|
|
279
277
|
|
|
280
278
|
/**
|
|
281
279
|
* The getStoreApi method returns code-generated `.d.ts` and `.ts(x)` files
|
|
@@ -469,6 +467,12 @@ export interface Tools<Schemas extends OptionalSchemas = NoSchemas> {
|
|
|
469
467
|
* The getStore method returns a reference to the underlying Store that is
|
|
470
468
|
* backing this Tools object.
|
|
471
469
|
*
|
|
470
|
+
* This has schema-based typing. The following is a simplified representation:
|
|
471
|
+
*
|
|
472
|
+
* ```ts override
|
|
473
|
+
* getStore(): Store;
|
|
474
|
+
* ```
|
|
475
|
+
*
|
|
472
476
|
* @returns A reference to the Store.
|
|
473
477
|
* @example
|
|
474
478
|
* This example creates a Tools object against a newly-created Store and
|
|
@@ -491,6 +495,12 @@ export interface Tools<Schemas extends OptionalSchemas = NoSchemas> {
|
|
|
491
495
|
* The createTools function creates a Tools object, and is the main entry point
|
|
492
496
|
* into the tools module.
|
|
493
497
|
*
|
|
498
|
+
* This has schema-based typing. The following is a simplified representation:
|
|
499
|
+
*
|
|
500
|
+
* ```ts override
|
|
501
|
+
* createTools(store: Store): Tools;
|
|
502
|
+
* ```
|
|
503
|
+
*
|
|
494
504
|
* A given Store can only have one Tools object associated with it. If you call
|
|
495
505
|
* this function twice on the same Store, your second call will return a
|
|
496
506
|
* reference to the Tools object created by the first.
|
|
@@ -533,4 +543,5 @@ export interface Tools<Schemas extends OptionalSchemas = NoSchemas> {
|
|
|
533
543
|
export function createTools<Schemas extends OptionalSchemas>(
|
|
534
544
|
store: Store<Schemas>,
|
|
535
545
|
): Tools<Schemas>;
|
|
546
|
+
|
|
536
547
|
/* eslint-enable max-len */
|