@types/node 22.15.6 → 22.15.8
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.
- node/README.md +1 -1
- node/buffer.buffer.d.ts +2 -0
- node/buffer.d.ts +1 -1
- node/fs.d.ts +7 -7
- node/package.json +2 -2
- node/stream/web.d.ts +3 -3
- node/ts5.6/buffer.buffer.d.ts +2 -0
node/README.md
CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated: Mon, 05 May 2025
|
11
|
+
* Last updated: Mon, 05 May 2025 21:33:58 GMT
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
13
13
|
|
14
14
|
# Credits
|
node/buffer.buffer.d.ts
CHANGED
@@ -451,6 +451,8 @@ declare module "buffer" {
|
|
451
451
|
*/
|
452
452
|
subarray(start?: number, end?: number): Buffer<TArrayBuffer>;
|
453
453
|
}
|
454
|
+
type NonSharedBuffer = Buffer<ArrayBuffer>;
|
455
|
+
type AllowSharedBuffer = Buffer<ArrayBufferLike>;
|
454
456
|
}
|
455
457
|
/** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */
|
456
458
|
var SlowBuffer: {
|
node/buffer.d.ts
CHANGED
@@ -122,7 +122,7 @@ declare module "buffer" {
|
|
122
122
|
* @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
|
123
123
|
*/
|
124
124
|
export function resolveObjectURL(id: string): Blob | undefined;
|
125
|
-
export { Buffer };
|
125
|
+
export { type AllowSharedBuffer, Buffer, type NonSharedBuffer };
|
126
126
|
/**
|
127
127
|
* @experimental
|
128
128
|
*/
|
node/fs.d.ts
CHANGED
@@ -2684,7 +2684,7 @@ declare module "fs" {
|
|
2684
2684
|
} & Abortable)
|
2685
2685
|
| undefined
|
2686
2686
|
| null,
|
2687
|
-
callback: (err: NodeJS.ErrnoException | null, data:
|
2687
|
+
callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void,
|
2688
2688
|
): void;
|
2689
2689
|
/**
|
2690
2690
|
* Asynchronously reads the entire contents of a file.
|
@@ -2719,7 +2719,7 @@ declare module "fs" {
|
|
2719
2719
|
| BufferEncoding
|
2720
2720
|
| undefined
|
2721
2721
|
| null,
|
2722
|
-
callback: (err: NodeJS.ErrnoException | null, data: string |
|
2722
|
+
callback: (err: NodeJS.ErrnoException | null, data: string | NonSharedBuffer) => void,
|
2723
2723
|
): void;
|
2724
2724
|
/**
|
2725
2725
|
* Asynchronously reads the entire contents of a file.
|
@@ -2728,7 +2728,7 @@ declare module "fs" {
|
|
2728
2728
|
*/
|
2729
2729
|
export function readFile(
|
2730
2730
|
path: PathOrFileDescriptor,
|
2731
|
-
callback: (err: NodeJS.ErrnoException | null, data:
|
2731
|
+
callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void,
|
2732
2732
|
): void;
|
2733
2733
|
export namespace readFile {
|
2734
2734
|
/**
|
@@ -2744,7 +2744,7 @@ declare module "fs" {
|
|
2744
2744
|
encoding?: null | undefined;
|
2745
2745
|
flag?: string | undefined;
|
2746
2746
|
} | null,
|
2747
|
-
): Promise<
|
2747
|
+
): Promise<NonSharedBuffer>;
|
2748
2748
|
/**
|
2749
2749
|
* Asynchronously reads the entire contents of a file.
|
2750
2750
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
@@ -2778,7 +2778,7 @@ declare module "fs" {
|
|
2778
2778
|
})
|
2779
2779
|
| BufferEncoding
|
2780
2780
|
| null,
|
2781
|
-
): Promise<string |
|
2781
|
+
): Promise<string | NonSharedBuffer>;
|
2782
2782
|
}
|
2783
2783
|
/**
|
2784
2784
|
* Returns the contents of the `path`.
|
@@ -2810,7 +2810,7 @@ declare module "fs" {
|
|
2810
2810
|
encoding?: null | undefined;
|
2811
2811
|
flag?: string | undefined;
|
2812
2812
|
} | null,
|
2813
|
-
):
|
2813
|
+
): NonSharedBuffer;
|
2814
2814
|
/**
|
2815
2815
|
* Synchronously reads the entire contents of a file.
|
2816
2816
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
@@ -2842,7 +2842,7 @@ declare module "fs" {
|
|
2842
2842
|
})
|
2843
2843
|
| BufferEncoding
|
2844
2844
|
| null,
|
2845
|
-
): string |
|
2845
|
+
): string | NonSharedBuffer;
|
2846
2846
|
export type WriteFileOptions =
|
2847
2847
|
| (
|
2848
2848
|
& ObjectEncodingOptions
|
node/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/node",
|
3
|
-
"version": "22.15.
|
3
|
+
"version": "22.15.8",
|
4
4
|
"description": "TypeScript definitions for node",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
6
6
|
"license": "MIT",
|
@@ -220,6 +220,6 @@
|
|
220
220
|
"undici-types": "~6.21.0"
|
221
221
|
},
|
222
222
|
"peerDependencies": {},
|
223
|
-
"typesPublisherContentHash": "
|
223
|
+
"typesPublisherContentHash": "f33e6082d94335ad1265895a51362f7a441897e171eb3ec61b6ef66ec37e658f",
|
224
224
|
"typeScriptVersion": "5.1"
|
225
225
|
}
|
node/stream/web.d.ts
CHANGED
@@ -97,7 +97,7 @@ declare module "stream/web" {
|
|
97
97
|
signal?: AbortSignal;
|
98
98
|
}
|
99
99
|
interface ReadableStreamGenericReader {
|
100
|
-
readonly closed: Promise<
|
100
|
+
readonly closed: Promise<void>;
|
101
101
|
cancel(reason?: any): Promise<void>;
|
102
102
|
}
|
103
103
|
type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
|
@@ -307,9 +307,9 @@ declare module "stream/web" {
|
|
307
307
|
* sink.
|
308
308
|
*/
|
309
309
|
interface WritableStreamDefaultWriter<W = any> {
|
310
|
-
readonly closed: Promise<
|
310
|
+
readonly closed: Promise<void>;
|
311
311
|
readonly desiredSize: number | null;
|
312
|
-
readonly ready: Promise<
|
312
|
+
readonly ready: Promise<void>;
|
313
313
|
abort(reason?: any): Promise<void>;
|
314
314
|
close(): Promise<void>;
|
315
315
|
releaseLock(): void;
|
node/ts5.6/buffer.buffer.d.ts
CHANGED
@@ -448,6 +448,8 @@ declare module "buffer" {
|
|
448
448
|
*/
|
449
449
|
subarray(start?: number, end?: number): Buffer;
|
450
450
|
}
|
451
|
+
type NonSharedBuffer = Buffer;
|
452
|
+
type AllowSharedBuffer = Buffer;
|
451
453
|
}
|
452
454
|
/** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */
|
453
455
|
var SlowBuffer: {
|