valtio-define 1.1.4 → 1.1.5

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/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as GettersReturnType, c as PluginContext, d as StoreDefine, f as StoreDefineOptions, h as SubscribeKey, i as Getters, l as Signal, m as Subscribe, n as ActionsOmitThisParameter, o as Patch, p as StoreOptions, r as ActionsTree, s as Plugin, t as Actions, u as Store } from "./types-BA_0y5TQ.mjs";
1
+ import { a as GettersReturnType, c as PluginContext, d as StoreDefine, f as StoreDefineOptions, h as SubscribeKey, i as Getters, l as Signal, m as Subscribe, n as ActionsOmitThisParameter, o as Patch, p as StoreOptions, r as ActionsTree, s as Plugin, t as Actions, u as Store } from "./types-BW_uQuTb.mjs";
2
2
  import { Snapshot } from "valtio";
3
3
  import { Dispatch, SetStateAction } from "react";
4
4
 
@@ -35,7 +35,7 @@ declare function use(plugin: Plugin): void;
35
35
  *
36
36
  * ```
37
37
  */
38
- declare function defineStore<S extends object, A extends Actions<S>, G extends Getters<S>>(define: StoreDefine<S, A, G>): Store<S, A, G>;
38
+ declare function defineStore<S extends object = {}, A extends Actions<S> = {}, G extends Getters<S> = {}>(define: StoreDefine<S, A, G>): Store<S, A, G>;
39
39
  //#endregion
40
40
  //#region src/hooks.d.ts
41
41
  interface UseStoreOptions {
@@ -1,4 +1,4 @@
1
- import { s as Plugin } from "../../types-BA_0y5TQ.mjs";
1
+ import { s as Plugin } from "../../types-BW_uQuTb.mjs";
2
2
  import { PersistentOptions, PersistentStore } from "./types.mjs";
3
3
 
4
4
  //#region src/plugins/persist/index.d.ts
@@ -27,7 +27,7 @@ interface Patch<S, G extends Getters<S>> {
27
27
  (patch: Partial<S> | ((state: S & GettersReturnType<G>) => void)): void;
28
28
  }
29
29
  interface StoreOptions {}
30
- type Store<S, A extends Actions<S> = Actions<S>, G extends Getters<S> = Getters<S>> = {
30
+ type Store<S, A extends Actions<S>, G extends Getters<S>> = {
31
31
  $subscribe: Subscribe<S, G>;
32
32
  $subscribeKey: SubscribeKey<S, G>;
33
33
  $patch: Patch<S, G>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valtio-define",
3
3
  "type": "module",
4
- "version": "1.1.4",
4
+ "version": "1.1.5",
5
5
  "description": "⚡quickly create a fully functional and robust Valtio factory",
6
6
  "author": "Hairyf <wwu710632@gmail.com>",
7
7
  "license": "MIT",