bun-types 1.1.25 → 1.1.26-canary.20240824T140455
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bun.d.ts +18 -0
- package/package.json +1 -1
package/bun.d.ts
CHANGED
|
@@ -2428,6 +2428,14 @@ declare module "bun" {
|
|
|
2428
2428
|
*/
|
|
2429
2429
|
unix?: never;
|
|
2430
2430
|
|
|
2431
|
+
/**
|
|
2432
|
+
* Sets the the number of seconds to wait before timing out a connection
|
|
2433
|
+
* due to inactivity.
|
|
2434
|
+
*
|
|
2435
|
+
* Default is `10` seconds.
|
|
2436
|
+
*/
|
|
2437
|
+
idleTimeout?: number;
|
|
2438
|
+
|
|
2431
2439
|
/**
|
|
2432
2440
|
* Handle HTTP requests
|
|
2433
2441
|
*
|
|
@@ -2874,6 +2882,16 @@ declare module "bun" {
|
|
|
2874
2882
|
compress?: boolean,
|
|
2875
2883
|
): ServerWebSocketSendStatus;
|
|
2876
2884
|
|
|
2885
|
+
/**
|
|
2886
|
+
* A count of connections subscribed to a given topic
|
|
2887
|
+
*
|
|
2888
|
+
* This operation will loop through each topic internally to get the count.
|
|
2889
|
+
*
|
|
2890
|
+
* @param topic the websocket topic to check how many subscribers are connected to
|
|
2891
|
+
* @returns the number of subscribers
|
|
2892
|
+
*/
|
|
2893
|
+
subscriberCount(topic: string): number;
|
|
2894
|
+
|
|
2877
2895
|
/**
|
|
2878
2896
|
* Returns the client IP address and port of the given Request. If the request was closed or is a unix socket, returns null.
|
|
2879
2897
|
*
|
package/package.json
CHANGED