bun-types 1.1.25 → 1.1.26

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.
Files changed (2) hide show
  1. package/bun.d.ts +18 -0
  2. 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
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.25",
2
+ "version": "1.1.26",
3
3
  "name": "bun-types",
4
4
  "license": "MIT",
5
5
  "main": "",