mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
A couple fixes to TypeScript types
This commit is contained in:
23
packages/bun-types/bun.d.ts
vendored
23
packages/bun-types/bun.d.ts
vendored
@@ -2452,7 +2452,7 @@ declare module "bun" {
|
||||
extends WebSocketServeOptions<WebSocketDataType>,
|
||||
TLSOptions {
|
||||
unix?: never;
|
||||
tls?: TLSOptions | Array<TLSOptions>;
|
||||
tls?: TLSOptions | TLSOptions[];
|
||||
}
|
||||
interface UnixTLSWebSocketServeOptions<WebSocketDataType = undefined>
|
||||
extends UnixWebSocketServeOptions<WebSocketDataType>,
|
||||
@@ -2462,7 +2462,7 @@ declare module "bun" {
|
||||
* (Cannot be used with hostname+port)
|
||||
*/
|
||||
unix: string;
|
||||
tls?: TLSOptions | Array<TLSOptions>;
|
||||
tls?: TLSOptions | TLSOptions[];
|
||||
}
|
||||
interface ErrorLike extends Error {
|
||||
code?: string;
|
||||
@@ -2493,6 +2493,19 @@ declare module "bun" {
|
||||
*/
|
||||
lowMemoryMode?: boolean;
|
||||
|
||||
/**
|
||||
* If set to `false`, any certificate is accepted.
|
||||
* Default is `$NODE_TLS_REJECT_UNAUTHORIZED` environment variable, or `true` if it is not set.
|
||||
*/
|
||||
rejectUnauthorized?: boolean;
|
||||
|
||||
/**
|
||||
* If set to `true`, the server will request a client certificate.
|
||||
*
|
||||
* Default is `false`.
|
||||
*/
|
||||
requestCert?: boolean;
|
||||
|
||||
/**
|
||||
* Optionally override the trusted CA certificates. Default is to trust
|
||||
* the well-known CAs curated by Mozilla. Mozilla's CAs are completely
|
||||
@@ -2531,11 +2544,11 @@ declare module "bun" {
|
||||
}
|
||||
|
||||
interface TLSServeOptions extends ServeOptions, TLSOptions {
|
||||
tls?: TLSOptions | Array<TLSOptions>;
|
||||
tls?: TLSOptions | TLSOptions[];
|
||||
}
|
||||
|
||||
interface UnixTLSServeOptions extends UnixServeOptions, TLSOptions {
|
||||
tls?: TLSOptions | Array<TLSOptions>;
|
||||
tls?: TLSOptions | TLSOptions[];
|
||||
}
|
||||
|
||||
interface SocketAddress {
|
||||
@@ -2564,7 +2577,7 @@ declare module "bun" {
|
||||
*
|
||||
* Powered by a fork of [uWebSockets](https://github.com/uNetworking/uWebSockets). Thank you @alexhultman.
|
||||
*/
|
||||
interface Server {
|
||||
interface Server extends Disposable {
|
||||
/**
|
||||
* Stop listening to prevent new connections from being accepted.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user