sliftutils 0.64.0 → 0.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +2 -0
- package/package.json +1 -1
- package/storage/CBORStorage.d.ts +1 -0
- package/storage/CBORStorage.ts +5 -0
- package/storage/JSONStorage.d.ts +1 -0
- package/storage/JSONStorage.ts +3 -1
package/index.d.ts
CHANGED
|
@@ -574,6 +574,7 @@ declare module "sliftutils/storage/CBORStorage" {
|
|
|
574
574
|
size: number;
|
|
575
575
|
lastModified: number;
|
|
576
576
|
} | undefined>;
|
|
577
|
+
watchResync(callback: () => void): void;
|
|
577
578
|
reset(): Promise<void>;
|
|
578
579
|
}
|
|
579
580
|
|
|
@@ -858,6 +859,7 @@ declare module "sliftutils/storage/JSONStorage" {
|
|
|
858
859
|
size: number;
|
|
859
860
|
lastModified: number;
|
|
860
861
|
} | undefined>;
|
|
862
|
+
watchResync(callback: () => void): void;
|
|
861
863
|
reset(): Promise<void>;
|
|
862
864
|
}
|
|
863
865
|
|
package/package.json
CHANGED
package/storage/CBORStorage.d.ts
CHANGED
package/storage/CBORStorage.ts
CHANGED
|
@@ -30,6 +30,11 @@ export class CBORStorage<T> implements IStorage<T> {
|
|
|
30
30
|
return await this.storage.getInfo(key);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
|
|
34
|
+
public watchResync(callback: () => void): void {
|
|
35
|
+
this.storage.watchResync?.(callback);
|
|
36
|
+
}
|
|
37
|
+
|
|
33
38
|
public async reset() {
|
|
34
39
|
await this.storage.reset();
|
|
35
40
|
}
|
package/storage/JSONStorage.d.ts
CHANGED
package/storage/JSONStorage.ts
CHANGED