tinybase 3.1.0-beta.5 → 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.
@@ -133,10 +133,7 @@ export type ValueSchema =
133
133
  * The NoTablesSchema type is a TablesSchema-like type for when one has not been
134
134
  * provided.
135
135
  *
136
- * This type is used internally to the TinyBase type system and you are not
137
- * expected to need to use it directly.
138
- *
139
- * @category Internal
136
+ * @category Schema
140
137
  */
141
138
  export type NoTablesSchema = {[tableId: Id]: {[cellId: Id]: {type: 'any'}}};
142
139
 
@@ -144,10 +141,7 @@ export type NoTablesSchema = {[tableId: Id]: {[cellId: Id]: {type: 'any'}}};
144
141
  * The NoValuesSchema type is a ValuesSchema-like type for when one has not been
145
142
  * provided.
146
143
  *
147
- * This type is used internally to the TinyBase type system and you are not
148
- * expected to need to use it directly.
149
- *
150
- * @category Internal
144
+ * @category Schema
151
145
  */
152
146
  export type NoValuesSchema = {[valueId: Id]: {type: 'any'}};
153
147
 
@@ -187,6 +181,12 @@ export type NoSchemas = [NoTablesSchema, NoValuesSchema];
187
181
  * The Tables type is the data structure representing all of the data in a
188
182
  * Store.
189
183
  *
184
+ * This has schema-based typing. The following is a simplified representation:
185
+ *
186
+ * ```ts override
187
+ * {[tableId: Id]: Table};
188
+ * ```
189
+ *
190
190
  * A Tables object is used when setting all of the tables together with the
191
191
  * setTables method, and when getting them back out again with the getTables
192
192
  * method. A Tables object is a regular JavaScript object containing individual
