mirror of
https://github.com/tenrok/axios.git
synced 2026-05-21 13:24:11 +03:00
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>
This commit is contained in:
Vendored
+3
-3
@@ -1,5 +1,5 @@
|
||||
export interface AxiosTransformer {
|
||||
(data: any, headers?: any): any;
|
||||
(data: any, headers?: Record<string, string>): any;
|
||||
}
|
||||
|
||||
export interface AxiosAdapter {
|
||||
@@ -53,7 +53,7 @@ export interface AxiosRequestConfig<T = any> {
|
||||
baseURL?: string;
|
||||
transformRequest?: AxiosTransformer | AxiosTransformer[];
|
||||
transformResponse?: AxiosTransformer | AxiosTransformer[];
|
||||
headers?: any;
|
||||
headers?: Record<string, string>;
|
||||
params?: any;
|
||||
paramsSerializer?: (params: any) => string;
|
||||
data?: T;
|
||||
@@ -84,7 +84,7 @@ export interface AxiosResponse<T = never> {
|
||||
data: T;
|
||||
status: number;
|
||||
statusText: string;
|
||||
headers: any;
|
||||
headers: Record<string, string>;
|
||||
config: AxiosRequestConfig<T>;
|
||||
request?: any;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user