From 8b7c424fb580553297a1b6dcd1c4d784dd050877 Mon Sep 17 00:00:00 2001 From: Gurkirat Singh Date: Wed, 28 Oct 2020 21:15:02 +0530 Subject: [PATCH 1/2] Update vue.d.ts Use Promise instead of DOM's PromiseLIke --- types/vue.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/vue.d.ts b/types/vue.d.ts index 8a34ac6a..6046c56a 100644 --- a/types/vue.d.ts +++ b/types/vue.d.ts @@ -14,7 +14,7 @@ declare module "vue/types/options" { declare module "vue/types/vue" { interface Vue { $http: { - (options: HttpOptions): PromiseLike; + (options: HttpOptions): Promise; get: $http; post: $http; put: $http; From c8121086a0fb3ed9a574c0e7b1726d76c6522ee5 Mon Sep 17 00:00:00 2001 From: Gurkirat Singh Date: Thu, 29 Oct 2020 13:05:20 +0530 Subject: [PATCH 2/2] Update vue_resource.ts Fixed root types --- types/vue_resource.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/types/vue_resource.ts b/types/vue_resource.ts index 2adca137..939c90a2 100644 --- a/types/vue_resource.ts +++ b/types/vue_resource.ts @@ -38,8 +38,8 @@ export interface HttpOptions { } export interface $http { - (url: string, data?: any, options?: HttpOptions): PromiseLike; - (url: string, options?: HttpOptions): PromiseLike; + (url: string, data?: any, options?: HttpOptions): Promise; + (url: string, options?: HttpOptions): Promise; } export interface HttpInterceptor { @@ -69,9 +69,9 @@ export interface ResourceActions { } export interface ResourceMethod { - (params: any, data?: any, success?: Function, error?: Function): PromiseLike; - (params: any, success?: Function, error?: Function): PromiseLike; - (success?: Function, error?: Function): PromiseLike; + (params: any, data?: any, success?: Function, error?: Function): Promise; + (params: any, success?: Function, error?: Function): Promise; + (success?: Function, error?: Function): Promise; } export interface ResourceMethods {