@@ -221,6 +221,12 @@ export type Tables<
221
221
  /**
222
222
  * The Table type is the data structure representing the data in a single table.
223
223
  *
224
+ * This has schema-based typing. The following is a simplified representation:
225
+ *
226
+ * ```ts override
227
+ * {[rowId: Id]: Row};
228
+ * ```
229
+ *
224
230
  * A Table is used when setting a table with the setTable method, and when
225
231
  * getting it back out again with the getTable method. A Table object is a
226
232
  * regular JavaScript object containing individual Row objects, keyed by their
@@ -244,6 +250,12 @@ export type Table<
244
250
  /**
245
251
  * The Row type is the data structure representing the data in a single row.
246
252
  *
253
+ * This has schema-based typing. The following is a simplified representation:
254
+ *
255
+ * ```ts override
256
+ * {[cellId: Id]: Cell};
257
+ * ```
258
+ *
247
259
  * A Row is used when setting a row with the setRow method, and when getting it
248
260
  * back out again with the getRow method. A Row object is a regular JavaScript
249
261
  * object containing individual Cell objects, keyed by their Id.
@@ -283,6 +295,12 @@ export type Row<
283
295
  /**
284
296
  * The Cell type is the data structure representing the data in a single cell.
285
297
  *
298
+ * This has schema-based typing. The following is a simplified representation:
299
+ *
300
+ * ```ts override
301
+ * string | number | boolean;
302
+ * ```
303
+ *
286
304
  * A Cell is used when setting a cell with the setCell method, and when getting
287
305
  * it back out again with the getCell method. A Cell is a JavaScript string,
288
306
  * number, or boolean.
@@ -310,6 +328,12 @@ export type Cell<
310
328
  * The CellOrUndefined type is a data structure representing the data in a
311
329
  * single cell, or the value `undefined`.
312
330
  *
331
+ * This has schema-based typing. The following is a simplified representation:
332
+ *
333
+ * ```ts override
334
+ * Cell | undefined;
335
+ * ```
336
+ *
313
337
  * This is used when describing a Cell that is present _or_ that is not present,
314
338
  * such as when it has been deleted, or when describing a previous state where
315
339
  * the Cell value has since been added.
@@ -326,6 +350,12 @@ export type CellOrUndefined<
326
350
  * The Values type is the data structure representing all the keyed values in a
327
351
  * Store.
328
352
  *
353
+ * This has schema-based typing. The following is a simplified representation:
354
+ *
355
+ * ```ts override
356
+ * {[valueId: Id]: Value};
357
+ * ```
358
+ *
329
359
  * A Values object is used when setting values with the setValues method, and
330
360
  * when getting them back out again with the getValues method. A Values object
331
361
  * is a regular JavaScript object containing individual Value objects, keyed by
@@ -364,6 +394,12 @@ export type Values<
364
394
  * The Value type is the data structure representing the data in a single keyed
365
395
  * value.
366
396
  *
397
+ * This has schema-based typing. The following is a simplified representation:
398
+ *
399
+ * ```ts override
400
+ * string | number | boolean;
401
+ * ```
402
+ *
367
403
  * A Value is used when setting a value with the setValue method, and when
368
404
  * getting it back out again with the getValue method. A Value is a JavaScript
369
405
  * string, number, or boolean.
@@ -391,6 +427,12 @@ export type Value<
391
427
  * The ValueOrUndefined type is a data structure representing the data in a
392
428
  * single value, or the value `undefined`.
393
429
  *
430
+ * This has schema-based typing. The following is a simplified representation:
431
+ *
432
+ * ```ts override
433
+ * Value | undefined;
434
+ * ```
435
+ *
394
436
  * This is used when describing a Value that is present _or_ that is not
395
437
  * present, such as when it has been deleted, or when describing a previous
396
438
  * state where the Value has since been added.
@@ -407,6 +449,15 @@ export type ValueOrUndefined<
407
449
  * The TableCallback type describes a function that takes a Table's Id and a
408
450
  * callback to loop over each Row within it.
409
451
  *
452
+ * This has schema-based typing. The following is a simplified representation:
453
+ *
454
+ * ```ts override
455
+ * (
456
+ * tableId: Id,
457
+ * forEachRow: (rowCallback: RowCallback) => void,
458
+ * ) => void;
459
+ * ```
460
+ *
410
461
  * A TableCallback is provided when using the forEachTable method, so that you
411
462
  * can do something based on every Table in the Store. See that method for
412
463
  * specific examples.
@@ -434,6 +485,15 @@ export type TableCallback<
434
485
  * The RowCallback type describes a function that takes a Row's Id and a
435
486
  * callback to loop over each Cell within it.
436
487
  *
488
+ * This has schema-based typing. The following is a simplified representation:
489
+ *
490
+ * ```ts override
491
+ * (
492
+ * rowId: Id,
493
+ * forEachCell: (cellCallback: CellCallback) => void,
494
+ * ) => void;
495
+ * ```
496
+ *
437
497
  * A RowCallback is provided when using the forEachRow method, so that you can
438
498
  * do something based on every Row in a Table. See that method for specific
439
499
  * examples.
@@ -459,6 +519,12 @@ export type RowCallback<
459
519
  * The CellCallback type describes a function that takes a Cell's Id and its
460
520
  * value.
461
521
  *
522
+ * This has schema-based typing. The following is a simplified representation:
523
+ *
524
+ * ```ts override
525
+ * (cellId: Id, cell: Cell) => void;
526
+ * ```
527
+ *
462
528
  * A CellCallback is provided when using the forEachCell method, so that you can
463
529
  * do something based on every Cell in a Row. See that method for specific
464
530
  * examples.
@@ -491,6 +557,12 @@ export type CellCallback<
491
557
  * The ValueCallback type describes a function that takes a Value's Id and its
492
558
  * actual value.
493
559
  *
560
+ * This has schema-based typing. The following is a simplified representation:
561
+ *
562
+ * ```ts override
563
+ * (valueId: Id, value: Value) => void;
564
+ * ```
565
+ *
494
566
  * A ValueCallback is provided when using the forEachValue method, so that you
495
567
  * can do something based on every Value in a Store. See that method for
496
568
  * specific examples.
@@ -519,6 +591,12 @@ export type ValueCallback<
519
591
  * The MapCell type describes a function that takes an existing Cell value and
520
592
  * returns another.
521
593
  *
594
+ * This has schema-based typing. The following is a simplified representation:
595
+ *
596
+ * ```ts override
597
+ * (cell: CellOrUndefined) => Cell;
598
+ * ```
599
+ *
522
600
  * A MapCell can be provided in the setCell method to map an existing value to a
523
601
  * new one, such as when incrementing a number. See that method for specific
524
602
  * examples.
@@ -538,6 +616,12 @@ export type MapCell<
538
616
  * The MapValue type describes a function that takes an existing Value and
539
617
  * returns another.
540
618
  *
619
+ * This has schema-based typing. The following is a simplified representation:
620
+ *
621
+ * ```ts override
622
+ * (value: ValueOrUndefined) => Value;
623
+ * ```
624
+ *
541
625
  * A MapValue can be provided in the setValue method to map an existing Value to
542
626
  * a new one, such as when incrementing a number. See that method for specific
543
627
  * examples.
@@ -555,6 +639,12 @@ export type MapValue<
555
639
  * The GetCell type describes a function that takes a Id and returns the Cell
556
640
  * value for a particular Row.
557
641
  *
642
+ * This has schema-based typing. The following is a simplified representation:
643
+ *
644
+ * ```ts override
645
+ * (cellId: Id) => CellOrUndefined;
646
+ * ```
647
+ *
558
648
  * A GetCell can be provided when setting definitions, as in the
559
649
  * setMetricDefinition method of a Metrics object, or the setIndexDefinition
560
650
  * method of an Indexes object. See those methods for specific examples.
@@ -573,6 +663,17 @@ export type GetCell<
573
663
  * The DoRollback type describes a function that you can use to rollback the
574
664
  * transaction if it did not complete to your satisfaction.
575
665
  *
666
+ * This has schema-based typing. The following is a simplified representation:
667
+ *
668
+ * ```ts override
669
+ * (
670
+ * changedCells: ChangedCells,
671
+ * invalidCells: InvalidCells,
672
+ * changedValues: ChangedValues,
673
+ * invalidValues: InvalidValues,
674
+ * ) => boolean;
675
+ * ```
676
+ *
576
677
  * A DoRollback can be provided when calling the transaction method or the
577
678
  * finishTransaction method. See those methods for specific examples.
578
679
  *
@@ -599,6 +700,16 @@ export type DoRollback<Schemas extends OptionalSchemas> = (
599
700
  * The TransactionListener type describes a function that is used to listen to
600
701
  * the completion of a transaction for the Store.
601
702
  *
703
+ * This has schema-based typing. The following is a simplified representation:
704
+ *
705
+ * ```ts override
706
+ * (
707
+ * store: Store,
708
+ * cellsTouched: boolean,
709
+ * valuesTouched: boolean,
710
+ * ) => void;
711
+ * ```
712
+ *
602
713
  * A TransactionListener is provided when using the
603
714
  * addWillFinishTransactionListener and addDidFinishTransactionListener methods.
604
715
  * See those methods for specific examples.
@@ -631,6 +742,15 @@ export type TransactionListener<Schemas extends OptionalSchemas> = (
631
742
  * The TablesListener type describes a function that is used to listen to
632
743
  * changes to the whole Store.
633
744
  *
745
+ * This has schema-based typing. The following is a simplified representation:
746
+ *
747
+ * ```ts override
748
+ * (
749
+ * store: Store,
750
+ * getCellChange: GetCellChange | undefined,
751
+ * ) => void;
752
+ * ```
753
+ *
634
754
  * A TablesListener is provided when using the addTablesListener method. See
635
755
  * that method for specific examples.
636
756
  *
@@ -656,6 +776,12 @@ export type TablesListener<Schemas extends OptionalSchemas> = (
656
776
  * The TableIdsListener type describes a function that is used to listen to
657
777
  * changes to the Table Ids in the Store.
658
778
  *
779
+ * This has schema-based typing. The following is a simplified representation:
780
+ *
781
+ * ```ts override
782
+ * (store: Store) => void;
783
+ * ```
784
+ *
659
785
  * A TableIdsListener is provided when using the addTableIdsListener method. See
660
786
  * that method for specific examples.
661
787
  *
@@ -672,6 +798,16 @@ export type TableIdsListener<Schemas extends OptionalSchemas> = (
672
798
  * The TableListener type describes a function that is used to listen to changes
673
799
  * to a Table.
674
800
  *
801
+ * This has schema-based typing. The following is a simplified representation:
802
+ *
803
+ * ```ts override
804
+ * (
805
+ * store: Store,
806
+ * tableId: Id,
807
+ * getCellChange: GetCellChange | undefined,
808
+ * ) => void;
809
+ * ```
810
+ *
675
811
  * A TableListener is provided when using the addTableListener method. See that
676
812
  * method for specific examples.
677
813
  *
@@ -704,6 +840,12 @@ export type TableListener<
704
840
  * The RowIdsListener type describes a function that is used to listen to
705
841
  * changes to the Row Ids in a Table.
706
842
  *
843
+ * This has schema-based typing. The following is a simplified representation:
844
+ *
845
+ * ```ts override
846
+ * (store: Store, tableId: Id) => void;
847
+ * ```
848
+ *
707
849
  * A RowIdsListener is provided when using the addRowIdsListener method. See
708
850
  * that method for specific examples.
709
851
  *
@@ -728,6 +870,20 @@ export type RowIdsListener<
728
870
  * The SortedRowIdsListener type describes a function that is used to listen to
729
871
  * changes to sorted Row Ids in a Table.
730
872
  *
873
+ * This has schema-based typing. The following is a simplified representation:
874
+ *
875
+ * ```ts override
876
+ * (
877
+ * store: Store,
878
+ * tableId: Id,
879
+ * cellId: Id | undefined,
880
+ * descending: boolean,
881
+ * offset: number,
882
+ * limit: number | undefined,
883
+ * sortedRowIds: Ids,
884
+ * ) => void;
885
+ * ```
886
+ *
731
887
  * A SortedRowIdsListener is provided when using the addSortedRowIdsListener
732
888
  * method. See that method for specific examples.
733
889
  *
@@ -769,6 +925,17 @@ export type SortedRowIdsListener<
769
925
  * The RowListener type describes a function that is used to listen to changes
770
926
  * to a Row.
771
927
  *
928
+ * This has schema-based typing. The following is a simplified representation:
929
+ *
930
+ * ```ts override
931
+ * (
932
+ * store: Store,
933
+ * tableId: Id,
934
+ * rowId: Id,
935
+ * getCellChange: GetCellChange | undefined,
936
+ * ) => void;
937
+ * ```
938
+ *
772
939
  * A RowListener is provided when using the addRowListener method. See that
773
940
  * method for specific examples.
774
941
  *
@@ -805,6 +972,12 @@ export type RowListener<
805
972
  * The CellIdsListener type describes a function that is used to listen to
806
973
  * changes to the Cell Ids in a Row.
807
974
  *
975
+ * This has schema-based typing. The following is a simplified representation:
976
+ *
977
+ * ```ts override
978
+ * (store: Store, tableId: Id, rowId: Id) => void;
979
+ * ```
980
+ *
808
981
  * A CellIdsListener is provided when using the addCellIdsListener method. See
809
982
  * that method for specific examples.
810
983
  *
@@ -832,6 +1005,20 @@ export type CellIdsListener<
832
1005
  * The CellListener type describes a function that is used to listen to changes
833
1006
  * to a Cell.
834
1007
  *
1008
+ * This has schema-based typing. The following is a simplified representation:
1009
+ *
1010
+ * ```ts override
1011
+ * (
1012
+ * store: Store,
1013
+ * tableId: Id,
1014
+ * rowId: Id,
1015
+ * cellId: Id,
1016
+ * newCell: Cell,
1017
+ * oldCell: Cell,
1018
+ * getCellChange: GetCellChange | undefined,
1019
+ * ) => void;
1020
+ * ```
1021
+ *
835
1022
  * A CellListener is provided when using the addCellListener method. See that
836
1023
  * method for specific examples.
837
1024
  *
@@ -922,6 +1109,15 @@ export type CellListener<
922
1109
  * The ValuesListener type describes a function that is used to listen to
923
1110
  * changes to all the Values in a Store.
924
1111
  *
1112
+ * This has schema-based typing. The following is a simplified representation:
1113
+ *
1114
+ * ```ts override
1115
+ * (
1116
+ * store: Store,
1117
+ * getValueChange: GetValueChange | undefined,
1118
+ * ) => void;
1119
+ * ```
1120
+ *
925
1121
  * A ValuesListener is provided when using the addValuesListener method. See
926
1122
  * that method for specific examples.
927
1123
  *
@@ -947,6 +1143,12 @@ export type ValuesListener<Schemas extends OptionalSchemas> = (
947
1143
  * The ValueIdsListener type describes a function that is used to listen to
948
1144
  * changes to the Value Ids in a Store.
949
1145
  *
1146
+ * This has schema-based typing. The following is a simplified representation:
1147
+ *
1148
+ * ```ts override
1149
+ * (store: Store) => void;
1150
+ * ```
1151
+ *
950
1152
  * A ValueIdsListener is provided when using the addValueIdsListener method. See
951
1153
  * that method for specific examples.
952
1154
  *
@@ -963,6 +1165,18 @@ export type ValueIdsListener<Schemas extends OptionalSchemas> = (
963
1165
  * The ValueListener type describes a function that is used to listen to changes
964
1166
  * to a Value.
965
1167
  *
1168
+ * This has schema-based typing. The following is a simplified representation:
1169
+ *
1170
+ * ```ts override
1171
+ * (
1172
+ * store: Store,
1173
+ * valueId: Id,
1174
+ * newValue: Value,
1175
+ * oldValue: Value,
1176
+ * getValueChange: GetValueChange | undefined,
1177
+ * ) => void;
1178
+ * ```
1179
+ *
966
1180
  * A ValueListener is provided when using the addValueListener method. See that
967
1181
  * method for specific examples.
968
1182
  *
@@ -1027,6 +1241,18 @@ export type ValueListener<
1027
1241
  * The InvalidCellListener type describes a function that is used to listen to
1028
1242
  * attempts to set invalid data to a Cell.
1029
1243
  *
1244
+ * This has schema-based typing. The following is a simplified representation:
1245
+ *
1246
+ * ```ts override
1247
+ * (
1248
+ * store: Store,
1249
+ * tableId: Id,
1250
+ * rowId: Id,
1251
+ * cellId: Id,
1252
+ * invalidCells: any[],
1253
+ * ) => void;
1254
+ * ```
1255
+ *
1030
1256
  * A InvalidCellListener is provided when using the addInvalidCellListener
1031
1257
  * method. See that method for specific examples.
1032
1258
  *
@@ -1057,6 +1283,16 @@ export type InvalidCellListener<Schemas extends OptionalSchemas> = (
1057
1283
  * The InvalidValueListener type describes a function that is used to listen to
1058
1284
  * attempts to set invalid data to a Value.
1059
1285
  *
1286
+ * This has schema-based typing. The following is a simplified representation:
1287
+ *
1288
+ * ```ts override
1289
+ * (
1290
+ * store: Store,
1291
+ * valueId: Id,
1292
+ * invalidValues: any[],
1293
+ * ) => void;
1294
+ * ```
1295
+ *
1060
1296
  * A InvalidValueListener is provided when using the addInvalidValueListener
1061
1297
  * method. See that method for specific examples.
1062
1298
  *
@@ -1083,6 +1319,12 @@ export type InvalidValueListener<Schemas extends OptionalSchemas> = (
1083
1319
  * The GetCellChange type describes a function that returns information about
1084
1320
  * any Cell's changes during a transaction.
1085
1321
  *
1322
+ * This has schema-based typing. The following is a simplified representation:
1323
+ *
1324
+ * ```ts override
1325
+ * (tableId: Id, rowId: Id, cellId: Id) => CellChange;
1326
+ * ```
1327
+ *
1086
1328
  * A GetCellChange function is provided to every listener when called due the
1087
1329
  * Store changing. The listener can then fetch the previous value of a Cell
1088
1330
  * before the current transaction, the new value after it, and a convenience
@@ -1106,6 +1348,16 @@ export type GetCellChange<Schema extends OptionalTablesSchema> = <
1106
1348
  /**
1107
1349
  * The CellChange type describes a Cell's changes during a transaction.
1108
1350
  *
1351
+ * This has schema-based typing. The following is a simplified representation:
1352
+ *
1353
+ * ```ts override
1354
+ * [
1355
+ * changed: boolean,
1356
+ * oldCell: CellOrUndefined,
1357
+ * newCell: CellOrUndefined,
1358
+ * ];
1359
+ * ```
1360
+ *
1109
1361
  * This is returned by the GetCellChange function that is provided to every
1110
1362
  * listener when called. This array contains the previous value of a Cell before
1111
1363
  * the current transaction, the new value after it, and a convenience flag that
@@ -1124,6 +1376,12 @@ export type CellChange<
1124
1376
  * The GetValueChange type describes a function that returns information about
1125
1377
  * any Value's changes during a transaction.
1126
1378
  *
1379
+ * This has schema-based typing. The following is a simplified representation:
1380
+ *
1381
+ * ```ts override
1382
+ * (valueId: Id) => ValueChange;
1383
+ * ```
1384
+ *
1127
1385
  * A GetValueChange function is provided to every listener when called due the
1128
1386
  * Store changing. The listener can then fetch the previous value of a Value
1129
1387
  * before the current transaction, the new value after it, and a convenience
@@ -1143,6 +1401,16 @@ export type GetValueChange<Schema extends OptionalValuesSchema> = <
1143
1401
  /**
1144
1402
  * The ValueChange type describes a Value's changes during a transaction.
1145
1403
  *
1404
+ * This has schema-based typing. The following is a simplified representation:
1405
+ *
1406
+ * ```ts override
1407
+ * [
1408
+ * changed: boolean,
1409
+ * oldValue: ValueOrUndefined,
1410
+ * newValue: ValueOrUndefined,
1411
+ * ];
1412
+ * ```
1413
+ *
1146
1414
  * This is returned by the GetValueChange function that is provided to every
1147
1415
  * listener when called. This array contains the previous value of a Value
1148
1416
  * before the current transaction, the new value after it, and a convenience
@@ -1161,6 +1429,18 @@ export type ValueChange<
1161
1429
  * a transaction, primarily used so that you can indicate whether the
1162
1430
  * transaction should be rolled back.
1163
1431
  *
1432
+ * This has schema-based typing. The following is a simplified representation:
1433
+ *
1434
+ * ```ts override
1435
+ * {
1436
+ * [tableId: Id]: {
1437
+ * [rowId: Id]: {
1438
+ * [cellId: Id]: [CellOrUndefined, CellOrUndefined];
1439
+ * };
1440
+ * };
1441
+ * };
1442
+ * ```
1443
+ *
1164
1444
  * A ChangedCells object is provided to the `doRollback` callback when using the
1165
1445
  * transaction method and the finishTransaction method. See those methods for
1166
1446
  * specific examples.
@@ -1222,6 +1502,14 @@ export type InvalidCells = {
1222
1502
  * transaction, primarily used so that you can indicate whether the transaction
1223
1503
  * should be rolled back.
1224
1504
  *
1505
+ * This has schema-based typing. The following is a simplified representation:
1506
+ *
1507
+ * ```ts override
1508
+ * {
1509
+ * [valueId: Id]: [ValueOrUndefined, ValueOrUndefined];
1510
+ * };
1511
+ * ```
1512
+ *
1225
1513
  * A ChangedValues object is provided to the `doRollback` callback when using
1226
1514
  * the transaction method and the finishTransaction method. See those methods
1227
1515
  * for specific examples.
@@ -1526,6 +1814,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
1526
1814
  * The getTables method returns a Tables object containing the entire data of
1527
1815
  * the Store.
1528
1816
  *
1817
+ * This has schema-based typing. The following is a simplified representation:
1818
+ *
1819
+ * ```ts override
1820
+ * getTables(): Tables;
1821
+ * ```
1822
+ *
1529
1823
  * Note that this returns a copy of, rather than a reference to the underlying
1530
1824
  * data, so changes made to the returned object are not made to the Store
1531
1825
  * itself.
@@ -1558,6 +1852,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
1558
1852
  /**
1559
1853
  * The getTableIds method returns the Ids of every Table in the Store.
1560
1854
  *
1855
+ * This has schema-based typing. The following is a simplified representation:
1856
+ *
1857
+ * ```ts override
1858
+ * getTableIds(): Ids;
1859
+ * ```
1860
+ *
1561
1861
  * Note that this returns a copy of, rather than a reference, to the list of
1562
1862
  * Ids, so changes made to the list are not made to the Store itself.
1563
1863
  *
@@ -1590,6 +1890,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
1590
1890
  * The getTable method returns an object containing the entire data of a
1591
1891
  * single Table in the Store.
1592
1892
  *
1893
+ * This has schema-based typing. The following is a simplified representation:
1894
+ *
1895
+ * ```ts override
1896
+ * getTable(tableId: Id): Table;
1897
+ * ```
1898
+ *
1593
1899
  * Note that this returns a copy of, rather than a reference to the underlying
1594
1900
  * data, so changes made to the returned object are not made to the Store
1595
1901
  * itself.
@@ -1625,6 +1931,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
1625
1931
  /**
1626
1932
  * The getRowIds method returns the Ids of every Row in a given Table.
1627
1933
  *
1934
+ * This has schema-based typing. The following is a simplified representation:
1935
+ *
1936
+ * ```ts override
1937
+ * getRowIds(tableId: Id): Ids;
1938
+ * ```
1939
+ *
1628
1940
  * Note that this returns a copy of, rather than a reference, to the list of
1629
1941
  * Ids, so changes made to the list are not made to the Store itself.
1630
1942
  *
@@ -1660,6 +1972,18 @@ export interface Store<in out Schemas extends OptionalSchemas> {
1660
1972
  * The getSortedRowIds method returns the Ids of every Row in a given Table,
1661
1973
  * sorted according to the values in a specified Cell.
1662
1974
  *
1975
+ * This has schema-based typing. The following is a simplified representation:
1976
+ *
1977
+ * ```ts override
1978
+ * getSortedRowIds(
1979
+ * tableId: Id,
1980
+ * cellId?: Id,
1981
+ * descending?: boolean,
1982
+ * offset?: number,
1983
+ * limit?: number,
1984
+ * ): Ids;
1985
+ * ```
1986
+ *
1663
1987
  * The sorting of the rows is alphanumeric, and you can indicate whether it
1664
1988
  * should be in descending order. The `offset` and `limit` parameters are used
1665
1989
  * to paginate results, but default to `0` and `undefined` to return all
@@ -1767,6 +2091,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
1767
2091
  * The getRow method returns an object containing the entire data of a single
1768
2092
  * Row in a given Table.
1769
2093
  *
2094
+ * This has schema-based typing. The following is a simplified representation:
2095
+ *
2096
+ * ```ts override
2097
+ * getRow(tableId: Id, rowId: Id): Row;
2098
+ * ```
2099
+ *
1770
2100
  * Note that this returns a copy of, rather than a reference to the underlying
1771
2101
  * data, so changes made to the returned object are not made to the Store
1772
2102
  * itself.
@@ -1807,6 +2137,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
1807
2137
  * The getCellIds method returns the Ids of every Cell in a given Row, in a
1808
2138
  * given Table.
1809
2139
  *
2140
+ * This has schema-based typing. The following is a simplified representation:
2141
+ *
2142
+ * ```ts override
2143
+ * getCellIds(tableId: Id, rowId: Id): Ids;
2144
+ * ```
2145
+ *
1810
2146
  * Note that this returns a copy of, rather than a reference, to the list of
1811
2147
  * Ids, so changes made to the list are not made to the Store itself.
1812
2148
  *
@@ -1845,6 +2181,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
1845
2181
  * The getCell method returns the value of a single Cell in a given Row, in a
1846
2182
  * given Table.
1847
2183
  *
2184
+ * This has schema-based typing. The following is a simplified representation:
2185
+ *
2186
+ * ```ts override
2187
+ * getCell(tableId: Id, rowId: Id, cellId: Id): CellOrUndefined;
2188
+ * ```
2189
+ *
1848
2190
  * @param tableId The Id of the Table in the Store.
1849
2191
  * @param rowId The Id of the Row in the Table.
1850
2192
  * @param cellId The Id of the Cell in the Row.
@@ -1882,6 +2224,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
1882
2224
  * The getValues method returns an object containing the entire set of keyed
1883
2225
  * Values in the Store.
1884
2226
  *
2227
+ * This has schema-based typing. The following is a simplified representation:
2228
+ *
2229
+ * ```ts override
2230
+ * getValues(): Values;
2231
+ * ```
2232
+ *
1885
2233
  * Note that this returns a copy of, rather than a reference to the underlying
1886
2234
  * data, so changes made to the returned object are not made to the Store
1887
2235
  * itself.
@@ -1912,6 +2260,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
1912
2260
  /**
1913
2261
  * The getValueIds method returns the Ids of every Value in a Store.
1914
2262
  *
2263
+ * This has schema-based typing. The following is a simplified representation:
2264
+ *
2265
+ * ```ts override
2266
+ * getValueIds(): Ids;
2267
+ * ```
2268
+ *
1915
2269
  * Note that this returns a copy of, rather than a reference, to the list of
1916
2270
  * Ids, so changes made to the list are not made to the Store itself.
1917
2271
  *
@@ -1941,6 +2295,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
1941
2295
  /**
1942
2296
  * The getValue method returns a single keyed Value in the Store.
1943
2297
  *
2298
+ * This has schema-based typing. The following is a simplified representation:
2299
+ *
2300
+ * ```ts override
2301
+ * getValue(valueId: Id): ValueOrUndefined;
2302
+ * ```
2303
+ *
1944
2304
  * @param valueId The Id of the Value in the Store.
1945
2305
  * @returns The Value, or `undefined`.
1946
2306
  * @example
@@ -1990,6 +2350,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
1990
2350
  * The hasTable method returns a boolean indicating whether a given Table
1991
2351
  * exists in the Store.
1992
2352
  *
2353
+ * This has schema-based typing. The following is a simplified representation:
2354
+ *
2355
+ * ```ts override
2356
+ * hasTable(tableId: Id): boolean;
2357
+ * ```
2358
+ *
1993
2359
  * @param tableId The Id of a possible Table in the Store.
1994
2360
  * @returns Whether a Table with that Id exists.
1995
2361
  * @example
@@ -2010,6 +2376,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2010
2376
  * The hasRow method returns a boolean indicating whether a given Row exists
2011
2377
  * in the Store.
2012
2378
  *
2379
+ * This has schema-based typing. The following is a simplified representation:
2380
+ *
2381
+ * ```ts override
2382
+ * hasRow(tableId: Id, rowId: Id): boolean;
2383
+ * ```
2384
+ *
2013
2385
  * @param tableId The Id of a possible Table in the Store.
2014
2386
  * @param rowId The Id of a possible Row in the Table.
2015
2387
  * @returns Whether a Row with that Id exists in that Table.
@@ -2031,6 +2403,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2031
2403
  * The hasCell method returns a boolean indicating whether a given Cell exists
2032
2404
  * in the Store.
2033
2405
  *
2406
+ * This has schema-based typing. The following is a simplified representation:
2407
+ *
2408
+ * ```ts override
2409
+ * hasCell(tableId: Id, rowId: Id, cellId: Id): boolean;
2410
+ * ```
2411
+ *
2034
2412
  * @param tableId The Id of a possible Table in the Store.
2035
2413
  * @param rowId The Id of a possible Row in the Table.
2036
2414
  * @param cellId The Id of a possible Cell in the Row.
@@ -2078,6 +2456,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2078
2456
  * The hasValue method returns a boolean indicating whether a given Value
2079
2457
  * exists in the Store.
2080
2458
  *
2459
+ * This has schema-based typing. The following is a simplified representation:
2460
+ *
2461
+ * ```ts override
2462
+ * hasValue(valueId: Id): boolean;
2463
+ * ```
2464
+ *
2081
2465
  * @param valueId The Id of a possible Value in the Store.
2082
2466
  * @returns Whether a Value with that Id exists in the Store.
2083
2467
  * @example
@@ -2289,6 +2673,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2289
2673
  /**
2290
2674
  * The setTables method takes an object and sets the entire data of the Store.
2291
2675
  *
2676
+ * This has schema-based typing. The following is a simplified representation:
2677
+ *
2678
+ * ```ts override
2679
+ * setTables(tables: Tables): Store;
2680
+ * ```
2681
+ *
2292
2682
  * This method will cause listeners to be called for any Table, Row, Cell, or
2293
2683
  * Id changes resulting from it.
2294
2684
  *
@@ -2338,6 +2728,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2338
2728
  * The setTable method takes an object and sets the entire data of a single
2339
2729
  * Table in the Store.
2340
2730
  *
2731
+ * This has schema-based typing. The following is a simplified representation:
2732
+ *
2733
+ * ```ts override
2734
+ * setTable(tableId: Id, table: Table): Store;
2735
+ * ```
2736
+ *
2341
2737
  * This method will cause listeners to be called for any Table, Row, Cell, or
2342
2738
  * Id changes resulting from it.
2343
2739
  *
@@ -2392,6 +2788,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2392
2788
  * The setRow method takes an object and sets the entire data of a single Row
2393
2789
  * in the Store.
2394
2790
  *
2791
+ * This has schema-based typing. The following is a simplified representation:
2792
+ *
2793
+ * ```ts override
2794
+ * setRow(tableId: Id, rowId: Id, row: Row): Store;
2795
+ * ```
2796
+ *
2395
2797
  * This method will cause listeners to be called for any Table, Row, Cell, or
2396
2798
  * Id changes resulting from it.
2397
2799
  *
@@ -2446,6 +2848,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2446
2848
  * The addRow method takes an object and creates a new Row in the Store,
2447
2849
  * returning the unique Id assigned to it.
2448
2850
  *
2851
+ * This has schema-based typing. The following is a simplified representation:
2852
+ *
2853
+ * ```ts override
2854
+ * addRow(tableId: Id, row: Row): Id | undefined;
2855
+ * ```
2856
+ *
2449
2857
  * This method will cause listeners to be called for any Table, Row, Cell, or
2450
2858
  * Id changes resulting from it.
2451
2859
  *
@@ -2502,6 +2910,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2502
2910
  * The setPartialRow method takes an object and sets partial data of a single
2503
2911
  * Row in the Store, leaving other Cell values unaffected.
2504
2912
  *
2913
+ * This has schema-based typing. The following is a simplified representation:
2914
+ *
2915
+ * ```ts override
2916
+ * setPartialRow(tableId: Id, rowId: Id, partialRow: Row): Store;
2917
+ * ```
2918
+ *
2505
2919
  * This method will cause listeners to be called for any Table, Row, Cell, or
2506
2920
  * Id changes resulting from it.
2507
2921
  *
@@ -2557,6 +2971,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2557
2971
  /**
2558
2972
  * The setCell method sets the value of a single Cell in the Store.
2559
2973
  *
2974
+ * This has schema-based typing. The following is a simplified representation:
2975
+ *
2976
+ * ```ts override
2977
+ * setCell(tableId: Id, rowId: Id, cellId: Id, cell: Cell | MapCell): Store;
2978
+ * ```
2979
+ *
2560
2980
  * This method will cause listeners to be called for any Table, Row, Cell, or
2561
2981
  * Id changes resulting from it.
2562
2982
  *
@@ -2625,6 +3045,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2625
3045
  /**
2626
3046
  * The setValues method takes an object and sets all the Values in the Store.
2627
3047
  *
3048
+ * This has schema-based typing. The following is a simplified representation:
3049
+ *
3050
+ * ```ts override
3051
+ * setValues(values: Values): Store;
3052
+ * ```
3053
+ *
2628
3054
  * This method will cause listeners to be called for any Value or Id changes
2629
3055
  * resulting from it.
2630
3056
  *
@@ -2674,6 +3100,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2674
3100
  * The setPartialValues method takes an object and sets its Values in the
2675
3101
  * Store, but leaving existing Values unaffected.
2676
3102
  *
3103
+ * This has schema-based typing. The following is a simplified representation:
3104
+ *
3105
+ * ```ts override
3106
+ * setPartialValues(partialValues: Values): Store;
3107
+ * ```
3108
+ *
2677
3109
  * This method will cause listeners to be called for any Values or Id changes
2678
3110
  * resulting from it.
2679
3111
  *
@@ -2723,6 +3155,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2723
3155
  /**
2724
3156
  * The setValue method sets a single keyed Value in the Store.
2725
3157
  *
3158
+ * This has schema-based typing. The following is a simplified representation:
3159
+ *
3160
+ * ```ts override
3161
+ * setValue(valueId: Id, value: Value | MapValue): Store;
3162
+ * ```
3163
+ *
2726
3164
  * This method will cause listeners to be called for any Value, or Id changes
2727
3165
  * resulting from it.
2728
3166
  *
@@ -2781,6 +3219,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2781
3219
  * The setTablesJson method takes a string serialization of all of the Tables
2782
3220
  * in the Store and attempts to update them to that.
2783
3221
  *
3222
+ * This has schema-based typing. The following is a simplified representation:
3223
+ *
3224
+ * ```ts override
3225
+ * setTablesJson(tablesJson: Json): Store;
3226
+ * ```
3227
+ *
2784
3228
  * If the JSON cannot be parsed, this will fail silently. If it can be parsed,
2785
3229
  * it will then be subject to the same validation rules as the setTables
2786
3230
  * method (according to the Tables type, and matching any TablesSchema
@@ -2816,6 +3260,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2816
3260
  * The setValuesJson method takes a string serialization of all of the Values
2817
3261
  * in the Store and attempts to update them to those values.
2818
3262
  *
3263
+ * This has schema-based typing. The following is a simplified representation:
3264
+ *
3265
+ * ```ts override
3266
+ * setValuesJson(valuesJson: Json): Store;
3267
+ * ```
3268
+ *
2819
3269
  * If the JSON cannot be parsed, this will fail silently. If it can be parsed,
2820
3270
  * it will then be subject to the same validation rules as the setValues
2821
3271
  * method (according to the Values type, and matching any ValuesSchema
@@ -2851,6 +3301,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2851
3301
  * The setJson method takes a string serialization of all of the Tables and
2852
3302
  * Values in the Store and attempts to update them to those values.
2853
3303
  *
3304
+ * This has schema-based typing. The following is a simplified representation:
3305
+ *
3306
+ * ```ts override
3307
+ * setJson(tablesAndValuesJson: Json): Store;
3308
+ * ```
3309
+ *
2854
3310
  * From v3.0.0 onwards, the serialization should be of an array with two
2855
3311
  * entries. The first is the Tables object, the second the Values. In previous
2856
3312
  * versions (before the existence of the Values data structure), it was a sole
@@ -2910,6 +3366,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2910
3366
  * The setTablesSchema method lets you specify the TablesSchema of the tabular
2911
3367
  * part of the Store.
2912
3368
  *
3369
+ * This has schema-based typing. The following is a simplified representation:
3370
+ *
3371
+ * ```ts override
3372
+ * setTablesSchema(tablesSchema: TablesSchema): Store;
3373
+ * ```
3374
+ *
2913
3375
  * Note that this may result in a change to data in the Store, as defaults are
2914
3376
  * applied or as invalid Table, Row, or Cell objects are removed. These
2915
3377
  * changes will fire any listeners to that data, as expected.
@@ -2945,6 +3407,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2945
3407
  * The setValuesSchema method lets you specify the ValuesSchema of the keyed
2946
3408
  * Values part of the Store.
2947
3409
  *
3410
+ * This has schema-based typing. The following is a simplified representation:
3411
+ *
3412
+ * ```ts override
3413
+ * setValuesSchema(valuesSchema: ValuesSchema): Store;
3414
+ * ```
3415
+ *
2948
3416
  * Note that this may result in a change to data in the Store, as defaults are
2949
3417
  * applied or as invalid Values are removed. These changes will fire any
2950
3418
  * listeners to that data, as expected.
@@ -2977,6 +3445,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
2977
3445
  * The setSchema method lets you specify the TablesSchema and ValuesSchema of
2978
3446
  * the Store.
2979
3447
  *
3448
+ * This has schema-based typing. The following is a simplified representation:
3449
+ *
3450
+ * ```ts override
3451
+ * setSchema(tablesSchema: TablesSchema, valuesSchema?: ValuesSchema): Store;
3452
+ * ```
3453
+ *
2980
3454
  * Note that this may result in a change to data in the Store, as defaults are
2981
3455
  * applied or as invalid Table, Row, Cell, or Value objects are removed. These
2982
3456
  * changes will fire any listeners to that data, as expected.
@@ -3045,6 +3519,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3045
3519
  /**
3046
3520
  * The delTables method lets you remove all of the data in a Store.
3047
3521
  *
3522
+ * This has schema-based typing. The following is a simplified representation:
3523
+ *
3524
+ * ```ts override
3525
+ * delTables(): Store;
3526
+ * ```
3527
+ *
3048
3528
  * @returns A reference to the Store.
3049
3529
  * @example
3050
3530
  * This example removes the data of a Store.
@@ -3063,6 +3543,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3063
3543
  /**
3064
3544
  * The delTable method lets you remove a single Table from the Store.
3065
3545
  *
3546
+ * This has schema-based typing. The following is a simplified representation:
3547
+ *
3548
+ * ```ts override
3549
+ * delTable(tableId: Id): Store;
3550
+ * ```
3551
+ *
3066
3552
  * @param tableId The Id of the Table in the Store.
3067
3553
  * @returns A reference to the Store.
3068
3554
  * @example
@@ -3085,6 +3571,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3085
3571
  /**
3086
3572
  * The delRow method lets you remove a single Row from a Table.
3087
3573
  *
3574
+ * This has schema-based typing. The following is a simplified representation:
3575
+ *
3576
+ * ```ts override
3577
+ * delRow(tableId: Id, rowId: Id): Store;
3578
+ * ```
3579
+ *
3088
3580
  * If this is the last Row in its Table, then that Table will be removed.
3089
3581
  *
3090
3582
  * @param tableId The Id of the Table in the Store.
@@ -3109,6 +3601,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3109
3601
  /**
3110
3602
  * The delCell method lets you remove a single Cell from a Row.
3111
3603
  *
3604
+ * This has schema-based typing. The following is a simplified representation:
3605
+ *
3606
+ * ```ts override
3607
+ * delCell(tableId: Id, rowId: Id, cellId: Id, forceDel?: boolean): Store;
3608
+ * ```
3609
+ *
3112
3610
  * When there is no TablesSchema applied to the Store, then if this is the
3113
3611
  * last Cell in its Row, then that Row will be removed. If, in turn, that is
3114
3612
  * the last Row in its Table, then that Table will be removed.
@@ -3198,6 +3696,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3198
3696
  /**
3199
3697
  * The delValues method lets you remove all the Values from a Store.
3200
3698
  *
3699
+ * This has schema-based typing. The following is a simplified representation:
3700
+ *
3701
+ * ```ts override
3702
+ * delValues(): Store;
3703
+ * ```
3704
+ *
3201
3705
  * If there is a ValuesSchema applied to the Store and it specifies a default
3202
3706
  * value for any Value Id, then deletion will result in it being set back to
3203
3707
  * its default value.
@@ -3237,6 +3741,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3237
3741
  /**
3238
3742
  * The delValue method lets you remove a single Value from a Store.
3239
3743
  *
3744
+ * This has schema-based typing. The following is a simplified representation:
3745
+ *
3746
+ * ```ts override
3747
+ * delValue(valueId: Id): Store;
3748
+ * ```
3749
+ *
3240
3750
  * If there is a ValuesSchema applied to the Store and it specifies a default
3241
3751
  * value for this Value Id, then deletion will result in it being set back to
3242
3752
  * its default value.
@@ -3277,6 +3787,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3277
3787
  /**
3278
3788
  * The delTablesSchema method lets you remove the TablesSchema of the Store.
3279
3789
  *
3790
+ * This has schema-based typing. The following is a simplified representation:
3791
+ *
3792
+ * ```ts override
3793
+ * delTablesSchema(): Store;
3794
+ * ```
3795
+ *
3280
3796
  * @returns A reference to the Store.
3281
3797
  * @example
3282
3798
  * This example removes the TablesSchema of a Store.
@@ -3298,6 +3814,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3298
3814
  /**
3299
3815
  * The delValuesSchema method lets you remove the ValuesSchema of the Store.
3300
3816
  *
3817
+ * This has schema-based typing. The following is a simplified representation:
3818
+ *
3819
+ * ```ts override
3820
+ * delValuesSchema(): Store;
3821
+ * ```
3822
+ *
3301
3823
  * @returns A reference to the Store.
3302
3824
  * @example
3303
3825
  * This example removes the ValuesSchema of a Store.
@@ -3321,6 +3843,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3321
3843
  * The delSchema method lets you remove both the TablesSchema and ValuesSchema
3322
3844
  * of the Store.
3323
3845
  *
3846
+ * This has schema-based typing. The following is a simplified representation:
3847
+ *
3848
+ * ```ts override
3849
+ * delSchema(): Store;
3850
+ * ```
3851
+ *
3324
3852
  * Prior to v3.0.0, this method removed the TablesSchema only.
3325
3853
  *
3326
3854
  * @returns A reference to the Store.
@@ -3349,6 +3877,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3349
3877
  * the Store, buffering all calls to the relevant listeners until it
3350
3878
  * completes.
3351
3879
  *
3880
+ * This has schema-based typing. The following is a simplified representation:
3881
+ *
3882
+ * ```ts override
3883
+ * transaction<Return>(actions: () => Return, doRollback?: DoRollback): Return;
3884
+ * ```
3885
+ *
3352
3886
  * This method is useful for making bulk changes to the data in a Store, and
3353
3887
  * when you don't want listeners to be called as you make each change. Changes
3354
3888
  * are made silently during the transaction, and listeners relevant to the
@@ -3481,6 +4015,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3481
4015
  * relevant listeners until it completes when you call the finishTransaction
3482
4016
  * method.
3483
4017
  *
4018
+ * This has schema-based typing. The following is a simplified representation:
4019
+ *
4020
+ * ```ts override
4021
+ * startTransaction(): Store;
4022
+ * ```
4023
+ *
3484
4024
  * Transactions are useful for making bulk changes to the data in a Store, and
3485
4025
  * when you don't want listeners to be called as you make each change. Changes
3486
4026
  * are made silently during the transaction, and listeners relevant to the
@@ -3531,6 +4071,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3531
4071
  * that has made multiple mutations to the Store, triggering all calls to the
3532
4072
  * relevant listeners.
3533
4073
  *
4074
+ * This has schema-based typing. The following is a simplified representation:
4075
+ *
4076
+ * ```ts override
4077
+ * finishTransaction(doRollback?: DoRollback): Store;
4078
+ * ```
4079
+ *
3534
4080
  * Transactions are useful for making bulk changes to the data in a Store, and
3535
4081
  * when you don't want listeners to be called as you make each change. Changes
3536
4082
  * are made silently during the transaction, and listeners relevant to the
@@ -3628,6 +4174,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3628
4174
  * The forEachTable method takes a function that it will then call for each
3629
4175
  * Table in the Store.
3630
4176
  *
4177
+ * This has schema-based typing. The following is a simplified representation:
4178
+ *
4179
+ * ```ts override
4180
+ * forEachTable(tableCallback: TableCallback): void;
4181
+ * ```
4182
+ *
3631
4183
  * This method is useful for iterating over the Table structure of the Store
3632
4184
  * in a functional style. The `tableCallback` parameter is a TableCallback
3633
4185
  * function that will be called with the Id of each Table, and with a function
@@ -3661,6 +4213,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3661
4213
  * The forEachRow method takes a function that it will then call for each Row
3662
4214
  * in a specified Table.
3663
4215
  *
4216
+ * This has schema-based typing. The following is a simplified representation:
4217
+ *
4218
+ * ```ts override
4219
+ * forEachRow(tableId: Id, rowCallback: RowCallback): void;
4220
+ * ```
4221
+ *
3664
4222
  * This method is useful for iterating over the Row structure of the Table in
3665
4223
  * a functional style. The `rowCallback` parameter is a RowCallback function
3666
4224
  * that will be called with the Id of each Row, and with a function that can
@@ -3699,6 +4257,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3699
4257
  * The forEachCell method takes a function that it will then call for each
3700
4258
  * Cell in a specified Row.
3701
4259
  *
4260
+ * This has schema-based typing. The following is a simplified representation:
4261
+ *
4262
+ * ```ts override
4263
+ * forEachCell(tableId: Id, rowId: Id, cellCallback: CellCallback): void;
4264
+ * ```
4265
+ *
3702
4266
  * This method is useful for iterating over the Cell structure of the Row in a
3703
4267
  * functional style. The `cellCallback` parameter is a CellCallback function
3704
4268
  * that will be called with the Id and value of each Cell.
@@ -3731,6 +4295,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3731
4295
  * The forEachValue method takes a function that it will then call for each
3732
4296
  * Value in a Store.
3733
4297
  *
4298
+ * This has schema-based typing. The following is a simplified representation:
4299
+ *
4300
+ * ```ts override
4301
+ * forEachValue(valueCallback: ValueCallback): void;
4302
+ * ```
4303
+ *
3734
4304
  * This method is useful for iterating over the Value structure of the Store
3735
4305
  * in a functional style. The `valueCallback` parameter is a ValueCallback
3736
4306
  * function that will be called with the Id and value of each Value.
@@ -3756,6 +4326,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3756
4326
  * The addTablesListener method registers a listener function with the Store
3757
4327
  * that will be called whenever data in the Store changes.
3758
4328
  *
4329
+ * This has schema-based typing. The following is a simplified representation:
4330
+ *
4331
+ * ```ts override
4332
+ * addTablesListener(listener: TablesListener, mutator?: boolean): Id;
4333
+ * ```
4334
+ *
3759
4335
  * The provided listener is a TablesListener function, and will be called with
3760
4336
  * a reference to the Store and a GetCellChange function in case you need to
3761
4337
  * inspect any changes that occurred.
@@ -3820,6 +4396,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3820
4396
  * The addTableIdsListener method registers a listener function with the Store
3821
4397
  * that will be called whenever the Table Ids in the Store change.
3822
4398
  *
4399
+ * This has schema-based typing. The following is a simplified representation:
4400
+ *
4401
+ * ```ts override
4402
+ * addTableIdsListener(listener: TableIdsListener, mutator?: boolean): Id;
4403
+ * ```
4404
+ *
3823
4405
  * The provided listener is a TableIdsListener function, and will be called
3824
4406
  * with a reference to the Store.
3825
4407
  *
@@ -3886,6 +4468,16 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3886
4468
  * The addTableListener method registers a listener function with the Store
3887
4469
  * that will be called whenever data in a Table changes.
3888
4470
  *
4471
+ * This has schema-based typing. The following is a simplified representation:
4472
+ *
4473
+ * ```ts override
4474
+ * addTableListener(
4475
+ * tableId: IdOrNull,
4476
+ * listener: TableListener,
4477
+ * mutator?: boolean,
4478
+ * ): Id;
4479
+ * ```
4480
+ *
3889
4481
  * The provided listener is a TableListener function, and will be called with
3890
4482
  * a reference to the Store, the Id of the Table that changed, and a
3891
4483
  * GetCellChange function in case you need to inspect any changes that
@@ -3983,6 +4575,16 @@ export interface Store<in out Schemas extends OptionalSchemas> {
3983
4575
  * The addRowIdsListener method registers a listener function with the Store
3984
4576
  * that will be called whenever the Row Ids in a Table change.
3985
4577
  *
4578
+ * This has schema-based typing. The following is a simplified representation:
4579
+ *
4580
+ * ```ts override
4581
+ * addRowIdsListener(
4582
+ * tableId: IdOrNull,
4583
+ * listener: RowIdsListener,
4584
+ * mutator?: boolean,
4585
+ * ): Id;
4586
+ * ```
4587
+ *
3986
4588
  * The provided listener is a RowIdsListener function, and will be called with
3987
4589
  * a reference to the Store and the Id of the Table that changed.
3988
4590
  *
@@ -4076,6 +4678,20 @@ export interface Store<in out Schemas extends OptionalSchemas> {
4076
4678
  * Store that will be called whenever sorted (and optionally, paginated) Row
4077
4679
  * Ids in a Table change.
4078
4680
  *
4681
+ * This has schema-based typing. The following is a simplified representation:
4682
+ *
4683
+ * ```ts override
4684
+ * addSortedRowIdsListener(
4685
+ * tableId: Id,
4686
+ * cellId: Id | undefined,
4687
+ * descending: boolean,
4688
+ * offset: number,
4689
+ * limit: number | undefined,
4690
+ * listener: SortedRowIdsListener,
4691
+ * mutator?: boolean,
4692
+ * ): Id;
4693
+ * ```
4694
+ *
4079
4695
  * The provided listener is a SortedRowIdsListener function, and will be
4080
4696
  * called with a reference to the Store, the Id of the Table whose Row Ids
4081
4697
  * sorting changed, the Cell Id being used to sort them, whether descending or
@@ -4314,6 +4930,17 @@ export interface Store<in out Schemas extends OptionalSchemas> {
4314
4930
  * The addRowListener method registers a listener function with the Store that
4315
4931
  * will be called whenever data in a Row changes.
4316
4932
  *
4933
+ * This has schema-based typing. The following is a simplified representation:
4934
+ *
4935
+ * ```ts override
4936
+ * addRowListener(
4937
+ * tableId: IdOrNull,
4938
+ * rowId: IdOrNull,
4939
+ * listener: RowListener,
4940
+ * mutator?: boolean,
4941
+ * ): Id;
4942
+ * ```
4943
+ *
4317
4944
  * The provided listener is a RowListener function, and will be called with a
4318
4945
  * reference to the Store, the Id of the Table that changed, the Id of the Row
4319
4946
  * that changed, and a GetCellChange function in case you need to inspect any
@@ -4427,6 +5054,17 @@ export interface Store<in out Schemas extends OptionalSchemas> {
4427
5054
  * The addCellIdsListener method registers a listener function with the Store
4428
5055
  * that will be called whenever the Cell Ids in a Row change.
4429
5056
  *
5057
+ * This has schema-based typing. The following is a simplified representation:
5058
+ *
5059
+ * ```ts override
5060
+ * addCellIdsListener(
5061
+ * tableId: IdOrNull,
5062
+ * rowId: IdOrNull,
5063
+ * listener: CellIdsListener,
5064
+ * mutator?: boolean,
5065
+ * ): Id;
5066
+ * ```
5067
+ *
4430
5068
  * The provided listener is a CellIdsListener function, and will be called
4431
5069
  * with a reference to the Store, the Id of the Table, and the Id of the Row
4432
5070
  * that changed.
@@ -4536,6 +5174,18 @@ export interface Store<in out Schemas extends OptionalSchemas> {
4536
5174
  * The addCellListener method registers a listener function with the Store
4537
5175
  * that will be called whenever data in a Cell changes.
4538
5176
  *
5177
+ * This has schema-based typing. The following is a simplified representation:
5178
+ *
5179
+ * ```ts override
5180
+ * addCellListener(
5181
+ * tableId: IdOrNull,
5182
+ * rowId: IdOrNull,
5183
+ * cellId: IdOrNull,
5184
+ * listener: CellListener,
5185
+ * mutator?: boolean,
5186
+ * ): Id;
5187
+ * ```
5188
+ *
4539
5189
  * The provided listener is a CellListener function, and will be called with a
4540
5190
  * reference to the Store, the Id of the Table that changed, the Id of the Row
4541
5191
  * that changed, the Id of the Cell that changed, the new Cell value, the old
@@ -4664,6 +5314,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
4664
5314
  * The addValuesListener method registers a listener function with the Store
4665
5315
  * that will be called whenever the Values change.
4666
5316
  *
5317
+ * This has schema-based typing. The following is a simplified representation:
5318
+ *
5319
+ * ```ts override
5320
+ * addValuesListener(listener: ValuesListener, mutator?: boolean): Id;
5321
+ * ```
5322
+ *
4667
5323
  * The provided listener is a ValuesListener function, and will be called with
4668
5324
  * a reference to the Store and a GetValueChange function in case you need to
4669
5325
  * inspect any changes that occurred.
@@ -4725,6 +5381,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
4725
5381
  * The addValueIdsListener method registers a listener function with the Store
4726
5382
  * that will be called whenever the Value Ids in a Store change.
4727
5383
  *
5384
+ * This has schema-based typing. The following is a simplified representation:
5385
+ *
5386
+ * ```ts override
5387
+ * addValueIdsListener(listener: ValueIdsListener, mutator?: boolean): Id;
5388
+ * ```
5389
+ *
4728
5390
  * The provided listener is a ValueIdsListener function, and will be called
4729
5391
  * with a reference to the Store.
4730
5392
  *
@@ -4792,6 +5454,16 @@ export interface Store<in out Schemas extends OptionalSchemas> {
4792
5454
  * The addValueListener method registers a listener function with the Store
4793
5455
  * that will be called whenever data in a Value changes.
4794
5456
  *
5457
+ * This has schema-based typing. The following is a simplified representation:
5458
+ *
5459
+ * ```ts override
5460
+ * addValueListener(
5461
+ * valueId: IdOrNull,
5462
+ * listener: ValueListener,
5463
+ * mutator?: boolean,
5464
+ * ): Id;
5465
+ * ```
5466
+ *
4795
5467
  * The provided listener is a ValueListener function, and will be called with
4796
5468
  * a reference to the Store, the Id of the Value that changed, the new Value
4797
5469
  * value, the old Value, and a GetValueChange function in case you need to
@@ -4886,6 +5558,18 @@ export interface Store<in out Schemas extends OptionalSchemas> {
4886
5558
  * Store that will be called whenever invalid data was attempted to be written
4887
5559
  * to a Cell.
4888
5560
  *
5561
+ * This has schema-based typing. The following is a simplified representation:
5562
+ *
5563
+ * ```ts override
5564
+ * addInvalidCellListener(
5565
+ * tableId: IdOrNull,
5566
+ * rowId: IdOrNull,
5567
+ * cellId: IdOrNull,
5568
+ * listener: InvalidCellListener,
5569
+ * mutator?: boolean,
5570
+ * ): Id;
5571
+ * ```
5572
+ *
4889
5573
  * The provided listener is an InvalidCellListener function, and will be
4890
5574
  * called with a reference to the Store, the Id of the Table, the Id of the
4891
5575
  * Row, and the Id of Cell that was being attempted to be changed. It is also
@@ -5117,6 +5801,16 @@ export interface Store<in out Schemas extends OptionalSchemas> {
5117
5801
  * Store that will be called whenever invalid data was attempted to be written
5118
5802
  * to a Value.
5119
5803
  *
5804
+ * This has schema-based typing. The following is a simplified representation:
5805
+ *
5806
+ * ```ts override
5807
+ * addInvalidValueListener(
5808
+ * valueId: IdOrNull,
5809
+ * listener: InvalidValueListener,
5810
+ * mutator?: boolean,
5811
+ * ): Id;
5812
+ * ```
5813
+ *
5120
5814
  * The provided listener is an InvalidValueListener function, and will be
5121
5815
  * called with a reference to the Store and the Id of Value that was being
5122
5816
  * attempted to be changed. It is also given the invalid value of the Value,
@@ -5293,6 +5987,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
5293
5987
  * with the Store that will be called just before other non-mutating listeners
5294
5988
  * are called at the end of the transaction.
5295
5989
  *
5990
+ * This has schema-based typing. The following is a simplified representation:
5991
+ *
5992
+ * ```ts override
5993
+ * addWillFinishTransactionListener(listener: TransactionListener): Id;
5994
+ * ```
5995
+ *
5296
5996
  * This is useful if you need to know that a set of listeners are about to be
5297
5997
  * called at the end of a transaction, perhaps to batch _their_ consequences
5298
5998
  * together.
@@ -5385,6 +6085,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
5385
6085
  * with the Store that will be called just after other non-mutating listeners
5386
6086
  * are called at the end of the transaction.
5387
6087
  *
6088
+ * This has schema-based typing. The following is a simplified representation:
6089
+ *
6090
+ * ```ts override
6091
+ * addDidFinishTransactionListener(listener: TransactionListener): Id;
6092
+ * ```
6093
+ *
5388
6094
  * This is useful if you need to know that a set of listeners have just been
5389
6095
  * called at the end of a transaction, perhaps to batch _their_ consequences
5390
6096
  * together.
@@ -5477,6 +6183,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
5477
6183
  * The callListener method provides a way for you to manually provoke a
5478
6184
  * listener to be called, even if the underlying data hasn't changed.
5479
6185
  *
6186
+ * This has schema-based typing. The following is a simplified representation:
6187
+ *
6188
+ * ```ts override
6189
+ * callListener(listenerId: Id): Store;
6190
+ * ```
6191
+ *
5480
6192
  * This is useful when you are using mutator listeners to guarantee that data
5481
6193
  * conforms to programmatic conditions, and those conditions change such that
5482
6194
  * you need to update the Store in bulk.
@@ -5594,6 +6306,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
5594
6306
  * The delListener method removes a listener that was previously added to the
5595
6307
  * Store.
5596
6308
  *
6309
+ * This has schema-based typing. The following is a simplified representation:
6310
+ *
6311
+ * ```ts override
6312
+ * delListener(listenerId: Id): Store;
6313
+ * ```
6314
+ *
5597
6315
  * Use the Id returned by whichever method was used to add the listener. Note
5598
6316
  * that the Store may re-use this Id for future listeners added to it.
5599
6317
  *
@@ -5659,6 +6377,12 @@ export interface Store<in out Schemas extends OptionalSchemas> {
5659
6377
  * The createStore function creates a Store, and is the main entry point into
5660
6378
  * the store module.
5661
6379
  *
6380
+ * This has schema-based typing. The following is a simplified representation:
6381
+ *
6382
+ * ```ts override
6383
+ * createStore(): Store;
6384
+ * ```
6385
+ *
5662
6386
  * Since (or perhaps _because_) it is the most important function in the whole
5663
6387
  * module, it is trivially simple.
5664
6388
  *