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

Update vue.d.ts #748

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion types/vue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ declare module "vue/types/options" {
declare module "vue/types/vue" {
interface Vue {
$http: {
(options: HttpOptions): PromiseLike<HttpResponse>;
(options: HttpOptions): Promise<HttpResponse>;
get: $http;
post: $http;
put: $http;
Expand Down
10 changes: 5 additions & 5 deletions types/vue_resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export interface HttpOptions {
}

export interface $http {
(url: string, data?: any, options?: HttpOptions): PromiseLike<HttpResponse>;
(url: string, options?: HttpOptions): PromiseLike<HttpResponse>;
(url: string, data?: any, options?: HttpOptions): Promise<HttpResponse>;
(url: string, options?: HttpOptions): Promise<HttpResponse>;
}

export interface HttpInterceptor {
Expand Down Expand Up @@ -69,9 +69,9 @@ export interface ResourceActions {
}

export interface ResourceMethod {
(params: any, data?: any, success?: Function, error?: Function): PromiseLike<HttpResponse>;
(params: any, success?: Function, error?: Function): PromiseLike<HttpResponse>;
(success?: Function, error?: Function): PromiseLike<HttpResponse>;
(params: any, data?: any, success?: Function, error?: Function): Promise<HttpResponse>;
(params: any, success?: Function, error?: Function): Promise<HttpResponse>;
(success?: Function, error?: Function): Promise<HttpResponse>;
}

export interface ResourceMethods {
Expand Down