@yaasl/preact 0.10.0-alpha.0 → 0.10.0-alpha.2

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.
@@ -1,5 +1,5 @@
1
1
  import { Stateful } from "@yaasl/core";
2
- import { SetStateAction } from "@yaasl/utils";
2
+ import { Updater } from "@yaasl/utils";
3
3
  /** Use an atom's value in the preact lifecycle.
4
4
  *
5
5
  * @param atom Atom to be used.
@@ -13,7 +13,7 @@ export declare const useAtomValue: <ValueType>(atom: Stateful<ValueType>) => Val
13
13
  *
14
14
  * @returns A setter function for the atom.
15
15
  **/
16
- export declare const useSetAtom: <ValueType>(atom: Stateful<ValueType>) => ((next: SetStateAction<ValueType>) => void);
16
+ export declare const useSetAtom: <ValueType>(atom: Stateful<ValueType>) => ((next: Updater<ValueType>) => void);
17
17
  /** Use an atom's initialization state in the preact lifecycle.
18
18
  *
19
19
  * @param atom Atom to be used.
@@ -29,4 +29,4 @@ export declare const useAtomDidInit: <ValueType>(atom: Stateful<ValueType>) => b
29
29
  *
30
30
  * @returns [value, setValue, didInit]
31
31
  **/
32
- export declare const useAtom: <ValueType>(atom: Stateful<ValueType>) => readonly [ValueType, (next: SetStateAction<ValueType>) => void, boolean];
32
+ export declare const useAtom: <ValueType>(atom: Stateful<ValueType>) => readonly [ValueType, (next: Updater<ValueType>) => void, boolean];
@@ -1,4 +1,4 @@
1
1
  import { Stateful } from "@yaasl/core";
2
- import { SetStateAction } from "@yaasl/utils";
3
- export declare const useStatefulValue: <ValueType>(atom: Stateful<ValueType>) => ValueType;
4
- export declare const useSetStateful: <ValueType>(stateful: Stateful<ValueType>) => (next: SetStateAction<ValueType>) => void;
2
+ import { Updater } from "@yaasl/utils";
3
+ export declare const useStatefulValue: <State>(atom: Stateful<State>) => State;
4
+ export declare const useSetStateful: <State>(stateful: Stateful<State>) => (next: Updater<State>) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaasl/preact",
3
- "version": "0.10.0-alpha.0",
3
+ "version": "0.10.0-alpha.2",
4
4
  "description": "yet another atomic store library (preact)",
5
5
  "author": "PrettyCoffee",
6
6
  "license": "MIT",
@@ -41,8 +41,8 @@
41
41
  "preact": ">=10"
42
42
  },
43
43
  "dependencies": {
44
- "@yaasl/core": "0.10.0-alpha.0",
45
- "@yaasl/utils": "0.10.0-alpha.0"
44
+ "@yaasl/core": "0.10.0-alpha.2",
45
+ "@yaasl/utils": "0.10.0-alpha.2"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@testing-library/preact": "^3.2.3",