bun-types 1.1.27-canary.20240829T140610 → 1.1.27-canary.20240831T140508

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 +20 -0
  2. package/package.json +1 -1
package/bun.d.ts CHANGED
@@ -2384,6 +2384,26 @@ declare module "bun" {
2384
2384
  * This string will currently do nothing. But in the future it could be useful for logs or metrics.
2385
2385
  */
2386
2386
  id?: string | null;
2387
+
2388
+ /**
2389
+ * Server static Response objects by route.
2390
+ *
2391
+ * @example
2392
+ * ```ts
2393
+ * Bun.serve({
2394
+ * static: {
2395
+ * "/": new Response("Hello World"),
2396
+ * "/about": new Response("About"),
2397
+ * },
2398
+ * fetch(req) {
2399
+ * return new Response("Fallback response");
2400
+ * },
2401
+ * });
2402
+ * ```
2403
+ *
2404
+ * @experimental
2405
+ */
2406
+ static?: Record<`/${string}`, Response>;
2387
2407
  }
2388
2408
 
2389
2409
  interface ServeOptions extends GenericServeOptions {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.27-canary.20240829T140610",
2
+ "version": "1.1.27-canary.20240831T140508",
3
3
  "name": "bun-types",
4
4
  "license": "MIT",
5
5
  "main": "",