瀏覽代碼

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 年之前
父節點
當前提交
57f3cb2572
共有 1 個文件被更改,包括 2 次插入2 次删除
  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>;
 }