Skip to content

Commit

Permalink
Change headers type to string record
Browse files Browse the repository at this point in the history
This correctly reflects the type in a more type safe manner.
  • Loading branch information
remcohaszing committed Aug 30, 2020
1 parent 0d87655 commit 19a7591
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.d.ts
@@ -1,5 +1,5 @@
export interface AxiosTransformer {
(data: any, headers?: any): any;
(data: any, headers?: Record<string, string>): any;
}

export interface AxiosAdapter {
Expand Down Expand Up @@ -47,7 +47,7 @@ export interface AxiosRequestConfig {
baseURL?: string;
transformRequest?: AxiosTransformer | AxiosTransformer[];
transformResponse?: AxiosTransformer | AxiosTransformer[];
headers?: any;
headers?: Record<string, string>;
params?: any;
paramsSerializer?: (params: any) => string;
data?: any;
Expand Down Expand Up @@ -77,7 +77,7 @@ export interface AxiosResponse<T = any> {
data: T;
status: number;
statusText: string;
headers: any;
headers: Record<string, string>;
config: AxiosRequestConfig;
request?: any;
}
Expand Down

0 comments on commit 19a7591

Please sign in to comment.