tinybase 3.0.4 → 3.0.5

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 (79) hide show
  1. package/package.json +21 -20
  2. package/readme.md +2 -2
  3. package/lib/cjs/checkpoints.d.ts +0 -959
  4. package/lib/cjs/common.d.ts +0 -115
  5. package/lib/cjs/indexes.d.ts +0 -966
  6. package/lib/cjs/metrics.d.ts +0 -827
  7. package/lib/cjs/persisters.d.ts +0 -727
  8. package/lib/cjs/queries.d.ts +0 -3024
  9. package/lib/cjs/relationships.d.ts +0 -1201
  10. package/lib/cjs/store.d.ts +0 -5244
  11. package/lib/cjs/tinybase.d.ts +0 -14
  12. package/lib/cjs/tools.d.ts +0 -512
  13. package/lib/cjs/ui-react.d.ts +0 -10921
  14. package/lib/cjs-es6/checkpoints.d.ts +0 -959
  15. package/lib/common.d.ts +0 -115
  16. package/lib/debug/checkpoints.d.ts +0 -959
  17. package/lib/debug/common.d.ts +0 -115
  18. package/lib/debug/indexes.d.ts +0 -966
  19. package/lib/debug/metrics.d.ts +0 -827
  20. package/lib/debug/persisters.d.ts +0 -727
  21. package/lib/debug/queries.d.ts +0 -3024
  22. package/lib/debug/relationships.d.ts +0 -1201
  23. package/lib/debug/store.d.ts +0 -5244
  24. package/lib/debug/tinybase.d.ts +0 -14
  25. package/lib/debug/tools.d.ts +0 -512
  26. package/lib/debug/ui-react.d.ts +0 -10921
  27. package/lib/es6/checkpoints.d.ts +0 -959
  28. package/lib/es6/common.d.ts +0 -115
  29. package/lib/es6/indexes.d.ts +0 -966
  30. package/lib/es6/metrics.d.ts +0 -827
  31. package/lib/es6/persisters.d.ts +0 -727
  32. package/lib/es6/queries.d.ts +0 -3024
  33. package/lib/es6/relationships.d.ts +0 -1201
  34. package/lib/es6/store.d.ts +0 -5244
  35. package/lib/es6/tinybase.d.ts +0 -14
  36. package/lib/es6/tools.d.ts +0 -512
  37. package/lib/es6/ui-react.d.ts +0 -10921
  38. package/lib/indexes.d.ts +0 -966
  39. package/lib/metrics.d.ts +0 -827
  40. package/lib/persisters.d.ts +0 -727
  41. package/lib/queries.d.ts +0 -3024
  42. package/lib/relationships.d.ts +0 -1201
  43. package/lib/store.d.ts +0 -5244
  44. package/lib/tinybase.d.ts +0 -14
  45. package/lib/tools.d.ts +0 -512
  46. package/lib/ui-react.d.ts +0 -10921
  47. package/lib/umd/checkpoints.d.ts +0 -959
  48. package/lib/umd/common.d.ts +0 -115
  49. package/lib/umd/indexes.d.ts +0 -966
  50. package/lib/umd/metrics.d.ts +0 -827
  51. package/lib/umd/persisters.d.ts +0 -727
  52. package/lib/umd/queries.d.ts +0 -3024
  53. package/lib/umd/relationships.d.ts +0 -1201
  54. package/lib/umd/store.d.ts +0 -5244
  55. package/lib/umd/tinybase.d.ts +0 -14
  56. package/lib/umd/tools.d.ts +0 -512
  57. package/lib/umd/ui-react.d.ts +0 -10921
  58. package/lib/umd-es6/checkpoints.d.ts +0 -959
  59. package/lib/umd-es6/common.d.ts +0 -115
  60. package/lib/umd-es6/indexes.d.ts +0 -966
  61. package/lib/umd-es6/metrics.d.ts +0 -827
  62. package/lib/umd-es6/persisters.d.ts +0 -727
  63. package/lib/umd-es6/queries.d.ts +0 -3024
  64. package/lib/umd-es6/relationships.d.ts +0 -1201
  65. package/lib/umd-es6/store.d.ts +0 -5244
  66. package/lib/umd-es6/tinybase.d.ts +0 -14
  67. package/lib/umd-es6/tools.d.ts +0 -512
  68. package/lib/umd-es6/ui-react.d.ts +0 -10921
  69. /package/lib/{checkpoints.d.ts → types/checkpoints.d.ts} +0 -0
  70. /package/lib/{cjs-es6 → types}/common.d.ts +0 -0
  71. /package/lib/{cjs-es6 → types}/indexes.d.ts +0 -0
  72. /package/lib/{cjs-es6 → types}/metrics.d.ts +0 -0
  73. /package/lib/{cjs-es6 → types}/persisters.d.ts +0 -0
  74. /package/lib/{cjs-es6 → types}/queries.d.ts +0 -0
  75. /package/lib/{cjs-es6 → types}/relationships.d.ts +0 -0
  76. /package/lib/{cjs-es6 → types}/store.d.ts +0 -0
  77. /package/lib/{cjs-es6 → types}/tinybase.d.ts +0 -0
  78. /package/lib/{cjs-es6 → types}/tools.d.ts +0 -0
  79. /package/lib/{cjs-es6 → types}/ui-react.d.ts +0 -0
