Skip to content

Commit

Permalink
fix(types): replace AxiosPromise to Promise (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
sinoru authored and pi0 committed Sep 21, 2018
1 parent eca7298 commit 5fd9214
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions index.d.ts
@@ -1,15 +1,15 @@
import { AxiosInstance, AxiosRequestConfig, AxiosPromise } from 'axios'
import { AxiosInstance, AxiosRequestConfig } from 'axios'
import Vue from 'vue'

interface NuxtAxiosInstance extends AxiosInstance {
$request<T = any>(config: AxiosRequestConfig): AxiosPromise<T>
$get<T = any>(url: string, config?: AxiosRequestConfig): AxiosPromise<T>
$delete<T = any>(url: string, config?: AxiosRequestConfig): AxiosPromise<T>
$head<T = any>(url: string, config?: AxiosRequestConfig): AxiosPromise<T>
$options<T = any>(url: string, config?: AxiosRequestConfig): AxiosPromise<T>
$post<T = any>(url: string, data?: any, config?: AxiosRequestConfig): AxiosPromise<T>
$put<T = any>(url: string, data?: any, config?: AxiosRequestConfig): AxiosPromise<T>
$patch<T = any>(url: string, data?: any, config?: AxiosRequestConfig): AxiosPromise<T>
$request<T = any>(config: AxiosRequestConfig): Promise<T>
$get<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>
$delete<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>
$head<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>
$options<T = any>(url: string, config?: AxiosRequestConfig): Promise<T>
$post<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>
$put<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>
$patch<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<T>
}

declare module 'vue/types/vue' {
Expand Down

0 comments on commit 5fd9214

Please sign in to comment.