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

fix(types): add lost argument of useStore #1803

Merged
merged 3 commits into from
Aug 11, 2020

Conversation

euaaaio
Copy link
Contributor

@euaaaio euaaaio commented Jul 27, 2020

This PR adds lost argument key to useStore function types.
Resolve #1807

@kiaking
Copy link
Member

kiaking commented Aug 4, 2020

Thanks for the PR! Yap, this is a defect. However, could you add support for InjectionKey as well as String?
Ref: https://composition-api.vuejs.org/api.html#dependency-injection

So It should be I think?

export function useStore<S = any>(key?: InjectionKey<Store<S>> | string): Store<S>;

@kiaking kiaking added the types Related to typings only label Aug 4, 2020
@euaaaio
Copy link
Contributor Author

euaaaio commented Aug 4, 2020

@kiaking, you're right. I refactored and added a few tests.

types/index.d.ts Outdated Show resolved Hide resolved
@euaaaio euaaaio requested a review from kiaking August 5, 2020 12:47
Copy link
Member

@kiaking kiaking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot 🙌

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