@@ -1,115 +0,0 @@
1
- /**
2
- * The common module of the TinyBase project provides a small collection of
3
- * common types used across other modules.
4
- *
5
- * @packageDocumentation
6
- * @module common
7
- */
8
-
9
- /**
10
- * The Json type is a simple alias for a string, but is used to indicate that
11
- * the string should be considered to be a JSON serialization of an object.
12
- *
13
- * @category General
14
- */
15
- export type Json = string;
16
-
17
- /**
18
- * The Ids type is a simple alias for an array of strings, but is used to
19
- * indicate that the strings should be considered to be the keys of objects
20
- * (such as the Row Id strings used in a Table).
21
- *
22
- * @category Identity
23
- */
24
- export type Ids = Id[];
25
-
26
- /**
27
- * The Id type is a simple alias for a string, but is used to indicate that the
28
- * string should be considered to be the key of an object (such as a Row Id
29
- * string used in a Table).
30
- *
31
- * @category Identity
32
- */
33
- export type Id = string;
34
-
35
- /**
36
- * The Id type is a simple alias for the union of a string or `null` value,
37
- * where the string should be considered to be the key of an objects (such as a
38
- * Row Id string used in a Table), and typically `null` indicates a wildcard -
39
- * such as when used in the Store addRowListener method.
40
- *
41
- * @category Identity
42
- */
43
- export type IdOrNull = Id | null;
44
-
45
- /**
46
- * The ParameterizedCallback type represents a generic function that will take
47
- * an optional parameter - such as the handler of a DOM event.
48
- *
49
- * @category Callback
50
- */
51
- export type ParameterizedCallback<Parameter> = (parameter?: Parameter) => void;
52
-
53
- /**
54
- * The Callback type represents a function that is used as a callback and which
55
- * does not take a parameter.
56
- *
57
- * @category Callback
58
- */
59
- export type Callback = () => void;
60
-
61
- /**
62
- * The SortKey type represents a value that can be used by a sort function.
63
- *
64
- * @category Parameter
65
- */
66
- export type SortKey = string | number | boolean;
67
-
68
- /**
69
- * The defaultSorter function is provided as a convenience to sort keys
70
- * alphanumerically, and can be provided to the `sliceIdSorter` and
71
- * `rowIdSorter` parameters of the setIndexDefinition method in the indexes
72
- * module, for example.
73
- *
74
- * @param sortKey1 The first item of the pair to compare.
75
- * @param sortKey2 The second item of the pair to compare.
76
- * @returns A number indicating how to sort the pair.
77
- * @example
78
- * This example creates an Indexes object.
79
- *
80
- * ```js
81
- * const store = createStore();
82
- * const indexes = createIndexes(store);
83
- * console.log(indexes.getIndexIds());
84
- * // -> []
85
- * ```
86
- * @example
87
- * This example creates a Store, creates an Indexes object, and defines an
88
- * Index based on the first letter of the pets' names. The Slice Ids (and Row
89
- * Ids within them) are alphabetically sorted using the defaultSorter function.
90
- *
91
- * ```js
92
- * const store = createStore().setTable('pets', {
93
- * fido: {species: 'dog'},
94
- * felix: {species: 'cat'},
95
- * cujo: {species: 'dog'},
96
- * });
97
- *
98
- * const indexes = createIndexes(store);
99
- * indexes.setIndexDefinition(
100
- * 'byFirst', // indexId
101
- * 'pets', // tableId
102
- * (_, rowId) => rowId[0], // each Row's Slice Id
103
- * (_, rowId) => rowId, // each Row's sort key
104
- * defaultSorter, // sort Slice Ids
105
- * defaultSorter, // sort Row Ids by sort key
106
- * );
107
- *
108
- * console.log(indexes.getSliceIds('byFirst'));
109
- * // -> ['c', 'f']
110
- * console.log(indexes.getSliceRowIds('byFirst', 'f'));
111
- * // -> ['felix', 'fido']
112
- * ```
113
- * @category Convenience
114
- */
115
- export function defaultSorter(sortKey1: SortKey, sortKey2: SortKey): number;