Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
57f3cb2572
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      types/index.d.ts

+ 2 - 2
types/index.d.ts

@@ -86,8 +86,8 @@ export interface StoreOptions<S> {
   strict?: boolean;
   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;
   root?: boolean;
   handler: ActionHandler<S, R>;
   handler: ActionHandler<S, R>;
 }
 }