mirror of
https://github.com/tenrok/axios.git
synced 2026-05-30 15:24:11 +03:00
Fix TS definition for AxiosRequestTransformer (#4201)
The callback `AxiosRequestTransformer` can always expect its `headers` parameter to be defined. This is ensured immediately before the callback is made. See: https://github.com/axios/axios/blob/1025d1231a7747503188459dd5a6d1effdcea928/lib/core/dispatchRequest.js#L32-L40 Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Vendored
+1
-1
@@ -6,7 +6,7 @@ export type AxiosResponseHeaders = Record<string, string> & {
|
||||
};
|
||||
|
||||
export interface AxiosRequestTransformer {
|
||||
(data: any, headers?: AxiosRequestHeaders): any;
|
||||
(data: any, headers: AxiosRequestHeaders): any;
|
||||
}
|
||||
|
||||
export interface AxiosResponseTransformer {
|
||||
|
||||
Reference in New Issue
Block a user