-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
fix: make server
type less restrictive (fix #17627)
#17628
Conversation
|
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.
The changes looks fine to me, though I'm not sure if we need tests for this. I think it's fine to omit them.
I've not seen it mentioned, but I believe the inconvenient typing is because of this?
vite/packages/vite/src/node/server/index.ts
Line 224 in d454c8c
export type HttpServer = http.Server | Http2SecureServer |
The https possibility interferes when passing the server.httpServer
.
@bluwy Exactly, that's where the inconvenience stems from. Would you like me to remove the test I added? |
Yes please, and appreciate the effort making the test! If another maintainer prefers keeping the test still, I don't mind, but I think at the moment it's rare to break it again. |
Description
This fixes #17627 by making the type of
server
andserver
less restrictive.