bun-types 1.2.8-canary.20250328T140605 → 1.2.8-canary.20250329T140548

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
@@ -40,7 +40,6 @@ declare module "bun" {
40
40
  type SignalsListener = (signal: NodeJS.Signals) => void;
41
41
  type BlobPart = string | Blob | BufferSource;
42
42
  type TimerHandler = (...args: any[]) => void;
43
-
44
43
  type DOMHighResTimeStamp = number;
45
44
  type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
46
45
  type BlobOrStringOrBuffer = string | NodeJS.TypedArray | ArrayBufferLike | Blob;
@@ -3813,6 +3812,14 @@ declare module "bun" {
3813
3812
  tls?: TLSOptions | TLSOptions[];
3814
3813
  }
3815
3814
 
3815
+ interface TLSServeOptions extends ServeOptions, TLSOptionsAsDeprecated {
3816
+ tls?: TLSOptions | TLSOptions[];
3817
+ }
3818
+
3819
+ interface UnixTLSServeOptions extends UnixServeOptions, TLSOptionsAsDeprecated {
3820
+ tls?: TLSOptions | TLSOptions[];
3821
+ }
3822
+
3816
3823
  interface ErrorLike extends Error {
3817
3824
  code?: string;
3818
3825
  errno?: number;
@@ -4013,14 +4020,6 @@ declare module "bun" {
4013
4020
  secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options
4014
4021
  }
4015
4022
 
4016
- interface TLSServeOptions extends ServeOptions, TLSOptionsAsDeprecated {
4017
- tls?: TLSOptions | TLSOptions[];
4018
- }
4019
-
4020
- interface UnixTLSServeOptions extends UnixServeOptions, TLSOptionsAsDeprecated {
4021
- tls?: TLSOptions | TLSOptions[];
4022
- }
4023
-
4024
4023
  interface SocketAddress {
4025
4024
  /**
4026
4025
  * The IP address of the client.
package/docs/api/fetch.md CHANGED
@@ -337,7 +337,7 @@ This will print the request and response headers to your terminal:
337
337
  ```sh
338
338
  [fetch] > HTTP/1.1 GET http://example.com/
339
339
  [fetch] > Connection: keep-alive
340
- [fetch] > User-Agent: Bun/1.2.8-canary.20250328T140605
340
+ [fetch] > User-Agent: Bun/1.2.8-canary.20250329T140548
341
341
  [fetch] > Accept: */*
342
342
  [fetch] > Host: example.com
343
343
  [fetch] > Accept-Encoding: gzip, deflate, br
package/docs/api/spawn.md CHANGED
@@ -120,7 +120,7 @@ You can read results from the subprocess via the `stdout` and `stderr` propertie
120
120
  ```ts
121
121
  const proc = Bun.spawn(["bun", "--version"]);
122
122
  const text = await new Response(proc.stdout).text();
123
- console.log(text); // => "1.2.8-canary.20250328T140605"
123
+ console.log(text); // => "1.2.8-canary.20250329T140548"
124
124
  ```
125
125
 
126
126
  Configure the output stream by passing one of the following values to `stdout/stderr`:
@@ -7,7 +7,7 @@ Use `bun publish` to publish a package to the npm registry.
7
7
  $ bun publish
8
8
 
9
9
  ## Output
10
- bun publish v1.2.8-canary.20250328T140605 (ca7428e9)
10
+ bun publish v1.2.8-canary.20250329T140548 (ca7428e9)
11
11
 
12
12
  packed 203B package.json
13
13
  packed 224B README.md
@@ -9,7 +9,7 @@ $ bunx nuxi init my-nuxt-app
9
9
  ✔ Which package manager would you like to use?
10
10
  bun
11
11
  ◐ Installing dependencies...
12
- bun install v1.2.8-canary.20250328T140605 (16b4bf34)
12
+ bun install v1.2.8-canary.20250329T140548 (16b4bf34)
13
13
  + @nuxt/devtools@0.8.2
14
14
  + nuxt@3.7.0
15
15
  785 packages installed [2.67s]
@@ -16,7 +16,7 @@ This will add the package to `peerDependencies` in `package.json`.
16
16
  ```json-diff
17
17
  {
18
18
  "peerDependencies": {
19
- + "@types/bun": "^1.2.8-canary.20250328T140605"
19
+ + "@types/bun": "^1.2.8-canary.20250329T140548"
20
20
  }
21
21
  }
22
22
  ```
@@ -28,7 +28,7 @@ Running `bun install` will install peer dependencies by default, unless marked o
28
28
  ```json-diff
29
29
  {
30
30
  "peerDependencies": {
31
- "@types/bun": "^1.2.8-canary.20250328T140605"
31
+ "@types/bun": "^1.2.8-canary.20250329T140548"
32
32
  },
33
33
  "peerDependenciesMeta": {
34
34
  + "@types/bun": {
@@ -97,7 +97,7 @@ $ bun update
97
97
  $ bun update @types/bun --latest
98
98
 
99
99
  # Update a dependency to a specific version
100
- $ bun update @types/bun@1.2.8-canary.20250328T140605
100
+ $ bun update @types/bun@1.2.8-canary.20250329T140548
101
101
 
102
102
  # Update all dependencies to the latest versions
103
103
  $ bun update --latest
@@ -21,7 +21,7 @@ Here's what the output of a typical test run looks like. In this case, there are
21
21
 
22
22
  ```sh
23
23
  $ bun test
24
- bun test v1.2.8-canary.20250328T140605 (9c68abdb)
24
+ bun test v1.2.8-canary.20250329T140548 (9c68abdb)
25
25
 
26
26
  test.test.js:
27
27
  ✓ add [0.87ms]
@@ -47,7 +47,7 @@ To only run certain test files, pass a positional argument to `bun test`. The ru
47
47
 
48
48
  ```sh
49
49
  $ bun test test3
50
- bun test v1.2.8-canary.20250328T140605 (9c68abdb)
50
+ bun test v1.2.8-canary.20250329T140548 (9c68abdb)
51
51
 
52
52
  test3.test.js:
53
53
  ✓ add [1.40ms]
@@ -85,7 +85,7 @@ Adding `-t add` will only run tests with "add" in the name. This works with test
85
85
 
86
86
  ```sh
87
87
  $ bun test -t add
88
- bun test v1.2.8-canary.20250328T140605 (9c68abdb)
88
+ bun test v1.2.8-canary.20250329T140548 (9c68abdb)
89
89
 
90
90
  test.test.js:
91
91
  ✓ add [1.79ms]
@@ -18,7 +18,7 @@ The first time this test is executed, Bun will evaluate the value passed into `e
18
18
 
19
19
  ```sh
20
20
  $ bun test test/snap
21
- bun test v1.2.8-canary.20250328T140605 (9c68abdb)
21
+ bun test v1.2.8-canary.20250329T140548 (9c68abdb)
22
22
 
23
23
  test/snap.test.ts:
24
24
  ✓ snapshot [1.48ms]
@@ -61,7 +61,7 @@ Later, when this test file is executed again, Bun will read the snapshot file an
61
61
 
62
62
  ```sh
63
63
  $ bun test
64
- bun test v1.2.8-canary.20250328T140605 (9c68abdb)
64
+ bun test v1.2.8-canary.20250329T140548 (9c68abdb)
65
65
 
66
66
  test/snap.test.ts:
67
67
  ✓ snapshot [1.05ms]
@@ -78,7 +78,7 @@ To update snapshots, use the `--update-snapshots` flag.
78
78
 
79
79
  ```sh
80
80
  $ bun test --update-snapshots
81
- bun test v1.2.8-canary.20250328T140605 (9c68abdb)
81
+ bun test v1.2.8-canary.20250329T140548 (9c68abdb)
82
82
 
83
83
  test/snap.test.ts:
84
84
  ✓ snapshot [0.86ms]
@@ -29,7 +29,7 @@ To regenerate snapshots, use the `--update-snapshots` flag.
29
29
 
30
30
  ```sh
31
31
  $ bun test --update-snapshots
32
- bun test v1.2.8-canary.20250328T140605 (9c68abdb)
32
+ bun test v1.2.8-canary.20250329T140548 (9c68abdb)
33
33
 
34
34
  test/snap.test.ts:
35
35
  ✓ snapshot [0.86ms]
@@ -5,7 +5,7 @@ name: Get the current Bun version
5
5
  Get the current version of Bun in a semver format.
6
6
 
7
7
  ```ts#index.ts
8
- Bun.version; // => "1.2.8-canary.20250328T140605"
8
+ Bun.version; // => "1.2.8-canary.20250329T140548"
9
9
  ```
10
10
 
11
11
  ---
@@ -14,7 +14,7 @@ Kernel version 5.6 or higher is strongly recommended, but the minimum is 5.1. Us
14
14
  ```bash#macOS/Linux_(curl)
15
15
  $ curl -fsSL https://bun.sh/install | bash # for macOS, Linux, and WSL
16
16
  # to install a specific version
17
- $ curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.8-canary.20250328T140605"
17
+ $ curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.8-canary.20250329T140548"
18
18
  ```
19
19
 
20
20
  ```bash#npm
@@ -189,10 +189,10 @@ Since Bun is a single binary, you can install older versions of Bun by re-runnin
189
189
 
190
190
  ### Installing a specific version of Bun on Linux/Mac
191
191
 
192
- To install a specific version of Bun, you can pass the git tag of the version you want to install to the install script, such as `bun-v1.2.0` or `bun-v1.2.8-canary.20250328T140605`.
192
+ To install a specific version of Bun, you can pass the git tag of the version you want to install to the install script, such as `bun-v1.2.0` or `bun-v1.2.8-canary.20250329T140548`.
193
193
 
194
194
  ```sh
195
- $ curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.8-canary.20250328T140605"
195
+ $ curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.8-canary.20250329T140548"
196
196
  ```
197
197
 
198
198
  ### Installing a specific version of Bun on Windows
@@ -201,7 +201,7 @@ On Windows, you can install a specific version of Bun by passing the version num
201
201
 
202
202
  ```sh
203
203
  # PowerShell:
204
- $ iex "& {$(irm https://bun.sh/install.ps1)} -Version 1.2.8-canary.20250328T140605"
204
+ $ iex "& {$(irm https://bun.sh/install.ps1)} -Version 1.2.8-canary.20250329T140548"
205
205
  ```
206
206
 
207
207
  ## Downloading Bun binaries directly
@@ -124,11 +124,11 @@ await fetch("https://example.com", {
124
124
  This prints the `fetch` request as a single-line `curl` command to let you copy-paste into your terminal to replicate the request.
125
125
 
126
126
  ```sh
127
- [fetch] $ curl --http1.1 "https://example.com/" -X POST -H "content-type: application/json" -H "Connection: keep-alive" -H "User-Agent: Bun/1.2.8-canary.20250328T140605" -H "Accept: */*" -H "Host: example.com" -H "Accept-Encoding: gzip, deflate, br" --compressed -H "Content-Length: 13" --data-raw "{\"foo\":\"bar\"}"
127
+ [fetch] $ curl --http1.1 "https://example.com/" -X POST -H "content-type: application/json" -H "Connection: keep-alive" -H "User-Agent: Bun/1.2.8-canary.20250329T140548" -H "Accept: */*" -H "Host: example.com" -H "Accept-Encoding: gzip, deflate, br" --compressed -H "Content-Length: 13" --data-raw "{\"foo\":\"bar\"}"
128
128
  [fetch] > HTTP/1.1 POST https://example.com/
129
129
  [fetch] > content-type: application/json
130
130
  [fetch] > Connection: keep-alive
131
- [fetch] > User-Agent: Bun/1.2.8-canary.20250328T140605
131
+ [fetch] > User-Agent: Bun/1.2.8-canary.20250329T140548
132
132
  [fetch] > Accept: */*
133
133
  [fetch] > Host: example.com
134
134
  [fetch] > Accept-Encoding: gzip, deflate, br
@@ -170,7 +170,7 @@ This prints the following to the console:
170
170
  [fetch] > HTTP/1.1 POST https://example.com/
171
171
  [fetch] > content-type: application/json
172
172
  [fetch] > Connection: keep-alive
173
- [fetch] > User-Agent: Bun/1.2.8-canary.20250328T140605
173
+ [fetch] > User-Agent: Bun/1.2.8-canary.20250329T140548
174
174
  [fetch] > Accept: */*
175
175
  [fetch] > Host: example.com
176
176
  [fetch] > Accept-Encoding: gzip, deflate, br
package/docs/test/dom.md CHANGED
@@ -55,7 +55,7 @@ Let's run this test with `bun test`:
55
55
 
56
56
  ```bash
57
57
  $ bun test
58
- bun test v1.2.8-canary.20250328T140605
58
+ bun test v1.2.8-canary.20250329T140548
59
59
 
60
60
  dom.test.ts:
61
61
  ✓ dom test [0.82ms]
package/globals.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  declare module "bun" {
2
2
  namespace __internal {
3
3
  type NodeWorkerThreadsWorker = import("worker_threads").Worker;
4
- type LibWorkerOrNodeWorkerThreadsWorker = Bun.__internal.UseLibDomIfAvailable<"Worker", NodeWorkerThreadsWorker>;
4
+ type LibWorkerOrBunWorker = Bun.__internal.UseLibDomIfAvailable<"Worker", Bun.Worker>;
5
5
 
6
6
  type NodePerfHooksPerformance = import("perf_hooks").Performance;
7
7
  type LibPerformanceOrNodePerfHooksPerformance = Bun.__internal.UseLibDomIfAvailable<
@@ -11,8 +11,10 @@ declare module "bun" {
11
11
 
12
12
  type NodeCryptoWebcryptoSubtleCrypto = import("crypto").webcrypto.SubtleCrypto;
13
13
  type NodeCryptoWebcryptoCryptoKey = import("crypto").webcrypto.CryptoKey;
14
- type NodeUtilTextEncoder = import("util").TextEncoder;
15
- type NodeUtilTextDecoder = import("util").TextDecoder;
14
+
15
+ type LibEmptyOrNodeUtilTextEncoder = LibDomIsLoaded extends true ? {} : import("util").TextEncoder;
16
+
17
+ type LibEmptyOrNodeUtilTextDecoder = LibDomIsLoaded extends true ? {} : import("util").TextDecoder;
16
18
 
17
19
  type LibEmptyOrNodeReadableStream<T = any> = LibDomIsLoaded extends true
18
20
  ? {}
@@ -25,6 +27,8 @@ declare module "bun" {
25
27
  type LibEmptyOrNodeTransformStream<I = any, O = any> = LibDomIsLoaded extends true
26
28
  ? {}
27
29
  : import("stream/web").TransformStream<I, O>;
30
+
31
+ type LibEmptyOrNodeMessagePort = LibDomIsLoaded extends true ? {} : import("worker_threads").MessagePort;
28
32
  }
29
33
  }
30
34
 
@@ -47,7 +51,7 @@ declare var WritableStream: Bun.__internal.UseLibDomIfAvailable<
47
51
  }
48
52
  >;
49
53
 
50
- interface Worker extends Bun.__internal.LibWorkerOrNodeWorkerThreadsWorker {}
54
+ interface Worker extends Bun.__internal.LibWorkerOrBunWorker {}
51
55
  declare var Worker: Bun.__internal.UseLibDomIfAvailable<
52
56
  "Worker",
53
57
  {
@@ -62,6 +66,13 @@ declare var Worker: Bun.__internal.UseLibDomIfAvailable<
62
66
  }
63
67
  >;
64
68
 
69
+ /**
70
+ * A WebSocket client implementation
71
+ *
72
+ * If `DOM` is included in tsconfig `lib`, this falls back to the default DOM global `WebSocket`.
73
+ * Otherwise (when outside of a browser environment), this will be the `WebSocket`
74
+ * implementation from the `ws` package, which Bun implements.
75
+ */
65
76
  declare var WebSocket: Bun.__internal.UseLibDomIfAvailable<"WebSocket", typeof import("ws").WebSocket>;
66
77
 
67
78
  interface Crypto {}
@@ -81,7 +92,7 @@ declare var crypto: Crypto;
81
92
  * const uint8array = encoder.encode('this is some data');
82
93
  * ```
83
94
  */
84
- interface TextEncoder extends Bun.__internal.NodeUtilTextEncoder {
95
+ interface TextEncoder extends Bun.__internal.LibEmptyOrNodeUtilTextEncoder {
85
96
  /**
86
97
  * UTF-8 encodes the `src` string to the `dest` Uint8Array and returns an object
87
98
  * containing the read Unicode code units and written UTF-8 bytes.
@@ -113,53 +124,51 @@ declare var TextEncoder: Bun.__internal.UseLibDomIfAvailable<
113
124
  * const decoder = new TextDecoder();
114
125
  * const uint8array = decoder.decode('this is some data');
115
126
  */
127
+ interface TextDecoder extends Bun.__internal.LibEmptyOrNodeUtilTextDecoder {}
116
128
  declare var TextDecoder: Bun.__internal.UseLibDomIfAvailable<
117
129
  "TextDecoder",
118
130
  {
119
- prototype: Bun.__internal.NodeUtilTextDecoder;
120
- new (
121
- encoding?: Bun.Encoding,
122
- options?: { fatal?: boolean; ignoreBOM?: boolean },
123
- ): Bun.__internal.NodeUtilTextDecoder;
131
+ prototype: TextDecoder;
132
+ new (encoding?: Bun.Encoding, options?: { fatal?: boolean; ignoreBOM?: boolean }): TextDecoder;
124
133
  }
125
134
  >;
126
135
 
127
- // interface Event {
128
- // /** This is not used in Node.js and is provided purely for completeness. */
129
- // readonly bubbles: boolean;
130
- // /** Alias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness. */
131
- // cancelBubble: () => void;
132
- // /** True if the event was created with the cancelable option */
133
- // readonly cancelable: boolean;
134
- // /** This is not used in Node.js and is provided purely for completeness. */
135
- // readonly composed: boolean;
136
- // /** Returns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness. */
137
- // composedPath(): [EventTarget?];
138
- // /** Alias for event.target. */
139
- // readonly currentTarget: EventTarget | null;
140
- // /** Is true if cancelable is true and event.preventDefault() has been called. */
141
- // readonly defaultPrevented: boolean;
142
- // /** This is not used in Node.js and is provided purely for completeness. */
143
- // readonly eventPhase: typeof globalThis extends { Event: infer T extends {eventPhase: number} } ? T['eventPhase'] : 0 | 2;
144
- // /** The `AbortSignal` "abort" event is emitted with `isTrusted` set to `true`. The value is `false` in all other cases. */
145
- // readonly isTrusted: boolean;
146
- // /** Sets the `defaultPrevented` property to `true` if `cancelable` is `true`. */
147
- // preventDefault(): void;
148
- // /** This is not used in Node.js and is provided purely for completeness. */
149
- // returnValue: boolean;
150
- // /** Alias for event.target. */
151
- // readonly srcElement: EventTarget | null;
152
- // /** Stops the invocation of event listeners after the current one completes. */
153
- // stopImmediatePropagation(): void;
154
- // /** This is not used in Node.js and is provided purely for completeness. */
155
- // stopPropagation(): void;
156
- // /** The `EventTarget` dispatching the event */
157
- // readonly target: EventTarget | null;
158
- // /** The millisecond timestamp when the Event object was created. */
159
- // readonly timeStamp: number;
160
- // /** Returns the type of event, e.g. "click", "hashchange", or "submit". */
161
- // readonly type: string;
162
- // }
136
+ interface Event {
137
+ /** This is not used in Node.js and is provided purely for completeness. */
138
+ readonly bubbles: boolean;
139
+ /** Alias for event.stopPropagation(). This is not used in Node.js and is provided purely for completeness. */
140
+ cancelBubble: boolean;
141
+ /** True if the event was created with the cancelable option */
142
+ readonly cancelable: boolean;
143
+ /** This is not used in Node.js and is provided purely for completeness. */
144
+ readonly composed: boolean;
145
+ /** Returns an array containing the current EventTarget as the only entry or empty if the event is not being dispatched. This is not used in Node.js and is provided purely for completeness. */
146
+ composedPath(): [EventTarget?];
147
+ /** Alias for event.target. */
148
+ readonly currentTarget: EventTarget | null;
149
+ /** Is true if cancelable is true and event.preventDefault() has been called. */
150
+ readonly defaultPrevented: boolean;
151
+ /** This is not used in Node.js and is provided purely for completeness. */
152
+ readonly eventPhase: number;
153
+ /** The `AbortSignal` "abort" event is emitted with `isTrusted` set to `true`. The value is `false` in all other cases. */
154
+ readonly isTrusted: boolean;
155
+ /** Sets the `defaultPrevented` property to `true` if `cancelable` is `true`. */
156
+ preventDefault(): void;
157
+ /** This is not used in Node.js and is provided purely for completeness. */
158
+ returnValue: boolean;
159
+ /** Alias for event.target. */
160
+ readonly srcElement: EventTarget | null;
161
+ /** Stops the invocation of event listeners after the current one completes. */
162
+ stopImmediatePropagation(): void;
163
+ /** This is not used in Node.js and is provided purely for completeness. */
164
+ stopPropagation(): void;
165
+ /** The `EventTarget` dispatching the event */
166
+ readonly target: EventTarget | null;
167
+ /** The millisecond timestamp when the Event object was created. */
168
+ readonly timeStamp: number;
169
+ /** Returns the type of event, e.g. "click", "hashchange", or "submit". */
170
+ readonly type: string;
171
+ }
163
172
  declare var Event: {
164
173
  prototype: Event;
165
174
  readonly NONE: 0;
@@ -411,7 +420,13 @@ declare var CloseEvent: {
411
420
  };
412
421
 
413
422
  interface MessageEvent<T = any> extends Bun.MessageEvent<T> {}
414
- declare var MessageEvent: Bun.__internal.UseLibDomIfAvailable<"MessageEvent", MessageEvent>;
423
+ declare var MessageEvent: Bun.__internal.UseLibDomIfAvailable<
424
+ "MessageEvent",
425
+ {
426
+ prototype: MessageEvent;
427
+ new <T>(type: string, eventInitDict?: Bun.MessageEventInit<T>): MessageEvent<any>;
428
+ }
429
+ >;
415
430
 
416
431
  interface CustomEvent<T = any> extends Event {
417
432
  /** Returns any custom data event was created with. Typically used for synthetic events. */
@@ -1119,7 +1134,7 @@ interface ImportMeta {
1119
1134
  * import.meta.env === process.env
1120
1135
  * ```
1121
1136
  */
1122
- readonly env: NodeJS.ProcessEnv;
1137
+ readonly env: Bun.Env;
1123
1138
 
1124
1139
  /**
1125
1140
  * @deprecated Use `require.resolve` or `Bun.resolveSync(moduleId, path.dirname(parent))` instead
@@ -1256,6 +1271,16 @@ interface BlobPropertyBag {
1256
1271
  interface WorkerOptions extends Bun.WorkerOptions {}
1257
1272
 
1258
1273
  interface Blob {
1274
+ /**
1275
+ * The size of this Blob in bytes
1276
+ */
1277
+ readonly size: number;
1278
+
1279
+ /**
1280
+ * The MIME type of this Blob
1281
+ */
1282
+ readonly type: string;
1283
+
1259
1284
  /**
1260
1285
  * Read the data from the blob as a JSON object.
1261
1286
  *
@@ -1461,7 +1486,28 @@ declare var DOMException: Bun.__internal.UseLibDomIfAvailable<
1461
1486
  { prototype: DOMException; new (): DOMException }
1462
1487
  >;
1463
1488
 
1464
- interface FormData {}
1489
+ interface FormData {
1490
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
1491
+ append(name: string, value: string | Blob): void;
1492
+ append(name: string, value: string): void;
1493
+ append(name: string, blobValue: Blob, filename?: string): void;
1494
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */
1495
+ delete(name: string): void;
1496
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */
1497
+ get(name: string): Bun.FormDataEntryValue | null;
1498
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */
1499
+ getAll(name: string): Bun.FormDataEntryValue[];
1500
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */
1501
+ has(name: string): boolean;
1502
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
1503
+ set(name: string, value: string | Blob): void;
1504
+ set(name: string, value: string): void;
1505
+ set(name: string, blobValue: Blob, filename?: string): void;
1506
+ forEach(callbackfn: (value: Bun.FormDataEntryValue, key: string, parent: FormData) => void, thisArg?: any): void;
1507
+ keys(): IterableIterator<string>;
1508
+ values(): IterableIterator<string>;
1509
+ entries(): IterableIterator<[string, string]>;
1510
+ }
1465
1511
  declare var FormData: Bun.__internal.UseLibDomIfAvailable<"FormData", { prototype: FormData; new (): FormData }>;
1466
1512
 
1467
1513
  interface EventSource {}
@@ -1542,16 +1588,39 @@ declare var TextEncoderStream: Bun.__internal.UseLibDomIfAvailable<
1542
1588
  interface URLSearchParams {}
1543
1589
  declare var URLSearchParams: Bun.__internal.UseLibDomIfAvailable<
1544
1590
  "URLSearchParams",
1545
- { prototype: URLSearchParams; new (): URLSearchParams }
1591
+ {
1592
+ prototype: URLSearchParams;
1593
+ new (
1594
+ init?:
1595
+ | URLSearchParams
1596
+ | string
1597
+ | Record<string, string | readonly string[]>
1598
+ | Iterable<[string, string]>
1599
+ | ReadonlyArray<[string, string]>,
1600
+ ): URLSearchParams;
1601
+ }
1546
1602
  >;
1547
1603
 
1548
- interface MessageChannel {}
1604
+ interface MessageChannel {
1605
+ /**
1606
+ * Returns the first MessagePort object.
1607
+ *
1608
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port1)
1609
+ */
1610
+ readonly port1: MessagePort;
1611
+ /**
1612
+ * Returns the second MessagePort object.
1613
+ *
1614
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port2)
1615
+ */
1616
+ readonly port2: MessagePort;
1617
+ }
1549
1618
  declare var MessageChannel: Bun.__internal.UseLibDomIfAvailable<
1550
1619
  "MessageChannel",
1551
1620
  { prototype: MessageChannel; new (): MessageChannel }
1552
1621
  >;
1553
1622
 
1554
- interface MessagePort {}
1623
+ interface MessagePort extends Bun.__internal.LibEmptyOrNodeMessagePort {}
1555
1624
  declare var MessagePort: Bun.__internal.UseLibDomIfAvailable<
1556
1625
  "MessagePort",
1557
1626
  {
@@ -1683,26 +1752,6 @@ interface BunFetchRequestInit extends RequestInit {
1683
1752
  s3?: Bun.S3Options;
1684
1753
  }
1685
1754
 
1686
- /**
1687
- * Send a HTTP(s) request
1688
- *
1689
- * @param request Request object
1690
- * @param init A structured value that contains settings for the fetch() request.
1691
- *
1692
- * @returns A promise that resolves to {@link Response} object.
1693
- */
1694
- declare function fetch(request: Request, init?: BunFetchRequestInit): Promise<Response>;
1695
-
1696
- /**
1697
- * Send a HTTP(s) request
1698
- *
1699
- * @param url URL string
1700
- * @param init A structured value that contains settings for the fetch() request.
1701
- *
1702
- * @returns A promise that resolves to {@link Response} object.
1703
- */
1704
- declare function fetch(url: string | URL | Request, init?: BunFetchRequestInit): Promise<Response>;
1705
-
1706
1755
  /**
1707
1756
  * Send a HTTP(s) request
1708
1757
  *
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.2.8-canary.20250328T140605",
2
+ "version": "1.2.8-canary.20250329T140548",
3
3
  "name": "bun-types",
4
4
  "license": "MIT",
5
5
  "types": "./index.d.ts",