bun-types 1.3.4-canary.20251208T140653 → 1.3.5-canary.20251209T140747

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 CHANGED
@@ -1740,9 +1740,9 @@ declare module "bun" {
1740
1740
  * @default "esm"
1741
1741
  */
1742
1742
  format?: /**
1743
- * ECMAScript Module format
1744
- */
1745
- | "esm"
1743
+ * ECMAScript Module format
1744
+ */
1745
+ | "esm"
1746
1746
  /**
1747
1747
  * CommonJS format
1748
1748
  * **Experimental**
@@ -3316,10 +3316,10 @@ declare module "bun" {
3316
3316
  function color(
3317
3317
  input: ColorInput,
3318
3318
  outputFormat?: /**
3319
- * True color ANSI color string, for use in terminals
3320
- * @example \x1b[38;2;100;200;200m
3321
- */
3322
- | "ansi"
3319
+ * True color ANSI color string, for use in terminals
3320
+ * @example \x1b[38;2;100;200;200m
3321
+ */
3322
+ | "ansi"
3323
3323
  | "ansi-16"
3324
3324
  | "ansi-16m"
3325
3325
  /**
@@ -5650,17 +5650,11 @@ declare module "bun" {
5650
5650
  maxBuffer?: number;
5651
5651
  }
5652
5652
 
5653
- interface SpawnSyncOptions<In extends Writable, Out extends Readable, Err extends Readable> extends BaseOptions<
5654
- In,
5655
- Out,
5656
- Err
5657
- > {}
5658
-
5659
- interface SpawnOptions<In extends Writable, Out extends Readable, Err extends Readable> extends BaseOptions<
5660
- In,
5661
- Out,
5662
- Err
5663
- > {
5653
+ interface SpawnSyncOptions<In extends Writable, Out extends Readable, Err extends Readable>
5654
+ extends BaseOptions<In, Out, Err> {}
5655
+
5656
+ interface SpawnOptions<In extends Writable, Out extends Readable, Err extends Readable>
5657
+ extends BaseOptions<In, Out, Err> {
5664
5658
  /**
5665
5659
  * If true, stdout and stderr pipes will not automatically start reading
5666
5660
  * data. Reading will only begin when you access the `stdout` or `stderr`
@@ -193,15 +193,17 @@ This is the maximum amount of time a connection is allowed to be idle before the
193
193
  Thus far, the examples on this page have used the explicit `Bun.serve` API. Bun also supports an alternate syntax.
194
194
 
195
195
  ```ts server.ts
196
- import { type Serve } from "bun";
196
+ import type { Serve } from "bun";
197
197
 
198
198
  export default {
199
199
  fetch(req) {
200
200
  return new Response("Bun!");
201
201
  },
202
- } satisfies Serve;
202
+ } satisfies Serve.Options<undefined>;
203
203
  ```
204
204
 
205
+ The type parameter `<undefined>` represents WebSocket data — if you add a `websocket` handler with custom data attached via `server.upgrade(req, { data: ... })`, replace `undefined` with your data type.
206
+
205
207
  Instead of passing the server options into `Bun.serve`, `export default` it. This file can be executed as-is; when Bun sees a file with a `default` export containing a `fetch` handler, it passes it into `Bun.serve` under the hood.
206
208
 
207
209
  ---
package/package.json CHANGED
@@ -33,5 +33,5 @@
33
33
  "bun.js",
34
34
  "types"
35
35
  ],
36
- "version": "1.3.4-canary.20251208T140653"
36
+ "version": "1.3.5-canary.20251209T140747"
37
37
  }
package/s3.d.ts CHANGED
@@ -281,6 +281,24 @@ declare module "bun" {
281
281
  */
282
282
  type?: string;
283
283
 
284
+ /**
285
+ * The Content-Disposition header value.
286
+ * Controls how the file is presented when downloaded.
287
+ *
288
+ * @example
289
+ * // Setting attachment disposition with filename
290
+ * const file = s3.file("report.pdf", {
291
+ * contentDisposition: "attachment; filename=\"quarterly-report.pdf\""
292
+ * });
293
+ *
294
+ * @example
295
+ * // Setting inline disposition
296
+ * await s3.write("image.png", imageData, {
297
+ * contentDisposition: "inline"
298
+ * });
299
+ */
300
+ contentDisposition?: string | undefined;
301
+
284
302
  /**
285
303
  * By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects.
286
304
  *