Browse Source

export ActionHandler (#1201)

- while testing we have methods using this method signature and it would be nice if we did not have define this.

We were running into the issue as reported in https://github.com/Microsoft/TypeScript/issues/7960

So workaround was to do something like
```
const loginAction = userActions.login as ModuleAction<UserState>;
```
Sabith Karippullil Soopy 7 years ago
parent
commit
57f3cb2572
1 changed files with 2 additions and 2 deletions
  1. 2 2
      types/index.d.ts

+ 2 - 2
types/index.d.ts

@@ -86,8 +86,8 @@ export interface StoreOptions<S> {
   strict?: boolean;
 }
 
-type ActionHandler<S, R> = (injectee: ActionContext<S, R>, payload: any) => any;
-interface ActionObject<S, R> {
+export type ActionHandler<S, R> = (injectee: ActionContext<S, R>, payload: any) => any;
+export interface ActionObject<S, R> {
   root?: boolean;
   handler: ActionHandler<S, R>;
 }