bun-types-no-globals 1.3.2-canary.20251104T140728 → 1.3.2-canary.20251105T140650
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/lib/bun.d.ts +4 -4
- package/lib/overrides.d.ts +11 -17
- package/lib/test.d.ts +1 -1
- package/package.json +1 -1
package/lib/bun.d.ts
CHANGED
|
@@ -5791,11 +5791,11 @@ declare module "bun" {
|
|
|
5791
5791
|
* @category Process Management
|
|
5792
5792
|
*
|
|
5793
5793
|
* ```js
|
|
5794
|
-
* const
|
|
5794
|
+
* const proc = Bun.spawn({
|
|
5795
5795
|
* cmd: ["echo", "hello"],
|
|
5796
5796
|
* stdout: "pipe",
|
|
5797
5797
|
* });
|
|
5798
|
-
* const text = await
|
|
5798
|
+
* const text = await proc.stdout.text();
|
|
5799
5799
|
* console.log(text); // "hello\n"
|
|
5800
5800
|
* ```
|
|
5801
5801
|
*
|
|
@@ -5829,8 +5829,8 @@ declare module "bun" {
|
|
|
5829
5829
|
* Spawn a new process
|
|
5830
5830
|
*
|
|
5831
5831
|
* ```js
|
|
5832
|
-
* const
|
|
5833
|
-
* const text = await
|
|
5832
|
+
* const proc = Bun.spawn(["echo", "hello"]);
|
|
5833
|
+
* const text = await proc.stdout.text();
|
|
5834
5834
|
* console.log(text); // "hello\n"
|
|
5835
5835
|
* ```
|
|
5836
5836
|
*
|
package/lib/overrides.d.ts
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
export {};
|
|
2
2
|
declare module "stream/web" {
|
|
3
|
-
interface ReadableStream {
|
|
3
|
+
interface ReadableStream extends BunConsumerConvenienceMethods {
|
|
4
4
|
/**
|
|
5
|
-
* Consume a
|
|
6
|
-
*/
|
|
7
|
-
text(): Promise<string>;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Consume a ReadableStream as a Uint8Array
|
|
11
|
-
*/
|
|
12
|
-
bytes(): Promise<Uint8Array<ArrayBuffer>>;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Consume a ReadableStream as JSON
|
|
16
|
-
*/
|
|
17
|
-
json(): Promise<any>;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Consume a ReadableStream as a Blob
|
|
5
|
+
* Consume as a Blob
|
|
21
6
|
*/
|
|
22
7
|
blob(): Promise<Blob>;
|
|
23
8
|
}
|
|
24
9
|
}
|
|
10
|
+
declare module "buffer" {
|
|
11
|
+
interface Blob extends BunConsumerConvenienceMethods {
|
|
12
|
+
// We have to specify bytes again even though it comes from
|
|
13
|
+
// BunConsumerConvenienceMethods, because inheritance in TypeScript is
|
|
14
|
+
// slightly different from just "copying in the methods" (the difference is
|
|
15
|
+
// related to how type parameters are resolved)
|
|
16
|
+
bytes(): Promise<Uint8Array<ArrayBuffer>>;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
25
19
|
declare module "url" {
|
|
26
20
|
interface URLSearchParams {
|
|
27
21
|
toJSON(): Record<string, string>;
|
package/lib/test.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bun-types-no-globals",
|
|
3
|
-
"version": "1.3.2-canary.
|
|
3
|
+
"version": "1.3.2-canary.20251105T140650",
|
|
4
4
|
"main": "./generator/index.ts",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"description": "TypeScript type definitions for Bun without global types pollution",
|