-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(ext/net): extract TLS key and certificate from interfaces #23327
Conversation
cli/tsc/dts/lib.deno.ns.d.ts
Outdated
/** Cert chain in PEM format */ | ||
key: string; | ||
} | ||
export type ServeTlsOptions = ServeOptions & TlsCertifiedKeyOptions; |
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.
This needs to be changed back to be an interface. We might have to split it into multiple interfaces to support proper overloads
Previously, in 1.41,
Now, this same snippet causes a panic because |
To add to my previous comment, perhaps we should just error within |
We need to have an option to be successful if no key is specified for connectTls, however (key is optional there). |
I'm not sure if this is true -- I will add an extra layer of checking around it, but I'm seeing it correctly detect that a certificate and/or key is missing:
|
options: | ||
| ServeOptions | ||
| ServeTlsOptions | ||
| (ServeTlsOptions & TlsCertifiedKeyOptions), | ||
handler: ServeHandler, |
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.
@marvinhagemeister @bartlomieju What do you guys think of this? We can make ServeTlsOptions
an empty interface which will allow for older code using ServeTlsOptions
to continue to typecheck.
To clarify, I saw the error for |
…om inter… (denoland#23325)" This reverts commit 5758470.
Relands #23325