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:
Vendored
+12
-2
@@ -1,5 +1,15 @@
|
||||
// TypeScript Version: 3.0
|
||||
export type AxiosRequestHeaders = Record<string, string | string[] | number | boolean>;
|
||||
// TypeScript Version: 4.1
|
||||
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> & {
|
||||
"set-cookie"?: string[]
|
||||
|
||||
Reference in New Issue
Block a user