pagekit / vue-resource

The HTTP client for Vue.js
MIT License
10.08k stars 1.6k forks source link

Typescript: expose PromiseObj interface instead of using PromiseLike #688

Open zuozp8 opened 6 years ago

zuozp8 commented 6 years ago

I was rewriting my code as typescript and i noticed that result of this.$http.post(…) doesn't know that it has methods catch and finally

pedrosoares commented 6 years ago

Same problem here, the temporary solution was to use: .then(success => {/*code*/}, error => {/*code*/}); Or you can rewrite the index.d.ts from @types/vue-resource.