Skip to content

Commit 5fd9214

Browse files
sinorupi0
authored andcommitted
fix(types): replace AxiosPromise to Promise (#162)
1 parent eca7298 commit 5fd9214

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

index.d.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
import { AxiosInstance, AxiosRequestConfig, AxiosPromise } from 'axios'
1+
import { AxiosInstance, AxiosRequestConfig } from 'axios'
22
import Vue from 'vue'
33

44
interface NuxtAxiosInstance extends AxiosInstance {
5-
$request<T = any>(config: AxiosRequestConfig): AxiosPromise<T>
6-
$get<T = any>(url: string, config?: AxiosRequestConfig): AxiosPromise<T>
7-
$delete<T = any>(url: string, config?: AxiosRequestConfig): AxiosPromise<T>
8-
$head<T = any>(url: string, config?: AxiosRequestConfig): AxiosPromise<T>
9-
$options<T = any>(url: string, config?: AxiosRequestConfig): AxiosPromise<T>
10-
$post<T = any>(url: string, data?: any, config?: AxiosRequestConfig): AxiosPromise<T>
11-
$put<T = any>(url: string, data?: any, config?: AxiosRequestConfig): AxiosPromise<T>
12-
$patch<T = any>(url: string, data?: any, config?: AxiosRequestConfig): AxiosPromise<T>
5+
$request<T = any>(config: AxiosRequestConfig): Promise<T>
6+
$get<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>
7+
$delete<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>
8+
$head<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>
9+
$options<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>
10+
$post<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>
11+
$put<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>
12+
$patch<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>
1313
}
1414

1515
declare module 'vue/types/vue' {

0 commit comments

Comments
 (0)