@lomray/react-mobx-manager 4.3.0-beta.2 → 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 +4 -5
- package/parent-store.js.map +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
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { IConstructableStore,
|
|
1
|
+
import { IConstructableStore, IStoreConfig } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* Mark store definition as parent store
|
|
4
4
|
*/
|
|
5
|
-
declare const parentStore: <
|
|
6
|
-
store:
|
|
7
|
-
|
|
8
|
-
};
|
|
5
|
+
declare const parentStore: <TStore extends IConstructableStore<import("./types.js").IStore<Record<string, any>>>>(store: TStore) => {
|
|
6
|
+
store: TStore;
|
|
7
|
+
} & IStoreConfig;
|
|
9
8
|
export { parentStore as default };
|
package/parent-store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parent-store.js","sources":["../src/parent-store.ts"],"sourcesContent":["import type { IConstructableStore,
|
|
1
|
+
{"version":3,"file":"parent-store.js","sources":["../src/parent-store.ts"],"sourcesContent":["import type { IConstructableStore, IStoreConfig } from './types';\n\n/**\n * Mark store definition as parent store\n */\nconst parentStore = <TStore extends IConstructableStore>(\n store: TStore,\n): { store: TStore } & IStoreConfig => ({\n store,\n isParent: true as const,\n});\n\nexport default parentStore;\n"],"names":["parentStore","store","isParent"],"mappings":"AAKA,MAAMA,EACJC,IAAa,CAEbA,QACAC,UAAU"}
|
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
|
}
|