Fix connect() SocketOptions type#2244
Open
DaniFoldi wants to merge 1 commit intocloudflare:mainfrom
Open
Conversation
jasnell
approved these changes
Jun 9, 2024
dom96
approved these changes
Jun 11, 2024
Contributor
dom96
left a comment
There was a problem hiding this comment.
Possibly just a missing semi-colon and it'll pass https://github.com/cloudflare/workerd/actions/runs/9439473980/job/26032713772?pr=2244#step:11:2809
aba8469 to
04dae05
Compare
04dae05 to
8262af9
Compare
8262af9 to
9cb13df
Compare
Contributor
Author
|
Hi, I completely forgot about this PR; I've rebased it and I think I found the reason why it couldn't compile last time. |
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.
Hi 👋,
I noticed that while the internal sockets type definitions https://github.com/cloudflare/workerd/blob/main/src/cloudflare/internal/sockets.d.ts and docs https://developers.cloudflare.com/workers/runtime-apis/tcp-sockets/#socketoptions
both type
secureTransportas a proper enum, and sayallowHalfOpenis optional, the generated types don't reflect this: https://workers-types.pages.dev/4.20240605.0/#SocketOptionsThis PR is my attempt to fix this, although unlike my previous types fixes, this one was one bit more complicated so if it's using the wrong macro or missing a semicolon, apologies, I'll happily fix - compiling didn't work locally so my only source of confidence is the GH Action run on my fork.
Additionally, I found that somehow the copyright and license comment from only
vectorize.d.tsis included: see just below https://workers-types.pages.dev/4.20240605.0/#webSocketError.connect, and while this is by no means important, it's annoying me that I couldn't yet find the reason.