Content-Length: 290669 | pFad | https://snyk.io/redirect/github/axios/axios/commit/90205f8ab7f73e6b3a2507bdd67a4f47ef57af9e

FDE6 Change headers type to string record (#3021) · axios/axios@90205f8 · GitHub
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 <jasonsaayman@gmail.com>
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://snyk.io/redirect/github/axios/axios/commit/90205f8ab7f73e6b3a2507bdd67a4f47ef57af9e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy