@asaidimu/utils-store 10.2.15 → 10.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.cts +6 -1
- package/index.d.ts +1 -1
- package/index.js +2429 -1
- package/index.mjs +2402 -1
- package/package.json +5 -5
package/index.d.cts
CHANGED
|
@@ -46,6 +46,11 @@ interface SimplePersistence<T> {
|
|
|
46
46
|
version: string;
|
|
47
47
|
id: string;
|
|
48
48
|
};
|
|
49
|
+
/**
|
|
50
|
+
* Closes the persistence instance, releasing the file watcher.
|
|
51
|
+
* Call this when shutting down to clean up resources.
|
|
52
|
+
*/
|
|
53
|
+
close?: () => Promise<void>;
|
|
49
54
|
}
|
|
50
55
|
//#endregion
|
|
51
56
|
//#region src/events/types.d.ts
|
|
@@ -756,7 +761,7 @@ declare class ReactiveDataStore<T extends object> implements DataStore<T> {
|
|
|
756
761
|
/**
|
|
757
762
|
* Creates a new ReactiveDataStore instance.
|
|
758
763
|
*/
|
|
759
|
-
constructor(initialData: T, persistence?: SimplePersistence<T>, deleteMarker?: symbol, options?: {
|
|
764
|
+
constructor(initialData: T | {}, persistence?: SimplePersistence<T>, deleteMarker?: symbol, options?: {
|
|
760
765
|
persistenceMaxRetries?: number;
|
|
761
766
|
persistenceRetryDelay?: number;
|
|
762
767
|
broadcastChannel?: string;
|
package/index.d.ts
CHANGED
|
@@ -557,7 +557,7 @@ declare class ReactiveDataStore<T extends object> implements DataStore<T> {
|
|
|
557
557
|
/**
|
|
558
558
|
* Creates a new ReactiveDataStore instance.
|
|
559
559
|
*/
|
|
560
|
-
constructor(initialData: T, persistence?: SimplePersistence<T>, deleteMarker?: symbol, options?: {
|
|
560
|
+
constructor(initialData: T | {}, persistence?: SimplePersistence<T>, deleteMarker?: symbol, options?: {
|
|
561
561
|
persistenceMaxRetries?: number;
|
|
562
562
|
persistenceRetryDelay?: number;
|
|
563
563
|
broadcastChannel?: string;
|