react-app-store-manager 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
package/dist/Store.d.ts CHANGED
@@ -6,7 +6,7 @@ export interface StoreInterface<Value, Action> {
6
6
  context: Context<Value>;
7
7
  value: Value;
8
8
  update(store: (store: Value) => Value): void;
9
- action(actions: (action: Action) => any): void;
9
+ action(actions: (action: Action) => any): any;
10
10
  subscribe(listener: ListenerInterface): void;
11
11
  unsubscribe(listener: ListenerInterface): void;
12
12
  }
@@ -17,7 +17,7 @@ export declare class Store<Value, Action> implements StoreInterface<Value, Actio
17
17
  private listeners;
18
18
  constructor(value: Value, actions?: Action);
19
19
  update(callback: any): void;
20
- action(callback: any): void;
20
+ action(callback: any): any;
21
21
  subscribe(listener: ListenerInterface): void;
22
22
  unsubscribe(listener: ListenerInterface): void;
23
23
  }
package/dist/Store.js CHANGED
@@ -21,7 +21,7 @@ var Store = /** @class */ (function () {
21
21
  }
22
22
  };
23
23
  Store.prototype.action = function (callback) {
24
- callback(this.actions);
24
+ return callback(this.actions);
25
25
  };
26
26
  Store.prototype.subscribe = function (listener) {
27
27
  this.listeners.push(listener);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-app-store-manager",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "tsc --declaration"