Skip to content

export ActionHandler #1201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 2, 2018
Merged

export ActionHandler #1201

merged 1 commit into from
Apr 2, 2018

Conversation

sks
Copy link
Contributor

@sks sks commented Mar 26, 2018

  • 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

type ModuleAction<ModuleState> = (injectee: ActionContext<ModuleState, State>, payload: any) => any;
const loginAction = userActions.login as ModuleAction<UserState>;

- 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>;
```
@ktsn
Copy link
Member

ktsn commented Mar 27, 2018

May I ask why you need this type on testing more concretely? I'm still not sure why explicit casting is needed in that case.

@ktsn ktsn added the types Related to typings only label Mar 27, 2018
@ktsn ktsn merged commit 57f3cb2 into vuejs:dev Apr 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types Related to typings only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants