Skip to content

Commit

Permalink
fix(types): TypeScript generics fix (#280 by @TheHackerCoding)
Browse files Browse the repository at this point in the history
  • Loading branch information
i0x0 committed Dec 16, 2021
1 parent fad8f11 commit cdeb265
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions apisauce.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ export interface ApisauceInstance {
/** Gets the current base URL used by axios */
getBaseURL: () => string

any: <T, U = T>(config: AxiosRequestConfig) => Promise<ApiResponse<T, U>>
get: <T, U = T>(url: string, params?: {}, axiosConfig?: AxiosRequestConfig) => Promise<ApiResponse<T, U>>
delete: <T, U = T>(url: string, params?: {}, axiosConfig?: AxiosRequestConfig) => Promise<ApiResponse<T, U>>
head: <T, U = T>(url: string, params?: {}, axiosConfig?: AxiosRequestConfig) => Promise<ApiResponse<T, U>>
post: <T, U = T>(url: string, data?: any, axiosConfig?: AxiosRequestConfig) => Promise<ApiResponse<T, U>>
put: <T, U = T>(url: string, data?: any, axiosConfig?: AxiosRequestConfig) => Promise<ApiResponse<T, U>>
patch: <T, U = T>(url: string, data?: any, axiosConfig?: AxiosRequestConfig) => Promise<ApiResponse<T, U>>
link: <T, U = T>(url: string, params?: {}, axiosConfig?: AxiosRequestConfig) => Promise<ApiResponse<T, U>>
unlink: <T, U = T>(url: string, params?: {}, axiosConfig?: AxiosRequestConfig) => Promise<ApiResponse<T, U>>
any: <T, U = T>(config: AxiosRequestConfig<T>) => Promise<ApiResponse<T, U>>
get: <T, U = T>(url: string, params?: {}, axiosConfig?: AxiosRequestConfig<T>) => Promise<ApiResponse<T, U>>
delete: <T, U = T>(url: string, params?: {}, axiosConfig?: AxiosRequestConfig<T>) => Promise<ApiResponse<T, U>>
head: <T, U = T>(url: string, params?: {}, axiosConfig?: AxiosRequestConfig<T>) => Promise<ApiResponse<T, U>>
post: <T, U = T>(url: string, data?: any, axiosConfig?: AxiosRequestConfig<T>) => Promise<ApiResponse<T, U>>
put: <T, U = T>(url: string, data?: any, axiosConfig?: AxiosRequestConfig<T>) => Promise<ApiResponse<T, U>>
patch: <T, U = T>(url: string, data?: any, axiosConfig?: AxiosRequestConfig<T>) => Promise<ApiResponse<T, U>>
link: <T, U = T>(url: string, params?: {}, axiosConfig?: AxiosRequestConfig<T>) => Promise<ApiResponse<T, U>>
unlink: <T, U = T>(url: string, params?: {}, axiosConfig?: AxiosRequestConfig<T>) => Promise<ApiResponse<T, U>>
}

export function isCancel(value: any): boolean
Expand Down

0 comments on commit cdeb265

Please sign in to comment.