state-decorator 7.3.0 → 7.3.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.
- package/development.d.ts +10 -10
- package/es/development.d.ts +10 -10
- package/es/graph.d.ts +8 -8
- package/es/helpers.d.ts +67 -67
- package/es/impl.d.ts +208 -208
- package/es/impl.js +1 -1
- package/es/index.d.ts +169 -169
- package/es/middlewares.d.ts +3 -3
- package/es/shallow.d.ts +1 -1
- package/es/test.d.ts +126 -122
- package/es/test.js +1 -1
- package/es/test.js.map +1 -1
- package/es/types.d.ts +386 -386
- package/es/v5.d.ts +45 -45
- package/es/v5_test.d.ts +57 -57
- package/es/v5_types.d.ts +213 -213
- package/es/v6.d.ts +21 -21
- package/graph.d.ts +8 -8
- package/helpers.d.ts +67 -67
- package/impl.d.ts +208 -208
- package/impl.js +1 -1
- package/index.d.ts +169 -169
- package/middlewares.d.ts +3 -3
- package/package.json +1 -1
- package/shallow.d.ts +1 -1
- package/test.d.ts +126 -122
- package/test.js +1 -1
- package/test.js.map +1 -1
- package/types.d.ts +386 -386
- package/v5.d.ts +45 -45
- package/v5_test.d.ts +57 -57
- package/v5_types.d.ts +213 -213
- package/v6.d.ts +21 -21
package/v6.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { GlobalConfig, ParallelActionError, EffectError } from './impl';
|
|
2
|
-
import type { DecoratedActions, StoreActions, AsyncAction, SyncAction, SimpleSyncAction, LoadingMap, ErrorMap, LoadingParallelMap, ErrorParallelMap, StoreOptions as StoreOptionsBase, AsyncActionPromise, InvocationContext, GetPromiseInvocationContext, EffectsInvocationContext, InvocationContextActions, WarningNotifyFunc, ErrorEffectsInvocationContext, OnMountInvocationContext, ContextBase, OnPropsChangeEffectsContext, ContextState, Middleware, AbortActionCallback, MiddlewareFactory, LoadingProps, ErrorProps, LoadingMapProps, StoreConfig } from './types';
|
|
3
|
-
import { setGlobalConfig, IsLoadingFunc, StoreApi, StateListenerContext, ConflictPolicy } from './index';
|
|
4
|
-
export type { StateListenerContext, StoreApi, DecoratedActions, StoreActions, LoadingMap, ErrorMap, LoadingParallelMap, ErrorParallelMap, AsyncActionPromise as AsynchActionPromise, InvocationContext, GetPromiseInvocationContext, EffectsInvocationContext, InvocationContextActions, WarningNotifyFunc, ErrorEffectsInvocationContext, OnMountInvocationContext, ContextBase, OnPropsChangeEffectsContext, SyncAction, AsyncAction, SimpleSyncAction, ContextState, GlobalConfig, Middleware, LoadingProps, AbortActionCallback, ErrorProps, LoadingMapProps, StoreConfig, IsLoadingFunc, };
|
|
5
|
-
export { EffectError, ParallelActionError, ConflictPolicy, setGlobalConfig };
|
|
6
|
-
export type StoreOptions<S, A, P = {}, DS = {}, FxRes = S> = StoreOptionsBase<S, A, P, DS, FxRes>;
|
|
7
|
-
export type StoreAction<S, F extends (...args: any[]) => any, A, P, DS = {}, FxRes = S> = AsyncAction<S, F, A, P, DS, FxRes> | SimpleSyncAction<S, F, P, DS, FxRes> | SyncAction<S, F, A, P, DS, FxRes>;
|
|
8
|
-
/**
|
|
9
|
-
* Creates and manages a local store.
|
|
10
|
-
* The component will be refreshed for every change in the store.
|
|
11
|
-
* Store will NOT be destroyed when component is unmouted.
|
|
12
|
-
*
|
|
13
|
-
* @param getInitialState Function to compute initial state from props.
|
|
14
|
-
* @param actionImpl Actions implementation.
|
|
15
|
-
* @param props Owner component props to update state or react on prop changes
|
|
16
|
-
* @param options The store options.
|
|
17
|
-
* @param refreshOnUpdate Whether refresh the component if store state changes.
|
|
18
|
-
* @returns The state, actions and isLoading function.
|
|
19
|
-
*/
|
|
20
|
-
export default function useLocalStoreV6<S, A extends DecoratedActions, P, DS = {}>(getInitialState: (p: P) => S, actionImpl: StoreActions<S, A, P, DS>, props?: P, options?: StoreOptions<S, A, P, DS>, middlewares?: MiddlewareFactory<S, A, P>[], refreshOnUpdate?: boolean): StoreApi<S, A, P, DS>;
|
|
21
|
-
export declare const useLocalStore: typeof useLocalStoreV6;
|
|
1
|
+
import { GlobalConfig, ParallelActionError, EffectError } from './impl';
|
|
2
|
+
import type { DecoratedActions, StoreActions, AsyncAction, SyncAction, SimpleSyncAction, LoadingMap, ErrorMap, LoadingParallelMap, ErrorParallelMap, StoreOptions as StoreOptionsBase, AsyncActionPromise, InvocationContext, GetPromiseInvocationContext, EffectsInvocationContext, InvocationContextActions, WarningNotifyFunc, ErrorEffectsInvocationContext, OnMountInvocationContext, ContextBase, OnPropsChangeEffectsContext, ContextState, Middleware, AbortActionCallback, MiddlewareFactory, LoadingProps, ErrorProps, LoadingMapProps, StoreConfig } from './types';
|
|
3
|
+
import { setGlobalConfig, IsLoadingFunc, StoreApi, StateListenerContext, ConflictPolicy } from './index';
|
|
4
|
+
export type { StateListenerContext, StoreApi, DecoratedActions, StoreActions, LoadingMap, ErrorMap, LoadingParallelMap, ErrorParallelMap, AsyncActionPromise as AsynchActionPromise, InvocationContext, GetPromiseInvocationContext, EffectsInvocationContext, InvocationContextActions, WarningNotifyFunc, ErrorEffectsInvocationContext, OnMountInvocationContext, ContextBase, OnPropsChangeEffectsContext, SyncAction, AsyncAction, SimpleSyncAction, ContextState, GlobalConfig, Middleware, LoadingProps, AbortActionCallback, ErrorProps, LoadingMapProps, StoreConfig, IsLoadingFunc, };
|
|
5
|
+
export { EffectError, ParallelActionError, ConflictPolicy, setGlobalConfig };
|
|
6
|
+
export type StoreOptions<S, A, P = {}, DS = {}, FxRes = S> = StoreOptionsBase<S, A, P, DS, FxRes>;
|
|
7
|
+
export type StoreAction<S, F extends (...args: any[]) => any, A, P, DS = {}, FxRes = S> = AsyncAction<S, F, A, P, DS, FxRes> | SimpleSyncAction<S, F, P, DS, FxRes> | SyncAction<S, F, A, P, DS, FxRes>;
|
|
8
|
+
/**
|
|
9
|
+
* Creates and manages a local store.
|
|
10
|
+
* The component will be refreshed for every change in the store.
|
|
11
|
+
* Store will NOT be destroyed when component is unmouted.
|
|
12
|
+
*
|
|
13
|
+
* @param getInitialState Function to compute initial state from props.
|
|
14
|
+
* @param actionImpl Actions implementation.
|
|
15
|
+
* @param props Owner component props to update state or react on prop changes
|
|
16
|
+
* @param options The store options.
|
|
17
|
+
* @param refreshOnUpdate Whether refresh the component if store state changes.
|
|
18
|
+
* @returns The state, actions and isLoading function.
|
|
19
|
+
*/
|
|
20
|
+
export default function useLocalStoreV6<S, A extends DecoratedActions, P, DS = {}>(getInitialState: (p: P) => S, actionImpl: StoreActions<S, A, P, DS>, props?: P, options?: StoreOptions<S, A, P, DS>, middlewares?: MiddlewareFactory<S, A, P>[], refreshOnUpdate?: boolean): StoreApi<S, A, P, DS>;
|
|
21
|
+
export declare const useLocalStore: typeof useLocalStoreV6;
|