New issue
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
Update typing CyHttpMessages.BaseMessage.headers
#16734
Comments
We're open to review PRs that improve the types. https://github.com/cypress-io/cypress/blob/develop/packages/net-stubbing/lib/external-types.ts#L72:L72 |
The code for this is done in cypress-io/cypress#16765, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
What would you like?
This should be fairly straightforward, but the
headers
dictionary field inCyHttpMessages.BaseMessage
withinpackages/net-stubbing/lib/external-types.ts
can be expanded to includestring[]
as a valid value type (in addition to juststring
).An example of when this might occur is when the server returns a
set-cookie
header that includes multiple cookies. This results in a value ofstring[]
where each cookie is its ownstring
.Why is this needed?
This improves typing in IDEs/Editors and also prevents TS2339 wherein calling
.filter
onheaders
is flagged as problematic when it is not.The text was updated successfully, but these errors were encountered: