@lomray/react-mobx-manager 4.3.0-beta.3 → 4.3.0-beta.4
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/manager.d.ts +1 -1
- package/package.json +1 -1
- package/parent-store.d.ts +1 -1
- package/types.d.ts +4 -4
package/manager.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare class Manager {
|
|
|
13
13
|
/**
|
|
14
14
|
* Created stores
|
|
15
15
|
*/
|
|
16
|
-
protected readonly stores: Map<string, TInitStore<import("./types.js").IStore
|
|
16
|
+
protected readonly stores: Map<string, TInitStore<import("./types.js").IStore<Record<string, any>>>>;
|
|
17
17
|
/**
|
|
18
18
|
* Relations between stores
|
|
19
19
|
*/
|
package/package.json
CHANGED
package/parent-store.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { IConstructableStore, IStoreConfig } from "./types.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Mark store definition as parent store
|
|
4
4
|
*/
|
|
5
|
-
declare const parentStore: <TStore extends IConstructableStore<import("./types.js").IStore
|
|
5
|
+
declare const parentStore: <TStore extends IConstructableStore<import("./types.js").IStore<Record<string, any>>>>(store: TStore) => {
|
|
6
6
|
store: TStore;
|
|
7
7
|
} & IStoreConfig;
|
|
8
8
|
export { parentStore as default };
|
package/types.d.ts
CHANGED
|
@@ -18,12 +18,12 @@ interface IConstructorParams<TProps = any> {
|
|
|
18
18
|
componentProps: TProps;
|
|
19
19
|
initState?: Record<string, any>;
|
|
20
20
|
}
|
|
21
|
-
interface IStoreLifecycle {
|
|
21
|
+
interface IStoreLifecycle<TProps = Record<string, any>> {
|
|
22
22
|
init?: () => void | (() => void);
|
|
23
23
|
onDestroy?: () => void;
|
|
24
|
-
onComponentPropsUpdate?: (props:
|
|
24
|
+
onComponentPropsUpdate?: (props: TProps) => void;
|
|
25
25
|
}
|
|
26
|
-
interface IStore extends IStoreLifecycle {
|
|
26
|
+
interface IStore<TProps = Record<string, any>> extends IStoreLifecycle<TProps> {
|
|
27
27
|
libStoreId?: string;
|
|
28
28
|
libStoreContextId?: string;
|
|
29
29
|
libStoreParentId?: string;
|
|
@@ -34,7 +34,7 @@ interface IStore extends IStoreLifecycle {
|
|
|
34
34
|
isGlobal?: boolean;
|
|
35
35
|
toJSON?: () => Record<string, any>;
|
|
36
36
|
}
|
|
37
|
-
interface IRelativeStore extends IStore {
|
|
37
|
+
interface IRelativeStore<TProps = Record<string, any>> extends IStore<TProps> {
|
|
38
38
|
}
|
|
39
39
|
interface IGlobalStore extends IStore {
|
|
40
40
|
}
|