We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Axios 1.2.2 added Symbol.iterator implementation for the AxiosHeaders class.
Symbol.iterator
However attempting to iterate through the headers class (for example - using Object.fromEntries(headers)) results in a type error.
Object.fromEntries(headers)
It looks like Symbol.iterator has been implemented in the code for the AxiosHeaders class but has been missed in the Typescript definitions.
No response
const headers = new AxiosHeaders({foo: "bar"}) for (const header of headers) { console.log(header); } error TS2488: Type 'AxiosHeaders' must have a '[Symbol.iterator]()' method that returns an iterator.
AxiosHeaders class should not throw a type error when attempting to iterate through its properties.
The text was updated successfully, but these errors were encountered:
Probably related to #5416.
Sorry, something went wrong.
Looks like this has been fixed since v1.2.4 - thanks! Will close this 👍
No branches or pull requests
Describe the bug
Axios 1.2.2 added
Symbol.iterator
implementation for the AxiosHeaders class.However attempting to iterate through the headers class (for example - using
Object.fromEntries(headers)
) results in a type error.It looks like
Symbol.iterator
has been implemented in the code for the AxiosHeaders class but has been missed in the Typescript definitions.To Reproduce
No response
Code snippet
Expected behavior
AxiosHeaders class should not throw a type error when attempting to iterate through its properties.
Axios Version
No response
Adapter Version
No response
Browser
No response
Browser Version
No response
Node.js Version
No response
OS
No response
Additional Library Versions
No response
Additional context/Screenshots
No response
The text was updated successfully, but these errors were encountered: