소스 검색

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>;
 }