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
refactor(http): Import proper OutgoingHttpHeaders on all http clients #9653
refactor(http): Import proper OutgoingHttpHeaders on all http clients #9653
Conversation
lib/util/http/types.ts
Outdated
@@ -23,3 +23,7 @@ export interface RequestStats { | |||
duration: number; | |||
queueDuration: number; | |||
} | |||
|
|||
export interface OutgoingHttpHeaders { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should extend from Record
here
Deep merge of |
lib/util/http/types.ts
Outdated
@@ -23,3 +23,7 @@ export interface RequestStats { | |||
duration: number; | |||
queueDuration: number; | |||
} | |||
|
|||
export interface OutgoingHttpHeaders extends Record<string, unknown> { | |||
[header: string]: string | string[] | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove and add this types to second record type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced by Record<string, string | string[] | undefined>
, because empty interfaces don't lint well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better use a type def then?
@@ -23,3 +23,5 @@ export interface RequestStats { | |||
duration: number; | |||
queueDuration: number; | |||
} | |||
|
|||
export type OutgoingHttpHeaders = Record<string, string | string[] | undefined>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@viceice Okay, just commit your suggestion, please 🙃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, not easy from 📲 😅
🎉 This PR is included in version 24.119.5 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Changes:
Fix imports, remove
unknown
type, remove TODO item.Context:
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via: