@lomray/react-mobx-manager 2.1.2-beta.3 → 2.1.2

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/lib/context.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  import React from 'react';
3
3
  import { FC, ReactElement } from "react";
4
4
  import Manager from "./manager.js";
5
- import { TStores } from "./types-a4b71460.js";
5
+ import { TStores } from "./types-70019566.js";
6
6
  interface IStoreManagerProvider {
7
7
  storeManager: Manager;
8
8
  shouldInit?: boolean;
package/lib/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from "./types-a4b71460.js";
1
+ export * from "./types-70019566.js";
2
2
  export * from "./context.js";
3
3
  export { default as Manager } from "./manager.js";
4
4
  export { default as onChangeListener } from "./on-change-listener.js";
package/lib/manager.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import StoreStatus from "./store-status.js";
2
- import { IConstructableStore, IManagerOptions, IManagerParams, IStorage, IStoreParams, TAnyStore, TInitStore, TStoreDefinition, TStores } from "./types-a4b71460.js";
2
+ import { IConstructableStore, IManagerOptions, IManagerParams, IStorage, IStoreParams, TAnyStore, TInitStore, TStoreDefinition, TStores } from "./types-70019566.js";
3
3
  /**
4
4
  * Mobx stores manager
5
5
  */
@@ -11,7 +11,7 @@ declare class Manager {
11
11
  /**
12
12
  * Created stores
13
13
  */
14
- protected readonly stores: Map<string, TInitStore<import("./types-a4b71460.js").IStore>>;
14
+ protected readonly stores: Map<string, TInitStore<import("./types-70019566.js").IStore>>;
15
15
  /**
16
16
  * Relations between stores
17
17
  * @protected
@@ -1,4 +1,4 @@
1
- import { IStorePersisted } from "./types-a4b71460.js";
1
+ import { IStorePersisted } from "./types-70019566.js";
2
2
  /**
3
3
  * Listen persist store changes
4
4
  */
@@ -1,4 +1,4 @@
1
- import { IStorage } from "../types-a4b71460.js";
1
+ import { IStorage } from "../types-70019566.js";
2
2
  interface IAsyncStorage {
3
3
  getItem: (key: string) => Promise<string | null>;
4
4
  setItem: (key: string, value: string) => Promise<void>;
@@ -1,4 +1,4 @@
1
- import { IStorage } from "../types-a4b71460.js";
1
+ import { IStorage } from "../types-70019566.js";
2
2
  /**
3
3
  * Local storage for mobx store manager
4
4
  */
@@ -1,4 +1,4 @@
1
- import { TInitStore } from "./types-a4b71460.js";
1
+ import { TInitStore } from "./types-70019566.js";
2
2
  interface IPromise<TReturn> extends Promise<TReturn> {
3
3
  status?: 'fulfilled' | 'pending' | 'rejected';
4
4
  value?: TReturn;
@@ -42,7 +42,7 @@ type IConstructableStore<TSto = IStore> = (new (props: IConstructorParams) => TI
42
42
  type IStoreConfig = {
43
43
  id?: string;
44
44
  };
45
- type TStoreDefinition<TSto = TAnyStore> = IConstructableStore<TSto> | ({
45
+ type TStoreDefinition<TSto extends TAnyStore = any> = IConstructableStore<TSto> | ({
46
46
  store: IConstructableStore<TSto>;
47
47
  } & IStoreConfig);
48
48
  type TMapStores = Record<string, TStoreDefinition>;
package/lib/wakeup.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { TStores, TWakeup } from "./types-a4b71460.js";
1
+ import { TStores, TWakeup } from "./types-70019566.js";
2
2
  /**
3
3
  * Restore persisted store state
4
4
  */
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { TMapStores, IWithStoreOptions } from "./types-a4b71460.js";
2
+ import { TMapStores, IWithStoreOptions } from "./types-70019566.js";
3
3
  /**
4
4
  * Make component observable and pass stores as props
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lomray/react-mobx-manager",
3
- "version": "2.1.2-beta.3",
3
+ "version": "2.1.2",
4
4
  "description": "This package provides Mobx stores manager for react.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",