@nemigo/svelte 2.8.3 → 2.9.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.
@@ -68,3 +68,5 @@ export declare const createSvelteDerived: <V>(effect: () => V) => ISvelteDerived
68
68
  */
69
69
  export type ISvelteWritableDerived<V> = ISvelteState<V>;
70
70
  export declare const createSvelteWritableDerived: <T>(effect: () => T) => ISvelteWritableDerived<T>;
71
+ export declare const createSvelteSnapshot: <V>(v: V) => V;
72
+ export declare const createSvelteEffect: (func: () => void) => void;
@@ -92,3 +92,9 @@ export const createSvelteWritableDerived = (effect) => {
92
92
  },
93
93
  };
94
94
  };
95
+ //...
96
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
97
+ export const createSvelteSnapshot = (v) => $state.snapshot(v);
98
+ export const createSvelteEffect = (func) => {
99
+ $effect(func);
100
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nemigo/svelte",
3
- "version": "2.8.3",
3
+ "version": "2.9.0",
4
4
  "private": false,
5
5
  "license": "MPL-2.0",
6
6
  "author": {