Skip to content

Commit 90205f8

Browse files
Change headers type to string record (#3021)
This correctly reflects the type in a more type safe manner. Co-authored-by: Jay <[email protected]>
1 parent 92b29d2 commit 90205f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export interface AxiosTransformer {
2-
(data: any, headers?: any): any;
2+
(data: any, headers?: Record<string, string>): any;
33
}
44

55
export interface AxiosAdapter {
@@ -53,7 +53,7 @@ export interface AxiosRequestConfig<T = any> {
5353
baseURL?: string;
5454
transformRequest?: AxiosTransformer | AxiosTransformer[];
5555
transformResponse?: AxiosTransformer | AxiosTransformer[];
56-
headers?: any;
56+
headers?: Record<string, string>;
5757
params?: any;
5858
paramsSerializer?: (params: any) => string;
5959
data?: T;
@@ -84,7 +84,7 @@ export interface AxiosResponse<T = never> {
8484
data: T;
8585
status: number;
8686
statusText: string;
87-
headers: any;
87+
headers: Record<string, string>;
8888
config: AxiosRequestConfig<T>;
8989
request?: any;
9090
}

0 commit comments

Comments
 (0)