coaction 0.1.4 → 0.2.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.
- package/LICENSE +21 -0
- package/README.md +13 -1
- package/dist/{declarations/src/interface.d.ts → index.d.mts} +136 -70
- package/dist/index.d.ts +290 -0
- package/dist/index.js +841 -0
- package/dist/index.mjs +818 -0
- package/package.json +24 -22
- package/dist/coaction.cjs.d.mts +0 -2
- package/dist/coaction.cjs.d.ts +0 -2
- package/dist/coaction.cjs.js +0 -661
- package/dist/coaction.cjs.mjs +0 -5
- package/dist/coaction.esm.js +0 -655
- package/dist/coaction.umd.min.js +0 -2
- package/dist/coaction.umd.min.js.map +0 -1
- package/dist/declarations/src/binder.d.ts +0 -27
- package/dist/declarations/src/create.d.ts +0 -5
- package/dist/declarations/src/index.d.ts +0 -4
- package/dist/declarations/src/wrapStore.d.ts +0 -5
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Store } from "./interface.js";
|
|
2
|
-
/**
|
|
3
|
-
* createBinder is a function to create a binder for the 3rd party store.
|
|
4
|
-
*/
|
|
5
|
-
export declare function createBinder<F = (...args: any[]) => any>({ handleState, handleStore }: {
|
|
6
|
-
/**
|
|
7
|
-
* handleState is a function to handle the state object.
|
|
8
|
-
*/
|
|
9
|
-
handleState: <T extends object = object>(state: T) => {
|
|
10
|
-
/**
|
|
11
|
-
* copyState is a copy of the state object.
|
|
12
|
-
*/
|
|
13
|
-
copyState: T;
|
|
14
|
-
/**
|
|
15
|
-
* key is the key of the state object.
|
|
16
|
-
*/
|
|
17
|
-
key?: keyof T;
|
|
18
|
-
/**
|
|
19
|
-
* bind is a function to bind the state object.
|
|
20
|
-
*/
|
|
21
|
-
bind: (state: T) => T;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* handleStore is a function to handle the store object.
|
|
25
|
-
*/
|
|
26
|
-
handleStore: (store: Store<object>, rawState: object, state: object) => void;
|
|
27
|
-
}): F;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { create } from "./create.js";
|
|
2
|
-
export { createBinder } from "./binder.js";
|
|
3
|
-
export { wrapStore } from "./wrapStore.js";
|
|
4
|
-
export type { Store, StoreOptions, ISlices, Slice, Slices, Middleware, ClientStoreOptions, SliceState, Asyncify, StoreWithAsyncFunction as AsyncStore } from "./interface.js";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Store, StoreReturn } from "./interface.js";
|
|
2
|
-
/**
|
|
3
|
-
* wrapStore is a function to wrap the store and return function to get the state with store.
|
|
4
|
-
*/
|
|
5
|
-
export declare const wrapStore: (store: Store<any>, getState?: (...args: any[]) => any) => StoreReturn<any>;
|