@types/node 18.17.8 → 18.17.9

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 v18.17/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v18.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 22 Aug 2023 18:04:30 GMT
11
+ * Last updated: Wed, 23 Aug 2023 21:03:06 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14
14
 
node v18.17/fs.d.ts CHANGED
@@ -3582,15 +3582,27 @@ declare module 'fs' {
3582
3582
  fd?: number | promises.FileHandle | undefined;
3583
3583
  mode?: number | undefined;
3584
3584
  autoClose?: boolean | undefined;
3585
- /**
3586
- * @default false
3587
- */
3588
3585
  emitClose?: boolean | undefined;
3589
3586
  start?: number | undefined;
3590
- highWaterMark?: number | undefined;
3587
+ }
3588
+ interface FSImplementation {
3589
+ open?: (...args: any[]) => any;
3590
+ close?: (...args: any[]) => any;
3591
+ }
3592
+ interface CreateReadStreamFSImplementation extends FSImplementation {
3593
+ read: (...args: any[]) => any;
3594
+ }
3595
+ interface CreateWriteStreamFSImplementation extends FSImplementation {
3596
+ write: (...args: any[]) => any;
3597
+ writev?: (...args: any[]) => any;
3591
3598
  }
3592
3599
  interface ReadStreamOptions extends StreamOptions {
3600
+ fs?: CreateReadStreamFSImplementation | null | undefined;
3593
3601
  end?: number | undefined;
3602
+ highWaterMark?: number | undefined;
3603
+ }
3604
+ interface WriteStreamOptions extends StreamOptions {
3605
+ fs?: CreateWriteStreamFSImplementation | null | undefined;
3594
3606
  }
3595
3607
  /**
3596
3608
  * Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream
@@ -3684,7 +3696,7 @@ declare module 'fs' {
3684
3696
  * If `options` is a string, then it specifies the encoding.
3685
3697
  * @since v0.1.31
3686
3698
  */
3687
- export function createWriteStream(path: PathLike, options?: BufferEncoding | StreamOptions): WriteStream;
3699
+ export function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream;
3688
3700
  /**
3689
3701
  * Forces all currently queued I/O operations associated with the file to the
3690
3702
  * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.17.8",
3
+ "version": "18.17.9",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -232,6 +232,6 @@
232
232
  },
233
233
  "scripts": {},
234
234
  "dependencies": {},
235
- "typesPublisherContentHash": "677ff4e5e4d78b1e84ce944118a6c6d4844fca1db1e7226baa54d4c48c6e2f97",
235
+ "typesPublisherContentHash": "1ac2d87015f8895c0d056cf53ed50f7936b5306c403b9b7ee02a7191e4deb8ec",
236
236
  "typeScriptVersion": "4.3"
237
237
  }
@@ -3582,15 +3582,27 @@ declare module 'fs' {
3582
3582
  fd?: number | promises.FileHandle | undefined;
3583
3583
  mode?: number | undefined;
3584
3584
  autoClose?: boolean | undefined;
3585
- /**
3586
- * @default false
3587
- */
3588
3585
  emitClose?: boolean | undefined;
3589
3586
  start?: number | undefined;
3590
- highWaterMark?: number | undefined;
3587
+ }
3588
+ interface FSImplementation {
3589
+ open?: (...args: any[]) => any;
3590
+ close?: (...args: any[]) => any;
3591
+ }
3592
+ interface CreateReadStreamFSImplementation extends FSImplementation {
3593
+ read: (...args: any[]) => any;
3594
+ }
3595
+ interface CreateWriteStreamFSImplementation extends FSImplementation {
3596
+ write: (...args: any[]) => any;
3597
+ writev?: (...args: any[]) => any;
3591
3598
  }
3592
3599
  interface ReadStreamOptions extends StreamOptions {
3600
+ fs?: CreateReadStreamFSImplementation | null | undefined;
3593
3601
  end?: number | undefined;
3602
+ highWaterMark?: number | undefined;
3603
+ }
3604
+ interface WriteStreamOptions extends StreamOptions {
3605
+ fs?: CreateWriteStreamFSImplementation | null | undefined;
3594
3606
  }
3595
3607
  /**
3596
3608
  * Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream
@@ -3684,7 +3696,7 @@ declare module 'fs' {
3684
3696
  * If `options` is a string, then it specifies the encoding.
3685
3697
  * @since v0.1.31
3686
3698
  */
3687
- export function createWriteStream(path: PathLike, options?: BufferEncoding | StreamOptions): WriteStream;
3699
+ export function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream;
3688
3700
  /**
3689
3701
  * Forces all currently queued I/O operations associated with the file to the
3690
3702
  * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details. No arguments other