2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

Fixing AxiosRequestHeaders typings (#4334)

Co-authored-by: Shakirov Kirill <ksshakirov@sberautotech.ru>
Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Kirill Shakirov
2022-05-16 10:33:36 +03:00
committed by GitHub
parent ee51e68143
commit e6f9026d51
Vendored
+12 -2
View File
@@ -1,5 +1,15 @@
// TypeScript Version: 3.0 // TypeScript Version: 4.1
export type AxiosRequestHeaders = Record<string, string | string[] | number | boolean>; type AxiosHeaders = Record<string, string | string[] | number | boolean>;
type MethodsHeaders = {
[Key in Method as Lowercase<Key>]: AxiosHeaders;
};
interface CommonHeaders {
common: AxiosHeaders;
}
export type AxiosRequestHeaders = Partial<AxiosHeaders & MethodsHeaders & CommonHeaders>;
export type AxiosResponseHeaders = Record<string, string> & { export type AxiosResponseHeaders = Record<string, string> & {
"set-cookie"?: string[] "set-cookie"?: string[]