Skip to content

Commit

Permalink
export ActionHandler (#1201)
Browse files Browse the repository at this point in the history
- 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 microsoft/TypeScript#7960

So workaround was to do something like
```
const loginAction = userActions.login as ModuleAction<UserState>;
```
  • Loading branch information
sks authored and ktsn committed Apr 2, 2018
1 parent c5330d9 commit 57f3cb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
}
Expand Down

0 comments on commit 57f3cb2

Please sign in to comment.