fix: export UndiciHeaders type and set dispatch headers to UndiciHeaders#3849
Merged
mcollina merged 1 commit intonodejs:mainfrom Mar 27, 2025
Merged
Conversation
ronag reviewed Nov 20, 2024
| * **reset** `boolean` (optional) - Default: `false` - If `false`, the request will attempt to create a long-living connection by sending the `connection: keep-alive` header,otherwise will attempt to close it immediately after response by sending `connection: close` within the request and closing the socket afterwards. | ||
| * **body** `string | Buffer | Uint8Array | stream.Readable | Iterable | AsyncIterable | null` (optional) - Default: `null` | ||
| * **headers** `UndiciHeaders | string[]` (optional) - Default: `null`. | ||
| * **headers** `UndiciHeaders` (optional) - Default: `null`. |
Member
There was a problem hiding this comment.
I'm not sure we should have undici types here? @mcollina
Contributor Author
There was a problem hiding this comment.
I can rename to OutgoingHttpHeaders also.
I saw this in the docs which matched the type
Member
There was a problem hiding this comment.
I think we should define UndiciHeaders somewhere if we do.
mcollina approved these changes Dec 2, 2024
| * **reset** `boolean` (optional) - Default: `false` - If `false`, the request will attempt to create a long-living connection by sending the `connection: keep-alive` header,otherwise will attempt to close it immediately after response by sending `connection: close` within the request and closing the socket afterwards. | ||
| * **body** `string | Buffer | Uint8Array | stream.Readable | Iterable | AsyncIterable | null` (optional) - Default: `null` | ||
| * **headers** `UndiciHeaders | string[]` (optional) - Default: `null`. | ||
| * **headers** `UndiciHeaders` (optional) - Default: `null`. |
Member
There was a problem hiding this comment.
I think we should define UndiciHeaders somewhere if we do.
types/dispatcher.d.ts Outdated
| | ||
| export default Dispatcher | ||
| | ||
| export type UndiciHeaders = IncomingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null |
Member
There was a problem hiding this comment.
This definition should be in the docs.
Contributor Author
There was a problem hiding this comment.
87c3c6d to d41d11d Compare Contributor Author
metcoder95 approved these changes Mar 4, 2025
Merged
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This relates to...
#3840
Changes
UndiciHeadersUndiciHeaderstest/types/dispatcher.test.d.tsStatus