@signaldb/core 1.5.0 → 1.5.1

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.
@@ -163,7 +163,7 @@
163
163
  "src": "src/utils/isEqual.ts"
164
164
  },
165
165
  "src/utils/isFieldExpression.ts": {
166
- "file": "index.cjs27.js",
166
+ "file": "index.cjs29.js",
167
167
  "name": "utils/isFieldExpression",
168
168
  "src": "src/utils/isFieldExpression.ts"
169
169
  },
@@ -197,7 +197,7 @@
197
197
  "src": "src/utils/serializeValue.ts"
198
198
  },
199
199
  "src/utils/set.ts": {
200
- "file": "index.cjs28.js",
200
+ "file": "index.cjs27.js",
201
201
  "name": "utils/set",
202
202
  "src": "src/utils/set.ts"
203
203
  },
@@ -210,7 +210,7 @@
210
210
  ]
211
211
  },
212
212
  "src/utils/uniqueBy.ts": {
213
- "file": "index.cjs29.js",
213
+ "file": "index.cjs28.js",
214
214
  "name": "utils/uniqueBy",
215
215
  "src": "src/utils/uniqueBy.ts"
216
216
  }
@@ -1,9 +1,15 @@
1
1
  "use strict";
2
- function createSignal(dependency, initialValue, isEqual = Object.is) {
2
+ function createSignal(reactivityAdapter, initialValue, isEqual = Object.is) {
3
3
  let value = initialValue;
4
+ const dependency = reactivityAdapter == null ? void 0 : reactivityAdapter.create();
5
+ const isInReactiveScope = () => {
6
+ if (!(reactivityAdapter == null ? void 0 : reactivityAdapter.isInScope))
7
+ return true;
8
+ return reactivityAdapter.isInScope();
9
+ };
4
10
  const signal = {
5
11
  get() {
6
- if (dependency)
12
+ if (dependency && isInReactiveScope())
7
13
  dependency.depend();
8
14
  return value;
9
15
  },
@@ -54,7 +54,6 @@ const _Collection = class _Collection extends EventEmitter {
54
54
  * @param options.fieldTracking - A boolean to enable or disable field tracking by default.
55
55
  */
56
56
  constructor(options) {
57
- var _a, _b;
58
57
  super();
59
58
  __publicField(this, "name");
60
59
  __publicField(this, "options");
@@ -83,8 +82,8 @@ const _Collection = class _Collection extends EventEmitter {
83
82
  ...this.options.indices || []
84
83
  ];
85
84
  this.rebuildIndices();
86
- this.isPullingSignal = createSignal((_a = this.options.reactivity) == null ? void 0 : _a.create(), !!(options == null ? void 0 : options.persistence));
87
- this.isPushingSignal = createSignal((_b = this.options.reactivity) == null ? void 0 : _b.create(), false);
85
+ this.isPullingSignal = createSignal(this.options.reactivity, !!(options == null ? void 0 : options.persistence));
86
+ this.isPushingSignal = createSignal(this.options.reactivity, false);
88
87
  this.on("persistence.pullStarted", () => {
89
88
  this.isPullingSignal.set(true);
90
89
  });
@@ -38,7 +38,6 @@ class ReplicatedCollection extends index.default {
38
38
  * @param options.enableDebugMode - A boolean to enable or disable debug mode.
39
39
  */
40
40
  constructor(options) {
41
- var _a, _b;
42
41
  const replicationAdapter = createReplicationAdapter({
43
42
  registerRemoteChange: options.registerRemoteChange,
44
43
  pull: async () => {
@@ -67,8 +66,8 @@ class ReplicatedCollection extends index.default {
67
66
  });
68
67
  __publicField(this, "isPullingRemoteSignal");
69
68
  __publicField(this, "isPushingRemoteSignal");
70
- this.isPullingRemoteSignal = createSignal((_a = options.reactivity) == null ? void 0 : _a.create(), false);
71
- this.isPushingRemoteSignal = createSignal((_b = options.reactivity) == null ? void 0 : _b.create(), false);
69
+ this.isPullingRemoteSignal = createSignal(options.reactivity, false);
70
+ this.isPushingRemoteSignal = createSignal(options.reactivity, false);
72
71
  }
73
72
  /**
74
73
  * Checks whether the collection is currently performing any loading operation,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const get = require("./index.cjs25.js");
3
- const set = require("./index.cjs28.js");
3
+ const set = require("./index.cjs27.js");
4
4
  function project(item, fields) {
5
5
  const allFieldsDeactivated = Object.values(fields).every((value) => value === 0);
6
6
  if (allFieldsDeactivated) {
@@ -3,7 +3,7 @@ var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  const isEqual = require("./index.cjs9.js");
6
- const uniqueBy = require("./index.cjs29.js");
6
+ const uniqueBy = require("./index.cjs28.js");
7
7
  class Observer {
8
8
  /**
9
9
  * Creates a new instance of the `Observer` class.
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const isFieldExpression = require("./index.cjs27.js");
2
+ const isFieldExpression = require("./index.cjs29.js");
3
3
  const serializeValue = require("./index.cjs16.js");
4
4
  function getMatchingKeys(field, selector) {
5
5
  const result = { include: null, exclude: null };
@@ -1,42 +1,29 @@
1
1
  "use strict";
2
- const expressionKeys = /* @__PURE__ */ new Set([
3
- "$eq",
4
- "$gt",
5
- "$gte",
6
- "$lt",
7
- "$lte",
8
- "$in",
9
- "$nin",
10
- "$ne",
11
- "$exists",
12
- "$not",
13
- "$expr",
14
- "$jsonSchema",
15
- "$mod",
16
- "$regex",
17
- "$options",
18
- "$text",
19
- "$where",
20
- "$all",
21
- "$elemMatch",
22
- "$size",
23
- "$bitsAllClear",
24
- "$bitsAllSet",
25
- "$bitsAnyClear",
26
- "$bitsAnySet"
27
- ]);
28
- function isFieldExpression(expression) {
29
- if (typeof expression !== "object" || expression == null) {
30
- return false;
31
- }
32
- const keys = Object.keys(expression);
33
- if (keys.length === 0) {
34
- return false;
35
- }
36
- const hasInvalidKeys = keys.some((key) => !expressionKeys.has(key));
37
- if (hasInvalidKeys)
38
- return false;
39
- const hasValidKeys = keys.every((key) => expressionKeys.has(key));
40
- return hasValidKeys;
2
+ function set(object, path, value, deleteIfUndefined = false) {
3
+ if (object == null)
4
+ return object;
5
+ const segments = path.split(/[.[\]]/g);
6
+ if (segments[0] === "")
7
+ segments.shift();
8
+ if (segments.at(-1) === "")
9
+ segments.pop();
10
+ const apply = (node) => {
11
+ if (segments.length > 1) {
12
+ const key = segments.shift();
13
+ const nextIsNumber = !Number.isNaN(Number.parseInt(segments[0], 10));
14
+ if (node[key] === void 0) {
15
+ node[key] = nextIsNumber ? [] : {};
16
+ }
17
+ apply(node[key]);
18
+ } else {
19
+ if (deleteIfUndefined && value === void 0) {
20
+ delete node[segments[0]];
21
+ return;
22
+ }
23
+ node[segments[0]] = value;
24
+ }
25
+ };
26
+ apply(object);
27
+ return object;
41
28
  }
42
- module.exports = isFieldExpression;
29
+ module.exports = set;
@@ -1,29 +1,9 @@
1
1
  "use strict";
2
- function set(object, path, value, deleteIfUndefined = false) {
3
- if (object == null)
4
- return object;
5
- const segments = path.split(/[.[\]]/g);
6
- if (segments[0] === "")
7
- segments.shift();
8
- if (segments.at(-1) === "")
9
- segments.pop();
10
- const apply = (node) => {
11
- if (segments.length > 1) {
12
- const key = segments.shift();
13
- const nextIsNumber = !Number.isNaN(Number.parseInt(segments[0], 10));
14
- if (node[key] === void 0) {
15
- node[key] = nextIsNumber ? [] : {};
16
- }
17
- apply(node[key]);
18
- } else {
19
- if (deleteIfUndefined && value === void 0) {
20
- delete node[segments[0]];
21
- return;
22
- }
23
- node[segments[0]] = value;
24
- }
25
- };
26
- apply(object);
27
- return object;
2
+ function uniqueBy(array, fn) {
3
+ const set = /* @__PURE__ */ new Set();
4
+ return array.filter((element) => {
5
+ const value = typeof fn === "function" ? fn(element) : element[fn];
6
+ return !set.has(value) && set.add(value);
7
+ });
28
8
  }
29
- module.exports = set;
9
+ module.exports = uniqueBy;
@@ -1,9 +1,42 @@
1
1
  "use strict";
2
- function uniqueBy(array, fn) {
3
- const set = /* @__PURE__ */ new Set();
4
- return array.filter((element) => {
5
- const value = typeof fn === "function" ? fn(element) : element[fn];
6
- return !set.has(value) && set.add(value);
7
- });
2
+ const expressionKeys = /* @__PURE__ */ new Set([
3
+ "$eq",
4
+ "$gt",
5
+ "$gte",
6
+ "$lt",
7
+ "$lte",
8
+ "$in",
9
+ "$nin",
10
+ "$ne",
11
+ "$exists",
12
+ "$not",
13
+ "$expr",
14
+ "$jsonSchema",
15
+ "$mod",
16
+ "$regex",
17
+ "$options",
18
+ "$text",
19
+ "$where",
20
+ "$all",
21
+ "$elemMatch",
22
+ "$size",
23
+ "$bitsAllClear",
24
+ "$bitsAllSet",
25
+ "$bitsAnyClear",
26
+ "$bitsAnySet"
27
+ ]);
28
+ function isFieldExpression(expression) {
29
+ if (typeof expression !== "object" || expression == null) {
30
+ return false;
31
+ }
32
+ const keys = Object.keys(expression);
33
+ if (keys.length === 0) {
34
+ return false;
35
+ }
36
+ const hasInvalidKeys = keys.some((key) => !expressionKeys.has(key));
37
+ if (hasInvalidKeys)
38
+ return false;
39
+ const hasValidKeys = keys.every((key) => expressionKeys.has(key));
40
+ return hasValidKeys;
8
41
  }
9
- module.exports = uniqueBy;
42
+ module.exports = isFieldExpression;
@@ -11,7 +11,6 @@ class AutoFetchCollection extends ReplicatedCollection.default {
11
11
  * @param options.purgeDelay {Number} - The delay in milliseconds before purging an item from the cache.
12
12
  */
13
13
  constructor(options) {
14
- var _a;
15
14
  let triggerRemoteChange;
16
15
  super({
17
16
  ...options,
@@ -46,7 +45,7 @@ class AutoFetchCollection extends ReplicatedCollection.default {
46
45
  __publicField(this, "mergeItems");
47
46
  this.mergeItems = options.mergeItems ?? ((itemA, itemB) => ({ ...itemA, ...itemB }));
48
47
  this.purgeDelay = options.purgeDelay ?? 1e4;
49
- this.isFetchingSignal = createSignal((_a = options.reactivity) == null ? void 0 : _a.create(), false);
48
+ this.isFetchingSignal = createSignal(options.reactivity, false);
50
49
  if (!triggerRemoteChange)
51
50
  throw new Error("No triggerRemoteChange method found. Looks like your persistence adapter was not registered");
52
51
  this.triggerReload = triggerRemoteChange;
@@ -147,7 +146,7 @@ class AutoFetchCollection extends ReplicatedCollection.default {
147
146
  if (!this.reactivityAdapter)
148
147
  throw new Error("No reactivity adapter found");
149
148
  if (!this.loadingSignals.has(this.getKeyForSelector(selector))) {
150
- this.loadingSignals.set(this.getKeyForSelector(selector), createSignal(this.reactivityAdapter.create(), false));
149
+ this.loadingSignals.set(this.getKeyForSelector(selector), createSignal(this.reactivityAdapter, false));
151
150
  }
152
151
  return this.loadingSignals.get(this.getKeyForSelector(selector));
153
152
  }
package/dist/index17.mjs CHANGED
@@ -1,8 +1,14 @@
1
- function createSignal(dependency, initialValue, isEqual = Object.is) {
1
+ function createSignal(reactivityAdapter, initialValue, isEqual = Object.is) {
2
2
  let value = initialValue;
3
+ const dependency = reactivityAdapter == null ? void 0 : reactivityAdapter.create();
4
+ const isInReactiveScope = () => {
5
+ if (!(reactivityAdapter == null ? void 0 : reactivityAdapter.isInScope))
6
+ return true;
7
+ return reactivityAdapter.isInScope();
8
+ };
3
9
  const signal = {
4
10
  get() {
5
- if (dependency)
11
+ if (dependency && isInReactiveScope())
6
12
  dependency.depend();
7
13
  return value;
8
14
  },
package/dist/index2.mjs CHANGED
@@ -53,7 +53,6 @@ const _Collection = class _Collection extends EventEmitter {
53
53
  * @param options.fieldTracking - A boolean to enable or disable field tracking by default.
54
54
  */
55
55
  constructor(options) {
56
- var _a, _b;
57
56
  super();
58
57
  __publicField(this, "name");
59
58
  __publicField(this, "options");
@@ -82,8 +81,8 @@ const _Collection = class _Collection extends EventEmitter {
82
81
  ...this.options.indices || []
83
82
  ];
84
83
  this.rebuildIndices();
85
- this.isPullingSignal = createSignal((_a = this.options.reactivity) == null ? void 0 : _a.create(), !!(options == null ? void 0 : options.persistence));
86
- this.isPushingSignal = createSignal((_b = this.options.reactivity) == null ? void 0 : _b.create(), false);
84
+ this.isPullingSignal = createSignal(this.options.reactivity, !!(options == null ? void 0 : options.persistence));
85
+ this.isPushingSignal = createSignal(this.options.reactivity, false);
87
86
  this.on("persistence.pullStarted", () => {
88
87
  this.isPullingSignal.set(true);
89
88
  });
package/dist/index20.mjs CHANGED
@@ -36,7 +36,6 @@ class ReplicatedCollection extends Collection {
36
36
  * @param options.enableDebugMode - A boolean to enable or disable debug mode.
37
37
  */
38
38
  constructor(options) {
39
- var _a, _b;
40
39
  const replicationAdapter = createReplicationAdapter({
41
40
  registerRemoteChange: options.registerRemoteChange,
42
41
  pull: async () => {
@@ -65,8 +64,8 @@ class ReplicatedCollection extends Collection {
65
64
  });
66
65
  __publicField(this, "isPullingRemoteSignal");
67
66
  __publicField(this, "isPushingRemoteSignal");
68
- this.isPullingRemoteSignal = createSignal((_a = options.reactivity) == null ? void 0 : _a.create(), false);
69
- this.isPushingRemoteSignal = createSignal((_b = options.reactivity) == null ? void 0 : _b.create(), false);
67
+ this.isPullingRemoteSignal = createSignal(options.reactivity, false);
68
+ this.isPushingRemoteSignal = createSignal(options.reactivity, false);
70
69
  }
71
70
  /**
72
71
  * Checks whether the collection is currently performing any loading operation,
package/dist/index22.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import get from "./index25.mjs";
2
- import set from "./index28.mjs";
2
+ import set from "./index27.mjs";
3
3
  function project(item, fields) {
4
4
  const allFieldsDeactivated = Object.values(fields).every((value) => value === 0);
5
5
  if (allFieldsDeactivated) {
package/dist/index23.mjs CHANGED
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import isEqual from "./index9.mjs";
5
- import uniqueBy from "./index29.mjs";
5
+ import uniqueBy from "./index28.mjs";
6
6
  class Observer {
7
7
  /**
8
8
  * Creates a new instance of the `Observer` class.
package/dist/index26.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import isFieldExpression from "./index27.mjs";
1
+ import isFieldExpression from "./index29.mjs";
2
2
  import serializeValue from "./index16.mjs";
3
3
  function getMatchingKeys(field, selector) {
4
4
  const result = { include: null, exclude: null };
package/dist/index27.mjs CHANGED
@@ -1,43 +1,30 @@
1
- const expressionKeys = /* @__PURE__ */ new Set([
2
- "$eq",
3
- "$gt",
4
- "$gte",
5
- "$lt",
6
- "$lte",
7
- "$in",
8
- "$nin",
9
- "$ne",
10
- "$exists",
11
- "$not",
12
- "$expr",
13
- "$jsonSchema",
14
- "$mod",
15
- "$regex",
16
- "$options",
17
- "$text",
18
- "$where",
19
- "$all",
20
- "$elemMatch",
21
- "$size",
22
- "$bitsAllClear",
23
- "$bitsAllSet",
24
- "$bitsAnyClear",
25
- "$bitsAnySet"
26
- ]);
27
- function isFieldExpression(expression) {
28
- if (typeof expression !== "object" || expression == null) {
29
- return false;
30
- }
31
- const keys = Object.keys(expression);
32
- if (keys.length === 0) {
33
- return false;
34
- }
35
- const hasInvalidKeys = keys.some((key) => !expressionKeys.has(key));
36
- if (hasInvalidKeys)
37
- return false;
38
- const hasValidKeys = keys.every((key) => expressionKeys.has(key));
39
- return hasValidKeys;
1
+ function set(object, path, value, deleteIfUndefined = false) {
2
+ if (object == null)
3
+ return object;
4
+ const segments = path.split(/[.[\]]/g);
5
+ if (segments[0] === "")
6
+ segments.shift();
7
+ if (segments.at(-1) === "")
8
+ segments.pop();
9
+ const apply = (node) => {
10
+ if (segments.length > 1) {
11
+ const key = segments.shift();
12
+ const nextIsNumber = !Number.isNaN(Number.parseInt(segments[0], 10));
13
+ if (node[key] === void 0) {
14
+ node[key] = nextIsNumber ? [] : {};
15
+ }
16
+ apply(node[key]);
17
+ } else {
18
+ if (deleteIfUndefined && value === void 0) {
19
+ delete node[segments[0]];
20
+ return;
21
+ }
22
+ node[segments[0]] = value;
23
+ }
24
+ };
25
+ apply(object);
26
+ return object;
40
27
  }
41
28
  export {
42
- isFieldExpression as default
29
+ set as default
43
30
  };
package/dist/index28.mjs CHANGED
@@ -1,30 +1,10 @@
1
- function set(object, path, value, deleteIfUndefined = false) {
2
- if (object == null)
3
- return object;
4
- const segments = path.split(/[.[\]]/g);
5
- if (segments[0] === "")
6
- segments.shift();
7
- if (segments.at(-1) === "")
8
- segments.pop();
9
- const apply = (node) => {
10
- if (segments.length > 1) {
11
- const key = segments.shift();
12
- const nextIsNumber = !Number.isNaN(Number.parseInt(segments[0], 10));
13
- if (node[key] === void 0) {
14
- node[key] = nextIsNumber ? [] : {};
15
- }
16
- apply(node[key]);
17
- } else {
18
- if (deleteIfUndefined && value === void 0) {
19
- delete node[segments[0]];
20
- return;
21
- }
22
- node[segments[0]] = value;
23
- }
24
- };
25
- apply(object);
26
- return object;
1
+ function uniqueBy(array, fn) {
2
+ const set = /* @__PURE__ */ new Set();
3
+ return array.filter((element) => {
4
+ const value = typeof fn === "function" ? fn(element) : element[fn];
5
+ return !set.has(value) && set.add(value);
6
+ });
27
7
  }
28
8
  export {
29
- set as default
9
+ uniqueBy as default
30
10
  };
package/dist/index29.mjs CHANGED
@@ -1,10 +1,43 @@
1
- function uniqueBy(array, fn) {
2
- const set = /* @__PURE__ */ new Set();
3
- return array.filter((element) => {
4
- const value = typeof fn === "function" ? fn(element) : element[fn];
5
- return !set.has(value) && set.add(value);
6
- });
1
+ const expressionKeys = /* @__PURE__ */ new Set([
2
+ "$eq",
3
+ "$gt",
4
+ "$gte",
5
+ "$lt",
6
+ "$lte",
7
+ "$in",
8
+ "$nin",
9
+ "$ne",
10
+ "$exists",
11
+ "$not",
12
+ "$expr",
13
+ "$jsonSchema",
14
+ "$mod",
15
+ "$regex",
16
+ "$options",
17
+ "$text",
18
+ "$where",
19
+ "$all",
20
+ "$elemMatch",
21
+ "$size",
22
+ "$bitsAllClear",
23
+ "$bitsAllSet",
24
+ "$bitsAnyClear",
25
+ "$bitsAnySet"
26
+ ]);
27
+ function isFieldExpression(expression) {
28
+ if (typeof expression !== "object" || expression == null) {
29
+ return false;
30
+ }
31
+ const keys = Object.keys(expression);
32
+ if (keys.length === 0) {
33
+ return false;
34
+ }
35
+ const hasInvalidKeys = keys.some((key) => !expressionKeys.has(key));
36
+ if (hasInvalidKeys)
37
+ return false;
38
+ const hasValidKeys = keys.every((key) => expressionKeys.has(key));
39
+ return hasValidKeys;
7
40
  }
8
41
  export {
9
- uniqueBy as default
42
+ isFieldExpression as default
10
43
  };
package/dist/index3.mjs CHANGED
@@ -10,7 +10,6 @@ class AutoFetchCollection extends ReplicatedCollection {
10
10
  * @param options.purgeDelay {Number} - The delay in milliseconds before purging an item from the cache.
11
11
  */
12
12
  constructor(options) {
13
- var _a;
14
13
  let triggerRemoteChange;
15
14
  super({
16
15
  ...options,
@@ -45,7 +44,7 @@ class AutoFetchCollection extends ReplicatedCollection {
45
44
  __publicField(this, "mergeItems");
46
45
  this.mergeItems = options.mergeItems ?? ((itemA, itemB) => ({ ...itemA, ...itemB }));
47
46
  this.purgeDelay = options.purgeDelay ?? 1e4;
48
- this.isFetchingSignal = createSignal((_a = options.reactivity) == null ? void 0 : _a.create(), false);
47
+ this.isFetchingSignal = createSignal(options.reactivity, false);
49
48
  if (!triggerRemoteChange)
50
49
  throw new Error("No triggerRemoteChange method found. Looks like your persistence adapter was not registered");
51
50
  this.triggerReload = triggerRemoteChange;
@@ -146,7 +145,7 @@ class AutoFetchCollection extends ReplicatedCollection {
146
145
  if (!this.reactivityAdapter)
147
146
  throw new Error("No reactivity adapter found");
148
147
  if (!this.loadingSignals.has(this.getKeyForSelector(selector))) {
149
- this.loadingSignals.set(this.getKeyForSelector(selector), createSignal(this.reactivityAdapter.create(), false));
148
+ this.loadingSignals.set(this.getKeyForSelector(selector), createSignal(this.reactivityAdapter, false));
150
149
  }
151
150
  return this.loadingSignals.get(this.getKeyForSelector(selector));
152
151
  }
@@ -1,14 +1,14 @@
1
- import type Dependency from '../types/Dependency';
1
+ import type ReactivityAdapter from '../types/ReactivityAdapter';
2
2
  import type Signal from '../types/Signal';
3
3
  /**
4
4
  * Creates a reactive signal for managing state and triggering dependencies.
5
5
  * The signal holds a value and provides methods to get and set the value,
6
6
  * with optional equality checks and dependency tracking.
7
7
  * @template T - The type of the value held by the signal.
8
- * @param dependency - An optional dependency object for tracking and notifying reactivity.
8
+ * @param reactivityAdapter - An optional reactivity adapter for managing dependencies.
9
9
  * @param initialValue - The initial value of the signal.
10
10
  * @param isEqual - A custom equality function to determine if the new value is different
11
11
  * from the current value (default is `Object.is`).
12
12
  * @returns A signal object with `get` and `set` methods to manage the value.
13
13
  */
14
- export default function createSignal<T>(dependency: Dependency | undefined, initialValue: T, isEqual?: (a: T, b: T) => boolean): Signal<T>;
14
+ export default function createSignal<T>(reactivityAdapter: ReactivityAdapter | undefined, initialValue: T, isEqual?: (a: T, b: T) => boolean): Signal<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signaldb/core",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "SignalDB is a client-side database that provides a simple MongoDB-like interface to the data with first-class typescript support to achieve an optimistic UI. Data persistence can be achieved by using storage providers that store the data through a JSON interface to places such as localStorage.",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && vite build",