|
1 |
| -import { AxiosInstance, AxiosRequestConfig, AxiosPromise } from 'axios' |
| 1 | +import { AxiosInstance, AxiosRequestConfig } from 'axios' |
2 | 2 | import Vue from 'vue'
|
3 | 3 |
|
4 | 4 | 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> |
13 | 13 | }
|
14 | 14 |
|
15 | 15 | declare module 'vue/types/vue' {
|
|
0 commit comments