2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-27 14:47:43 +03:00

fix(types): fixed AxiosHeaders to handle spread syntax by making all methods non-enumerable; (#5499)

This commit is contained in:
Dmitriy Mozgovoy
2023-01-26 16:01:06 +02:00
committed by GitHub
parent 6600d51e6b
commit 580f1e8033
4 changed files with 77 additions and 49 deletions
+11
View File
@@ -496,3 +496,14 @@ for (const [header, value] of headers) {
(error: any) => Promise.reject(error)
);
}
{
const config: axios.AxiosRequestConfig = {headers: new axios.AxiosHeaders({foo: 1})};
axios.get('', {
headers: {
bar: 2,
...config.headers
}
});
}
+11
View File
@@ -616,3 +616,14 @@ for (const [header, value] of headers) {
(error: any) => Promise.reject(error)
);
}
{
const config: AxiosRequestConfig = {headers: new AxiosHeaders({foo: 1})};
axios.get('', {
headers: {
bar: 2,
...config.headers
}
});
}