Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Add Vue 2.x typings for TypeScript #611

Merged
merged 10 commits into from
Feb 11, 2018
Merged

Add Vue 2.x typings for TypeScript #611

merged 10 commits into from
Feb 11, 2018

Conversation

dl00
Copy link
Contributor

@dl00 dl00 commented May 27, 2017

The current implementation of @types/vue-resource was causing my build to fail because it was pulling the empty @types/vue repo. I designed this fork in order to solve this problem for my project, and it is working with only a minor caveat from what I can tell. The implementation style is influenced by the typings for the official Vue project, Vuex, and vue-router type implementations.

The only problem that I have encountered at this point is the static Vue members "http" and "resource". Unfortunately due to a limitation in typescript (microsoft/TypeScript#819). The easiest way I have found to resolve this problem is to run Vue.resource or Vue.http calls in a separate plain .js file.

Please let me know if you want me to add documentation, tests, or something like that.

dbeal-eth and others added 4 commits May 26, 2017 11:37
Vue 2.x compatible and follows the convention which
seems to be popular for the official Vue projects.
Apparently typeof is required in the PluginFunction signature
The $http object had some response management issues
with retrieving the response data
@steffans
Copy link
Member

steffans commented Jun 9, 2017

Thanks, i don't use typescript in project atm. You can explain some basics in the docs config part, https://github.com/pagekit/vue-resource/blob/develop/docs/config.md

Then i will merge you PR and for the next release!

@antgubarev
Copy link

Status? Typescript still not allowed?

This is just to be clear.
@dl00
Copy link
Contributor Author

dl00 commented Feb 10, 2018

I'm sorry, I forgot I ever made this merge request :)

I added the docs (they are not that long since it should work out of the box). You can merge if you want. I have been using this vue-resource repository in my project for awhile now so it should work.

@antgubarev
Copy link

Thanks! @steffans can you merge this PR?

@steffans steffans merged commit 9744ccc into pagekit:develop Feb 11, 2018
@antgubarev
Copy link

Thanks!

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

Successfully merging this pull request may close these issues.

5 participants