Skip to content

Commit

Permalink
allow type definition for axios instance methods (#4224)
Browse files Browse the repository at this point in the history
Co-authored-by: Jay <jasonsaayman@gmail.com>
  • Loading branch information
jelleschutter and jasonsaayman committed May 16, 2022
1 parent d60d684 commit ed0ba0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
Expand Up @@ -261,8 +261,8 @@ export class Axios {
}

export interface AxiosInstance extends Axios {
(config: AxiosRequestConfig): AxiosPromise;
(url: string, config?: AxiosRequestConfig): AxiosPromise;
<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>;

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

0 comments on commit ed0ba0f

Please sign in to comment.