2
0
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:
Brian Helba
2022-05-04 15:18:57 -04:00
committed by GitHub
parent 1430393402
commit eaaab30442
Vendored
+1 -1
View File
@@ -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 {