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

Broken type definitions for getStore #67

Closed
gcbirzan opened this issue Jul 3, 2018 · 2 comments
Closed

Broken type definitions for getStore #67

gcbirzan opened this issue Jul 3, 2018 · 2 comments
Assignees
Labels

Comments

@gcbirzan
Copy link

gcbirzan commented Jul 3, 2018

Vapi.getStore is declared as returning a Store object, but if you pass createStateFn: false, that's not the case.

First of all, I think that API is silly. There should be a different function, maybe getStoreObject that abstracts this. But, even if you don't agree with that idea, the type definition needs to be updated.

@christianmalek
Copy link
Owner

Hey @gcbirzan,

thanks for your bug report. I'll fix this soon.

Could you please elaborate why you think the API is silly? Do you see think the passed config object({ createStateFn: false} is'nt clear enough? Or do you refer to avoid union return types?

@christianmalek
Copy link
Owner

I'll close this issue. Feel free to reopen it.

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

No branches or pull requests

2 participants