@zag-js/store 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +4 -4
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -2,13 +2,13 @@ interface AsRef {
2
2
  $$valtioRef: true;
3
3
  }
4
4
  declare function ref<T extends object>(o: T): T & AsRef;
5
- declare type Path = (string | symbol)[];
6
- declare type Op = [op: "set", path: Path, value: unknown, prevValue: unknown] | [op: "delete", path: Path, prevValue: unknown] | [op: "resolve", path: Path, value: unknown] | [op: "reject", path: Path, error: unknown];
5
+ type Path = (string | symbol)[];
6
+ type Op = [op: "set", path: Path, value: unknown, prevValue: unknown] | [op: "delete", path: Path, prevValue: unknown] | [op: "resolve", path: Path, value: unknown] | [op: "reject", path: Path, error: unknown];
7
7
  declare function proxy<T extends object>(initialObject?: T): T;
8
8
  declare function getVersion(proxyObject: unknown): number | undefined;
9
9
  declare function subscribe<T extends object>(proxyObject: T, callback: (ops: Op[]) => void, notifyInSync?: boolean): () => void;
10
- declare type AnyFunction = (...args: any[]) => any;
11
- declare type Snapshot<T> = T extends AnyFunction ? T : T extends AsRef ? T : T extends Promise<infer V> ? Snapshot<V> : {
10
+ type AnyFunction = (...args: any[]) => any;
11
+ type Snapshot<T> = T extends AnyFunction ? T : T extends AsRef ? T : T extends Promise<infer V> ? Snapshot<V> : {
12
12
  readonly [K in keyof T]: Snapshot<T[K]>;
13
13
  };
14
14
  declare function snapshot<T extends object>(proxyObject: T): Snapshot<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/store",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "The reactive store package for zag machines",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",