@types/node 20.17.36 → 20.17.37

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 v20.17/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/v20.
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
@@ -450,6 +450,8 @@ declare module "buffer" {
450
450
  */
451
451
  subarray(start?: number, end?: number): Buffer<TArrayBuffer>;
452
452
  }
453
+ type NonSharedBuffer = Buffer<ArrayBuffer>;
454
+ type AllowSharedBuffer = Buffer<ArrayBufferLike>;
453
455
  }
454
456
  /** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */
455
457
  var SlowBuffer: {
node v20.17/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 v20.17/fs.d.ts CHANGED
@@ -2682,7 +2682,7 @@ declare module "fs" {
2682
2682
  } & Abortable)
2683
2683
  | undefined
2684
2684
  | null,
2685
- callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void,
2685
+ callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void,
2686
2686
  ): void;
2687
2687
  /**
2688
2688
  * Asynchronously reads the entire contents of a file.
@@ -2717,7 +2717,7 @@ declare module "fs" {
2717
2717
  | BufferEncoding
2718
2718
  | undefined
2719
2719
  | null,
2720
- callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void,
2720
+ callback: (err: NodeJS.ErrnoException | null, data: string | NonSharedBuffer) => void,
2721
2721
  ): void;
2722
2722
  /**
2723
2723
  * Asynchronously reads the entire contents of a file.
@@ -2726,7 +2726,7 @@ declare module "fs" {
2726
2726
  */
2727
2727
  export function readFile(
2728
2728
  path: PathOrFileDescriptor,
2729
- callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void,
2729
+ callback: (err: NodeJS.ErrnoException | null, data: NonSharedBuffer) => void,
2730
2730
  ): void;
2731
2731
  export namespace readFile {
2732
2732
  /**
@@ -2742,7 +2742,7 @@ declare module "fs" {
2742
2742
  encoding?: null | undefined;
2743
2743
  flag?: string | undefined;
2744
2744
  } | null,
2745
- ): Promise<Buffer>;
2745
+ ): Promise<NonSharedBuffer>;
2746
2746
  /**
2747
2747
  * Asynchronously reads the entire contents of a file.
2748
2748
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
@@ -2776,7 +2776,7 @@ declare module "fs" {
2776
2776
  })
2777
2777
  | BufferEncoding
2778
2778
  | null,
2779
- ): Promise<string | Buffer>;
2779
+ ): Promise<string | NonSharedBuffer>;
2780
2780
  }
2781
2781
  /**
2782
2782
  * Returns the contents of the `path`.
@@ -2808,7 +2808,7 @@ declare module "fs" {
2808
2808
  encoding?: null | undefined;
2809
2809
  flag?: string | undefined;
2810
2810
  } | null,
2811
- ): Buffer;
2811
+ ): NonSharedBuffer;
2812
2812
  /**
2813
2813
  * Synchronously reads the entire contents of a file.
2814
2814
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
@@ -2840,7 +2840,7 @@ declare module "fs" {
2840
2840
  })
2841
2841
  | BufferEncoding
2842
2842
  | null,
2843
- ): string | Buffer;
2843
+ ): string | NonSharedBuffer;
2844
2844
  export type WriteFileOptions =
2845
2845
  | (
2846
2846
  & ObjectEncodingOptions
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.17.36",
3
+ "version": "20.17.37",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -215,6 +215,6 @@
215
215
  "undici-types": "~6.19.2"
216
216
  },
217
217
  "peerDependencies": {},
218
- "typesPublisherContentHash": "211e3425c1925b58b234ecf9c51a1845814526e356bb79f060b29fc72b5e4d50",
218
+ "typesPublisherContentHash": "d15f46c58fd07f19a0d5cd2f3cf6e584d40c9a6225811cf7f56fc9058a0e4999",
219
219
  "typeScriptVersion": "5.1"
220
220
  }
@@ -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: {