This repository was archived by the owner on Dec 1, 2023. It is now read-only.
Add Vue 2.x typings for TypeScript #611
Merged
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
The current implementation of
@types/vue-resourcewas causing my build to fail because it was pulling the empty@types/vuerepo. 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.