Skip to content
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

type Getter<S,R> should declare optional parameters #56

Open
kbirger opened this issue Oct 10, 2019 · 0 comments
Open

type Getter<S,R> should declare optional parameters #56

kbirger opened this issue Oct 10, 2019 · 0 comments

Comments

@kbirger
Copy link

kbirger commented Oct 10, 2019

Currently, the definition is:

export type Getter<S, R> = (state: S, getters: any, rootState: R, rootGetters: any) => any;

every parameter other than state: S is actually optional, and should be declared as such.

Right now this is keeping me from actually using these types, because using them would make my unit test code messy with extraneous null-valued params.

Also, could you provide some guidance on when these typings are actually useful? As far as I know, these classes are never used directly, but rather by Vuex internals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant