@types/node 22.15.7 → 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 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 21:02:40 GMT
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: Buffer) => void,
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 | Buffer) => void,
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: Buffer) => void,
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<Buffer>;
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 | Buffer>;
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
- ): Buffer;
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 | Buffer;
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.7",
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": "13b8f49d41ffb643d1aac1f03379392f652cc16ce419217f4de4dbe2c212e6bf",
223
+ "typesPublisherContentHash": "f33e6082d94335ad1265895a51362f7a441897e171eb3ec61b6ef66ec37e658f",
224
224
  "typeScriptVersion": "5.1"
225
225
  }
@@ -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: {