Skip to content
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

feat: stabilize Deno.HttpServer.shutdown and Unix socket support #21463

Merged
merged 4 commits into from
Dec 6, 2023

Conversation

bartlomieju
Copy link
Member

This commit stabilizes "Deno.HttpServer.shutdown" API as well as
Unix socket support in "Deno.serve" API.

@bartlomieju bartlomieju added this to the 1.39 milestone Dec 5, 2023
Copy link
Contributor

@mmastrac mmastrac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once tests pass.

@kt3k
Copy link
Member

kt3k commented Dec 5, 2023

If I did the type assertion like this, then the type errors disappeared, but I'm not sure that's a desired fix. Reordering of the overload signatures seems solving the issue.

It looks like 'Unix' overload types need to be before the non-Unix types to make them have more priority in type inference. Because all fields in ServeOptions is optional, serve(options: ServeInit & ServeOptions) can even matches to serve({ path: "some/path", handler }) call and that seems causing trouble in type checking.

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bartlomieju bartlomieju enabled auto-merge (squash) December 6, 2023 23:18
@bartlomieju bartlomieju merged commit a931a47 into denoland:main Dec 6, 2023
14 checks passed
littledivy added a commit that referenced this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants