@types/node 20.5.3 → 20.5.4
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/fs.d.ts +18 -5
- node/package.json +2 -2
- node/ts4.8/fs.d.ts +18 -5
node/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.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Wed, 23 Aug 2023 21:03:05 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
|
|
14
14
|
|
node/fs.d.ts
CHANGED
|
@@ -3618,15 +3618,28 @@ declare module 'fs' {
|
|
|
3618
3618
|
fd?: number | promises.FileHandle | undefined;
|
|
3619
3619
|
mode?: number | undefined;
|
|
3620
3620
|
autoClose?: boolean | undefined;
|
|
3621
|
-
/**
|
|
3622
|
-
* @default false
|
|
3623
|
-
*/
|
|
3624
3621
|
emitClose?: boolean | undefined;
|
|
3625
3622
|
start?: number | undefined;
|
|
3626
|
-
|
|
3623
|
+
signal?: AbortSignal | null | undefined;
|
|
3624
|
+
}
|
|
3625
|
+
interface FSImplementation {
|
|
3626
|
+
open?: (...args: any[]) => any;
|
|
3627
|
+
close?: (...args: any[]) => any;
|
|
3628
|
+
}
|
|
3629
|
+
interface CreateReadStreamFSImplementation extends FSImplementation {
|
|
3630
|
+
read: (...args: any[]) => any;
|
|
3631
|
+
}
|
|
3632
|
+
interface CreateWriteStreamFSImplementation extends FSImplementation {
|
|
3633
|
+
write: (...args: any[]) => any;
|
|
3634
|
+
writev?: (...args: any[]) => any;
|
|
3627
3635
|
}
|
|
3628
3636
|
interface ReadStreamOptions extends StreamOptions {
|
|
3637
|
+
fs?: CreateReadStreamFSImplementation | null | undefined;
|
|
3629
3638
|
end?: number | undefined;
|
|
3639
|
+
highWaterMark?: number | undefined;
|
|
3640
|
+
}
|
|
3641
|
+
interface WriteStreamOptions extends StreamOptions {
|
|
3642
|
+
fs?: CreateWriteStreamFSImplementation | null | undefined;
|
|
3630
3643
|
}
|
|
3631
3644
|
/**
|
|
3632
3645
|
* Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream
|
|
@@ -3720,7 +3733,7 @@ declare module 'fs' {
|
|
|
3720
3733
|
* If `options` is a string, then it specifies the encoding.
|
|
3721
3734
|
* @since v0.1.31
|
|
3722
3735
|
*/
|
|
3723
|
-
export function createWriteStream(path: PathLike, options?: BufferEncoding |
|
|
3736
|
+
export function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream;
|
|
3724
3737
|
/**
|
|
3725
3738
|
* Forces all currently queued I/O operations associated with the file to the
|
|
3726
3739
|
* 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
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "20.5.
|
|
3
|
+
"version": "20.5.4",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -227,6 +227,6 @@
|
|
|
227
227
|
},
|
|
228
228
|
"scripts": {},
|
|
229
229
|
"dependencies": {},
|
|
230
|
-
"typesPublisherContentHash": "
|
|
230
|
+
"typesPublisherContentHash": "9e52205ef629ccda4825d30a82fcc7852c33a8d990ed646560b57506c200a903",
|
|
231
231
|
"typeScriptVersion": "4.3"
|
|
232
232
|
}
|
node/ts4.8/fs.d.ts
CHANGED
|
@@ -3618,15 +3618,28 @@ declare module 'fs' {
|
|
|
3618
3618
|
fd?: number | promises.FileHandle | undefined;
|
|
3619
3619
|
mode?: number | undefined;
|
|
3620
3620
|
autoClose?: boolean | undefined;
|
|
3621
|
-
/**
|
|
3622
|
-
* @default false
|
|
3623
|
-
*/
|
|
3624
3621
|
emitClose?: boolean | undefined;
|
|
3625
3622
|
start?: number | undefined;
|
|
3626
|
-
|
|
3623
|
+
signal?: AbortSignal | null | undefined;
|
|
3624
|
+
}
|
|
3625
|
+
interface FSImplementation {
|
|
3626
|
+
open?: (...args: any[]) => any;
|
|
3627
|
+
close?: (...args: any[]) => any;
|
|
3628
|
+
}
|
|
3629
|
+
interface CreateReadStreamFSImplementation extends FSImplementation {
|
|
3630
|
+
read: (...args: any[]) => any;
|
|
3631
|
+
}
|
|
3632
|
+
interface CreateWriteStreamFSImplementation extends FSImplementation {
|
|
3633
|
+
write: (...args: any[]) => any;
|
|
3634
|
+
writev?: (...args: any[]) => any;
|
|
3627
3635
|
}
|
|
3628
3636
|
interface ReadStreamOptions extends StreamOptions {
|
|
3637
|
+
fs?: CreateReadStreamFSImplementation | null | undefined;
|
|
3629
3638
|
end?: number | undefined;
|
|
3639
|
+
highWaterMark?: number | undefined;
|
|
3640
|
+
}
|
|
3641
|
+
interface WriteStreamOptions extends StreamOptions {
|
|
3642
|
+
fs?: CreateWriteStreamFSImplementation | null | undefined;
|
|
3630
3643
|
}
|
|
3631
3644
|
/**
|
|
3632
3645
|
* Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream
|
|
@@ -3720,7 +3733,7 @@ declare module 'fs' {
|
|
|
3720
3733
|
* If `options` is a string, then it specifies the encoding.
|
|
3721
3734
|
* @since v0.1.31
|
|
3722
3735
|
*/
|
|
3723
|
-
export function createWriteStream(path: PathLike, options?: BufferEncoding |
|
|
3736
|
+
export function createWriteStream(path: PathLike, options?: BufferEncoding | WriteStreamOptions): WriteStream;
|
|
3724
3737
|
/**
|
|
3725
3738
|
* Forces all currently queued I/O operations associated with the file to the
|
|
3726
3739
|
* 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
|