-
-
Notifications
You must be signed in to change notification settings - Fork 522
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
TypeScript support #160
TypeScript support #160
Conversation
ref: #54 |
Thanks a lot for your PR! I'll check it out when I have some time. 😉 |
@joe-re, thank you! (This is just a temporary hack for those trying to get started quickly; the repository will not be maintained and may well disappear after typescript definitions are included with vue-apollo.) |
types/vue-apollo.d.ts
Outdated
export class VueApollo implements PluginObject<{}> { | ||
[key: string]: any; | ||
install: PluginFunction<{}>; | ||
constructor (options: {defaultClient: ApolloClient<{}>}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we also need defaultOptions
key here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I missed it. Is this right? 230078a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just starting to work with Vue Apollo and I'm not really sure what all defaultOptions
are. I can't see them in the documentaion. Maybe @Akryum can confirm that.
On the other hand looks like there are more constructor options as mentioned in the docs here and please see the source code here
By the way, great work putting this together! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many Vue projects have TypeScript declarations inside itself and support TypeScript.
vue-router, vuex, etc...
I want to support TypeScript on our project too.
I implement typescript declarations and run typed test for this example.
(added
yarn run test:types
command)I thought I checked all the APIs, but please let me know if there are missing parts.