@isoftdata/svelte-store-crud
Advanced tools
@@ -65,4 +65,10 @@ import type { ConditionalKeys, Simplify } from 'type-fest'; | ||
| clear(type?: 'create' | 'update' | 'delete'): void; | ||
| toJSON(): { | ||
| hasChanges: boolean; | ||
| createdValues: T[]; | ||
| updatedValues: T[]; | ||
| deletedValues: T[]; | ||
| }; | ||
| } | ||
| type MapEntityMap<T> = Map<EntityIdValue<T>, T>; | ||
| type MapCrudMap<T> = Record<CrudMapKey, MapEntityMap<T>>; |
@@ -244,2 +244,11 @@ import { writable } from 'svelte/store'; | ||
| } | ||
| toJSON() { | ||
| // Don't expose the private maps as part of the public API | ||
| return { | ||
| hasChanges: this.#hasChanges, | ||
| createdValues: this.createdValues, | ||
| updatedValues: this.updatedValues, | ||
| deletedValues: this.deletedValues, | ||
| }; | ||
| } | ||
| } |
+1
-1
| { | ||
| "name": "@isoftdata/svelte-store-crud", | ||
| "version": "2.5.1", | ||
| "version": "2.6.0", | ||
| "files": [ | ||
@@ -5,0 +5,0 @@ "dist", |
18544
2.4%329
4.78%