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

BREAKING(dts): improve types for Deno.serve #25369

Merged
merged 3 commits into from
Sep 3, 2024

Conversation

lucacasonato
Copy link
Member

This significantly simplifies the types for Deno.serve.

The following types become generic over the address type:

  • ServeHandlerInfo
  • ServeHandler
  • ServeOptions
  • ServeInit

The following types are removed entirely:

  • ServeTlsOptions
  • ServeUnixOptions
  • ServeUnixHandlerInfo
  • ServeUnixHandler

Closes #23710

This significantly simplifies the types for `Deno.serve`.

The following types become generic over the address type:
- ServeHandlerInfo
- ServeHandler
- ServeOptions
- ServeInit

The following types are removed entirely:
- ServeTlsOptions
- ServeUnixOptions
- ServeUnixHandlerInfo
- ServeUnixHandler
@lucacasonato lucacasonato changed the title BREAKING: feat(cli): improve types for Deno.serve BREAKING(cli): improve types for Deno.serve Sep 2, 2024
@lucacasonato lucacasonato changed the title BREAKING(cli): improve types for Deno.serve BREAKING(dts): improve types for Deno.serve Sep 2, 2024
@lucacasonato lucacasonato merged commit 90338ef into main Sep 3, 2024
17 checks passed
@lucacasonato lucacasonato deleted the simplify_deno_serve_types branch September 3, 2024 09:09
Copy link
Contributor

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

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

I quite like these improvements! They make the types much cleaner

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.

Improved types for Deno.serve in 2.0
3 participants