Skip to content

Commit

Permalink
fix type error (#4815)
Browse files Browse the repository at this point in the history
AxiosPromise is contains AxiosResponse and the `R` is AxiosResponse

Co-authored-by: Jay <jasonsaayman@gmail.com>
  • Loading branch information
hcwhan and jasonsaayman committed Sep 14, 2022
1 parent 649d739 commit ce8a921
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Expand Up @@ -369,8 +369,8 @@ export class Axios {
}

export interface AxiosInstance extends Axios {
<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): AxiosPromise<R>;
<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): AxiosPromise<R>;
<T = any, R = AxiosResponse<T>, D = any>(config: AxiosRequestConfig<D>): Promise<R>;
<T = any, R = AxiosResponse<T>, D = any>(url: string, config?: AxiosRequestConfig<D>): Promise<R>;

defaults: Omit<AxiosDefaults, 'headers'> & {
headers: HeadersDefaults & {
Expand Down

0 comments on commit ce8a921

Please sign in to comment.