@types/node 20.0.0 → 20.1.0
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/assert.d.ts +4 -3
- node/async_hooks.d.ts +1 -1
- node/buffer.d.ts +6 -6
- node/child_process.d.ts +1 -1
- node/cluster.d.ts +1 -1
- node/console.d.ts +1 -1
- node/crypto.d.ts +1 -1
- node/dgram.d.ts +1 -1
- node/diagnostics_channel.d.ts +1 -1
- node/dns.d.ts +9 -1
- node/domain.d.ts +2 -2
- node/events.d.ts +1 -1
- node/fs/promises.d.ts +4 -0
- node/fs.d.ts +27 -1
- node/http.d.ts +12 -4
- node/http2.d.ts +1 -1
- node/https.d.ts +1 -1
- node/index.d.ts +1 -1
- node/inspector.d.ts +1 -1
- node/net.d.ts +1 -1
- node/os.d.ts +1 -1
- node/package.json +2 -2
- node/path.d.ts +1 -1
- node/perf_hooks.d.ts +1 -1
- node/punycode.d.ts +1 -1
- node/querystring.d.ts +1 -1
- node/readline.d.ts +1 -1
- node/repl.d.ts +1 -1
- node/stream.d.ts +15 -1
- node/string_decoder.d.ts +1 -1
- node/test.d.ts +423 -110
- node/timers.d.ts +1 -1
- node/tls.d.ts +3 -2
- node/trace_events.d.ts +1 -1
- node/ts4.8/assert.d.ts +5 -4
- node/ts4.8/async_hooks.d.ts +5 -13
- node/ts4.8/buffer.d.ts +6 -6
- node/ts4.8/child_process.d.ts +1 -1
- node/ts4.8/cluster.d.ts +1 -1
- node/ts4.8/console.d.ts +1 -1
- node/ts4.8/crypto.d.ts +1 -1
- node/ts4.8/dgram.d.ts +1 -1
- node/ts4.8/diagnostics_channel.d.ts +1 -1
- node/ts4.8/dns.d.ts +9 -1
- node/ts4.8/domain.d.ts +2 -2
- node/ts4.8/events.d.ts +1 -1
- node/ts4.8/fs/promises.d.ts +24 -0
- node/ts4.8/fs.d.ts +123 -1
- node/ts4.8/globals.d.ts +29 -28
- node/ts4.8/http.d.ts +67 -2
- node/ts4.8/http2.d.ts +1 -1
- node/ts4.8/https.d.ts +1 -1
- node/ts4.8/inspector.d.ts +1 -1
- node/ts4.8/net.d.ts +7 -7
- node/ts4.8/os.d.ts +1 -1
- node/ts4.8/path.d.ts +1 -1
- node/ts4.8/perf_hooks.d.ts +1 -1
- node/ts4.8/punycode.d.ts +1 -1
- node/ts4.8/querystring.d.ts +1 -1
- node/ts4.8/readline.d.ts +1 -1
- node/ts4.8/repl.d.ts +1 -1
- node/ts4.8/stream.d.ts +15 -1
- node/ts4.8/string_decoder.d.ts +1 -1
- node/ts4.8/test.d.ts +423 -111
- node/ts4.8/timers.d.ts +8 -1
- node/ts4.8/tls.d.ts +3 -2
- node/ts4.8/trace_events.d.ts +1 -1
- node/ts4.8/tty.d.ts +1 -1
- node/ts4.8/url.d.ts +1 -1
- node/ts4.8/util.d.ts +2 -2
- node/ts4.8/v8.d.ts +4 -1
- node/ts4.8/vm.d.ts +1 -1
- node/ts4.8/wasi.d.ts +6 -6
- node/ts4.8/worker_threads.d.ts +1 -1
- node/ts4.8/zlib.d.ts +1 -1
- node/tty.d.ts +1 -1
- node/url.d.ts +1 -1
- node/util.d.ts +2 -2
- node/v8.d.ts +1 -1
- node/vm.d.ts +1 -1
- node/wasi.d.ts +6 -6
- node/worker_threads.d.ts +1 -1
- node/zlib.d.ts +1 -1
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: Fri, 05 May 2023
|
|
11
|
+
* Last updated: Fri, 05 May 2023 21:32:43 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
|
|
14
14
|
|
node/assert.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The `node:assert` module provides a set of assertion functions for verifying
|
|
3
3
|
* invariants.
|
|
4
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
4
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/assert.js)
|
|
5
5
|
*/
|
|
6
6
|
declare module 'assert' {
|
|
7
7
|
/**
|
|
@@ -35,9 +35,10 @@ declare module 'assert' {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
* This feature is
|
|
38
|
+
* This feature is deprecated and will be removed in a future version.
|
|
39
|
+
* Please consider using alternatives such as the `mock` helper function.
|
|
39
40
|
* @since v14.2.0, v12.19.0
|
|
40
|
-
* @
|
|
41
|
+
* @deprecated Deprecated
|
|
41
42
|
*/
|
|
42
43
|
class CallTracker {
|
|
43
44
|
/**
|
node/async_hooks.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* import async_hooks from 'node:async_hooks';
|
|
13
13
|
* ```
|
|
14
14
|
* @experimental
|
|
15
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
15
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/async_hooks.js)
|
|
16
16
|
*/
|
|
17
17
|
declare module 'async_hooks' {
|
|
18
18
|
/**
|
node/buffer.d.ts
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
* // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
|
|
42
42
|
* const buf7 = Buffer.from('tést', 'latin1');
|
|
43
43
|
* ```
|
|
44
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
44
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/buffer.js)
|
|
45
45
|
*/
|
|
46
46
|
declare module 'buffer' {
|
|
47
47
|
import { BinaryLike } from 'node:crypto';
|
|
@@ -446,7 +446,7 @@ declare module 'buffer' {
|
|
|
446
446
|
*
|
|
447
447
|
* ```js
|
|
448
448
|
* const u16 = new Uint16Array([0, 0xffff]);
|
|
449
|
-
* const buf = Buffer.copyBytesFrom(u16,
|
|
449
|
+
* const buf = Buffer.copyBytesFrom(u16, 1, 1);
|
|
450
450
|
* u16[1] = 0;
|
|
451
451
|
* console.log(buf.length); // 2
|
|
452
452
|
* console.log(buf[0]); // 255
|
|
@@ -488,7 +488,7 @@ declare module 'buffer' {
|
|
|
488
488
|
* // Prints: <Buffer 00 00 00 00 00>
|
|
489
489
|
* ```
|
|
490
490
|
*
|
|
491
|
-
* If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `
|
|
491
|
+
* If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
|
|
492
492
|
*
|
|
493
493
|
* If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`.
|
|
494
494
|
*
|
|
@@ -525,7 +525,7 @@ declare module 'buffer' {
|
|
|
525
525
|
*/
|
|
526
526
|
alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
|
|
527
527
|
/**
|
|
528
|
-
* Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `
|
|
528
|
+
* Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
|
|
529
529
|
*
|
|
530
530
|
* The underlying memory for `Buffer` instances created in this way is _not_
|
|
531
531
|
* _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
|
|
@@ -562,8 +562,8 @@ declare module 'buffer' {
|
|
|
562
562
|
*/
|
|
563
563
|
allocUnsafe(size: number): Buffer;
|
|
564
564
|
/**
|
|
565
|
-
* Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `
|
|
566
|
-
*
|
|
565
|
+
* Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if
|
|
566
|
+
* `size` is 0.
|
|
567
567
|
*
|
|
568
568
|
* The underlying memory for `Buffer` instances created in this way is _not_
|
|
569
569
|
* _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize
|
node/child_process.d.ts
CHANGED
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
* For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
|
|
64
64
|
* the synchronous methods can have significant impact on performance due to
|
|
65
65
|
* stalling the event loop while spawned processes complete.
|
|
66
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
66
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/child_process.js)
|
|
67
67
|
*/
|
|
68
68
|
declare module 'child_process' {
|
|
69
69
|
import { ObjectEncodingOptions } from 'node:fs';
|
node/cluster.d.ts
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
* ```
|
|
51
51
|
*
|
|
52
52
|
* On Windows, it is not yet possible to set up a named pipe server in a worker.
|
|
53
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
53
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/cluster.js)
|
|
54
54
|
*/
|
|
55
55
|
declare module 'cluster' {
|
|
56
56
|
import * as child from 'node:child_process';
|
node/console.d.ts
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
* myConsole.warn(`Danger ${name}! Danger!`);
|
|
54
54
|
* // Prints: Danger Will Robinson! Danger!, to err
|
|
55
55
|
* ```
|
|
56
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
56
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/console.js)
|
|
57
57
|
*/
|
|
58
58
|
declare module 'console' {
|
|
59
59
|
import console = require('node:console');
|
node/crypto.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* // Prints:
|
|
15
15
|
* // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
|
|
16
16
|
* ```
|
|
17
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
17
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/crypto.js)
|
|
18
18
|
*/
|
|
19
19
|
declare module 'crypto' {
|
|
20
20
|
import * as stream from 'node:stream';
|
node/dgram.d.ts
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* server.bind(41234);
|
|
24
24
|
* // Prints: server listening 0.0.0.0:41234
|
|
25
25
|
* ```
|
|
26
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
26
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/dgram.js)
|
|
27
27
|
*/
|
|
28
28
|
declare module 'dgram' {
|
|
29
29
|
import { AddressInfo } from 'node:net';
|
node/diagnostics_channel.d.ts
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* should generally include the module name to avoid collisions with data from
|
|
21
21
|
* other modules.
|
|
22
22
|
* @since v15.1.0, v14.17.0
|
|
23
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
23
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/diagnostics_channel.js)
|
|
24
24
|
*/
|
|
25
25
|
declare module 'diagnostics_channel' {
|
|
26
26
|
/**
|
node/dns.d.ts
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
* ```
|
|
43
43
|
*
|
|
44
44
|
* See the `Implementation considerations section` for more information.
|
|
45
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
45
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/dns.js)
|
|
46
46
|
*/
|
|
47
47
|
declare module 'dns' {
|
|
48
48
|
import * as dnsPromises from 'node:dns/promises';
|
|
@@ -484,6 +484,14 @@ declare module 'dns' {
|
|
|
484
484
|
* @since v0.1.16
|
|
485
485
|
*/
|
|
486
486
|
export function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void;
|
|
487
|
+
/**
|
|
488
|
+
* Get the default value for `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
|
|
489
|
+
*
|
|
490
|
+
* * `ipv4first`: for `verbatim` defaulting to `false`.
|
|
491
|
+
* * `verbatim`: for `verbatim` defaulting to `true`.
|
|
492
|
+
* @since v20.1.0
|
|
493
|
+
*/
|
|
494
|
+
export function getDefaultResultOrder(): 'ipv4first' | 'verbatim';
|
|
487
495
|
/**
|
|
488
496
|
* Sets the IP address and port of servers to be used when performing DNS
|
|
489
497
|
* resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
|
node/domain.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* will be notified, rather than losing the context of the error in the`process.on('uncaughtException')` handler, or causing the program to
|
|
13
13
|
* exit immediately with an error code.
|
|
14
14
|
* @deprecated Since v1.4.2 - Deprecated
|
|
15
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
15
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/domain.js)
|
|
16
16
|
*/
|
|
17
17
|
declare module 'domain' {
|
|
18
18
|
import EventEmitter = require('node:events');
|
|
@@ -56,7 +56,7 @@ declare module 'domain' {
|
|
|
56
56
|
exit(): void;
|
|
57
57
|
/**
|
|
58
58
|
* Run the supplied function in the context of the domain, implicitly
|
|
59
|
-
* binding all event emitters, timers, and
|
|
59
|
+
* binding all event emitters, timers, and low-level requests that are
|
|
60
60
|
* created in that context. Optionally, arguments can be passed to
|
|
61
61
|
* the function.
|
|
62
62
|
*
|
node/events.d.ts
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* });
|
|
33
33
|
* myEmitter.emit('event');
|
|
34
34
|
* ```
|
|
35
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
35
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/events.js)
|
|
36
36
|
*/
|
|
37
37
|
declare module 'events' {
|
|
38
38
|
// NOTE: This class is in the docs but is **not actually exported** by Node.
|
node/fs/promises.d.ts
CHANGED
|
@@ -642,6 +642,7 @@ declare module 'fs/promises' {
|
|
|
642
642
|
options?:
|
|
643
643
|
| (ObjectEncodingOptions & {
|
|
644
644
|
withFileTypes?: false | undefined;
|
|
645
|
+
recursive?: boolean | undefined;
|
|
645
646
|
})
|
|
646
647
|
| BufferEncoding
|
|
647
648
|
| null
|
|
@@ -657,6 +658,7 @@ declare module 'fs/promises' {
|
|
|
657
658
|
| {
|
|
658
659
|
encoding: 'buffer';
|
|
659
660
|
withFileTypes?: false | undefined;
|
|
661
|
+
recursive?: boolean | undefined;
|
|
660
662
|
}
|
|
661
663
|
| 'buffer'
|
|
662
664
|
): Promise<Buffer[]>;
|
|
@@ -670,6 +672,7 @@ declare module 'fs/promises' {
|
|
|
670
672
|
options?:
|
|
671
673
|
| (ObjectEncodingOptions & {
|
|
672
674
|
withFileTypes?: false | undefined;
|
|
675
|
+
recursive?: boolean | undefined;
|
|
673
676
|
})
|
|
674
677
|
| BufferEncoding
|
|
675
678
|
| null
|
|
@@ -683,6 +686,7 @@ declare module 'fs/promises' {
|
|
|
683
686
|
path: PathLike,
|
|
684
687
|
options: ObjectEncodingOptions & {
|
|
685
688
|
withFileTypes: true;
|
|
689
|
+
recursive?: boolean | undefined;
|
|
686
690
|
}
|
|
687
691
|
): Promise<Dirent[]>;
|
|
688
692
|
/**
|
node/fs.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* All file system operations have synchronous, callback, and promise-based
|
|
18
18
|
* forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
|
|
19
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
19
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/fs.js)
|
|
20
20
|
*/
|
|
21
21
|
declare module 'fs' {
|
|
22
22
|
import * as stream from 'node:stream';
|
|
@@ -848,6 +848,9 @@ declare module 'fs' {
|
|
|
848
848
|
*
|
|
849
849
|
* In case of an error, the `err.code` will be one of `Common System Errors`.
|
|
850
850
|
*
|
|
851
|
+
* {@link stat} follows symbolic links. Use {@link lstat} to look at the
|
|
852
|
+
* links themselves.
|
|
853
|
+
*
|
|
851
854
|
* Using `fs.stat()` to check for the existence of a file before calling`fs.open()`, `fs.readFile()`, or `fs.writeFile()` is not recommended.
|
|
852
855
|
* Instead, user code should open/read/write the file directly and handle the
|
|
853
856
|
* error raised if the file is not available.
|
|
@@ -1881,6 +1884,7 @@ declare module 'fs' {
|
|
|
1881
1884
|
| {
|
|
1882
1885
|
encoding: BufferEncoding | null;
|
|
1883
1886
|
withFileTypes?: false | undefined;
|
|
1887
|
+
recursive?: boolean | undefined;
|
|
1884
1888
|
}
|
|
1885
1889
|
| BufferEncoding
|
|
1886
1890
|
| undefined
|
|
@@ -1898,6 +1902,7 @@ declare module 'fs' {
|
|
|
1898
1902
|
| {
|
|
1899
1903
|
encoding: 'buffer';
|
|
1900
1904
|
withFileTypes?: false | undefined;
|
|
1905
|
+
recursive?: boolean | undefined;
|
|
1901
1906
|
}
|
|
1902
1907
|
| 'buffer',
|
|
1903
1908
|
callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void
|
|
@@ -1912,6 +1917,7 @@ declare module 'fs' {
|
|
|
1912
1917
|
options:
|
|
1913
1918
|
| (ObjectEncodingOptions & {
|
|
1914
1919
|
withFileTypes?: false | undefined;
|
|
1920
|
+
recursive?: boolean | undefined;
|
|
1915
1921
|
})
|
|
1916
1922
|
| BufferEncoding
|
|
1917
1923
|
| undefined
|
|
@@ -1932,6 +1938,7 @@ declare module 'fs' {
|
|
|
1932
1938
|
path: PathLike,
|
|
1933
1939
|
options: ObjectEncodingOptions & {
|
|
1934
1940
|
withFileTypes: true;
|
|
1941
|
+
recursive?: boolean | undefined;
|
|
1935
1942
|
},
|
|
1936
1943
|
callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void
|
|
1937
1944
|
): void;
|
|
@@ -1947,6 +1954,7 @@ declare module 'fs' {
|
|
|
1947
1954
|
| {
|
|
1948
1955
|
encoding: BufferEncoding | null;
|
|
1949
1956
|
withFileTypes?: false | undefined;
|
|
1957
|
+
recursive?: boolean | undefined;
|
|
1950
1958
|
}
|
|
1951
1959
|
| BufferEncoding
|
|
1952
1960
|
| null
|
|
@@ -1963,6 +1971,7 @@ declare module 'fs' {
|
|
|
1963
1971
|
| {
|
|
1964
1972
|
encoding: 'buffer';
|
|
1965
1973
|
withFileTypes?: false | undefined;
|
|
1974
|
+
recursive?: boolean | undefined;
|
|
1966
1975
|
}
|
|
1967
1976
|
): Promise<Buffer[]>;
|
|
1968
1977
|
/**
|
|
@@ -1975,6 +1984,7 @@ declare module 'fs' {
|
|
|
1975
1984
|
options?:
|
|
1976
1985
|
| (ObjectEncodingOptions & {
|
|
1977
1986
|
withFileTypes?: false | undefined;
|
|
1987
|
+
recursive?: boolean | undefined;
|
|
1978
1988
|
})
|
|
1979
1989
|
| BufferEncoding
|
|
1980
1990
|
| null
|
|
@@ -1988,6 +1998,7 @@ declare module 'fs' {
|
|
|
1988
1998
|
path: PathLike,
|
|
1989
1999
|
options: ObjectEncodingOptions & {
|
|
1990
2000
|
withFileTypes: true;
|
|
2001
|
+
recursive?: boolean | undefined;
|
|
1991
2002
|
}
|
|
1992
2003
|
): Promise<Dirent[]>;
|
|
1993
2004
|
}
|
|
@@ -2010,6 +2021,7 @@ declare module 'fs' {
|
|
|
2010
2021
|
| {
|
|
2011
2022
|
encoding: BufferEncoding | null;
|
|
2012
2023
|
withFileTypes?: false | undefined;
|
|
2024
|
+
recursive?: boolean | undefined;
|
|
2013
2025
|
}
|
|
2014
2026
|
| BufferEncoding
|
|
2015
2027
|
| null
|
|
@@ -2025,6 +2037,7 @@ declare module 'fs' {
|
|
|
2025
2037
|
| {
|
|
2026
2038
|
encoding: 'buffer';
|
|
2027
2039
|
withFileTypes?: false | undefined;
|
|
2040
|
+
recursive?: boolean | undefined;
|
|
2028
2041
|
}
|
|
2029
2042
|
| 'buffer'
|
|
2030
2043
|
): Buffer[];
|
|
@@ -2038,6 +2051,7 @@ declare module 'fs' {
|
|
|
2038
2051
|
options?:
|
|
2039
2052
|
| (ObjectEncodingOptions & {
|
|
2040
2053
|
withFileTypes?: false | undefined;
|
|
2054
|
+
recursive?: boolean | undefined;
|
|
2041
2055
|
})
|
|
2042
2056
|
| BufferEncoding
|
|
2043
2057
|
| null
|
|
@@ -2051,6 +2065,7 @@ declare module 'fs' {
|
|
|
2051
2065
|
path: PathLike,
|
|
2052
2066
|
options: ObjectEncodingOptions & {
|
|
2053
2067
|
withFileTypes: true;
|
|
2068
|
+
recursive?: boolean | undefined;
|
|
2054
2069
|
}
|
|
2055
2070
|
): Dirent[];
|
|
2056
2071
|
/**
|
|
@@ -3850,6 +3865,9 @@ declare module 'fs' {
|
|
|
3850
3865
|
*/
|
|
3851
3866
|
export function readvSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
|
|
3852
3867
|
export interface OpenDirOptions {
|
|
3868
|
+
/**
|
|
3869
|
+
* @default 'utf8'
|
|
3870
|
+
*/
|
|
3853
3871
|
encoding?: BufferEncoding | undefined;
|
|
3854
3872
|
/**
|
|
3855
3873
|
* Number of directory entries that are buffered
|
|
@@ -3858,6 +3876,10 @@ declare module 'fs' {
|
|
|
3858
3876
|
* @default 32
|
|
3859
3877
|
*/
|
|
3860
3878
|
bufferSize?: number | undefined;
|
|
3879
|
+
/**
|
|
3880
|
+
* @default false
|
|
3881
|
+
*/
|
|
3882
|
+
recursive?: boolean;
|
|
3861
3883
|
}
|
|
3862
3884
|
/**
|
|
3863
3885
|
* Synchronously open a directory. See [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html).
|
|
@@ -3920,6 +3942,10 @@ declare module 'fs' {
|
|
|
3920
3942
|
* @default true
|
|
3921
3943
|
*/
|
|
3922
3944
|
force?: boolean;
|
|
3945
|
+
/**
|
|
3946
|
+
* Modifiers for copy operation. See `mode` flag of {@link copyFileSync()}
|
|
3947
|
+
*/
|
|
3948
|
+
mode?: number;
|
|
3923
3949
|
/**
|
|
3924
3950
|
* When `true` timestamps from `src` will
|
|
3925
3951
|
* be preserved.
|
node/http.d.ts
CHANGED
|
@@ -37,13 +37,14 @@
|
|
|
37
37
|
* 'Host', 'example.com',
|
|
38
38
|
* 'accepT', '*' ]
|
|
39
39
|
* ```
|
|
40
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
40
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/http.js)
|
|
41
41
|
*/
|
|
42
42
|
declare module 'http' {
|
|
43
43
|
import * as stream from 'node:stream';
|
|
44
44
|
import { URL } from 'node:url';
|
|
45
|
-
import { TcpSocketConnectOpts, Socket, Server as NetServer, LookupFunction } from 'node:net';
|
|
46
45
|
import { LookupOptions } from 'node:dns';
|
|
46
|
+
import { EventEmitter } from 'node:events';
|
|
47
|
+
import { TcpSocketConnectOpts, Socket, Server as NetServer, LookupFunction } from 'node:net';
|
|
47
48
|
// incoming headers will never contain number
|
|
48
49
|
interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
|
|
49
50
|
accept?: string | undefined;
|
|
@@ -184,6 +185,13 @@ declare module 'http' {
|
|
|
184
185
|
* @default 30000
|
|
185
186
|
*/
|
|
186
187
|
connectionsCheckingInterval?: number | undefined;
|
|
188
|
+
/**
|
|
189
|
+
* Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
|
|
190
|
+
* This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`.
|
|
191
|
+
* Default: @see stream.getDefaultHighWaterMark().
|
|
192
|
+
* @since v20.1.0
|
|
193
|
+
*/
|
|
194
|
+
highWaterMark?: number | undefined;
|
|
187
195
|
/**
|
|
188
196
|
* Use an insecure HTTP parser that accepts invalid HTTP headers when `true`.
|
|
189
197
|
* Using the insecure parser should be avoided.
|
|
@@ -1303,9 +1311,9 @@ declare module 'http' {
|
|
|
1303
1311
|
* ```
|
|
1304
1312
|
* @since v0.3.4
|
|
1305
1313
|
*/
|
|
1306
|
-
class Agent {
|
|
1314
|
+
class Agent extends EventEmitter {
|
|
1307
1315
|
/**
|
|
1308
|
-
* By default set to 256
|
|
1316
|
+
* By default set to 256. For agents with `keepAlive` enabled, this
|
|
1309
1317
|
* sets the maximum number of sockets that will be left open in the free
|
|
1310
1318
|
* state.
|
|
1311
1319
|
* @since v0.11.7
|
node/http2.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* const http2 = require('node:http2');
|
|
7
7
|
* ```
|
|
8
8
|
* @since v8.4.0
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/http2.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'http2' {
|
|
12
12
|
import EventEmitter = require('node:events');
|
node/https.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
|
|
3
3
|
* separate module.
|
|
4
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
4
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/https.js)
|
|
5
5
|
*/
|
|
6
6
|
declare module 'https' {
|
|
7
7
|
import { Duplex } from 'node:stream';
|
node/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for non-npm package Node.js 20.
|
|
1
|
+
// Type definitions for non-npm package Node.js 20.1
|
|
2
2
|
// Project: https://nodejs.org/
|
|
3
3
|
// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
|
|
4
4
|
// DefinitelyTyped <https://github.com/DefinitelyTyped>
|
node/inspector.d.ts
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* ```js
|
|
23
23
|
* import * as inspector from 'node:inspector';
|
|
24
24
|
* ```
|
|
25
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
25
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/inspector.js)
|
|
26
26
|
*/
|
|
27
27
|
declare module 'inspector' {
|
|
28
28
|
import EventEmitter = require('node:events');
|
node/net.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* ```js
|
|
11
11
|
* const net = require('node:net');
|
|
12
12
|
* ```
|
|
13
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
13
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/net.js)
|
|
14
14
|
*/
|
|
15
15
|
declare module 'net' {
|
|
16
16
|
import * as stream from 'node:stream';
|
node/os.d.ts
CHANGED
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.1.0",
|
|
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": "
|
|
235
|
+
"typesPublisherContentHash": "46c088277e9ada8db2c3c0efb4456e3995588c028063600e77389338cb57861b",
|
|
236
236
|
"typeScriptVersion": "4.3"
|
|
237
237
|
}
|
node/path.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare module 'path/win32' {
|
|
|
13
13
|
* ```js
|
|
14
14
|
* const path = require('node:path');
|
|
15
15
|
* ```
|
|
16
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
16
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/path.js)
|
|
17
17
|
*/
|
|
18
18
|
declare module 'path' {
|
|
19
19
|
namespace path {
|
node/perf_hooks.d.ts
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* performance.measure('A to B', 'A', 'B');
|
|
28
28
|
* });
|
|
29
29
|
* ```
|
|
30
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
30
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/perf_hooks.js)
|
|
31
31
|
*/
|
|
32
32
|
declare module 'perf_hooks' {
|
|
33
33
|
import { AsyncResource } from 'node:async_hooks';
|
node/punycode.d.ts
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* made available to developers as a convenience. Fixes or other modifications to
|
|
25
25
|
* the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
|
|
26
26
|
* @deprecated Since v7.0.0 - Deprecated
|
|
27
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
27
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/punycode.js)
|
|
28
28
|
*/
|
|
29
29
|
declare module 'punycode' {
|
|
30
30
|
/**
|
node/querystring.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* `querystring` is more performant than `URLSearchParams` but is not a
|
|
10
10
|
* standardized API. Use `URLSearchParams` when performance is not critical or
|
|
11
11
|
* when compatibility with browser code is desirable.
|
|
12
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
12
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/querystring.js)
|
|
13
13
|
*/
|
|
14
14
|
declare module 'querystring' {
|
|
15
15
|
interface StringifyOptions {
|
node/readline.d.ts
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
*
|
|
31
31
|
* Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be
|
|
32
32
|
* received on the `input` stream.
|
|
33
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
33
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/readline.js)
|
|
34
34
|
*/
|
|
35
35
|
declare module 'readline' {
|
|
36
36
|
import { Abortable, EventEmitter } from 'node:events';
|
node/repl.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* ```js
|
|
7
7
|
* const repl = require('node:repl');
|
|
8
8
|
* ```
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/repl.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'repl' {
|
|
12
12
|
import { Interface, Completer, AsyncCompleter } from 'node:readline';
|
node/stream.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* The `node:stream` module is useful for creating new types of stream instances.
|
|
16
16
|
* It is usually not necessary to use the `node:stream` module to consume streams.
|
|
17
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
17
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/stream.js)
|
|
18
18
|
*/
|
|
19
19
|
declare module 'stream' {
|
|
20
20
|
import { EventEmitter, Abortable } from 'node:events';
|
|
@@ -1131,6 +1131,20 @@ declare module 'stream' {
|
|
|
1131
1131
|
* @param stream a stream to attach a signal to
|
|
1132
1132
|
*/
|
|
1133
1133
|
function addAbortSignal<T extends Stream>(signal: AbortSignal, stream: T): T;
|
|
1134
|
+
/**
|
|
1135
|
+
* Returns the default highWaterMark used by streams.
|
|
1136
|
+
* Defaults to `16384` (16 KiB), or `16` for `objectMode`.
|
|
1137
|
+
* @since v19.9.0
|
|
1138
|
+
* @param objectMode
|
|
1139
|
+
*/
|
|
1140
|
+
function getDefaultHighWaterMark(objectMode: boolean): number;
|
|
1141
|
+
/**
|
|
1142
|
+
* Sets the default highWaterMark used by streams.
|
|
1143
|
+
* @since v19.9.0
|
|
1144
|
+
* @param objectMode
|
|
1145
|
+
* @param value highWaterMark value
|
|
1146
|
+
*/
|
|
1147
|
+
function setDefaultHighWaterMark(objectMode: boolean, value: number): void;
|
|
1134
1148
|
interface FinishedOptions extends Abortable {
|
|
1135
1149
|
error?: boolean | undefined;
|
|
1136
1150
|
readable?: boolean | undefined;
|
node/string_decoder.d.ts
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* decoder.write(Buffer.from([0x82]));
|
|
37
37
|
* console.log(decoder.end(Buffer.from([0xAC])));
|
|
38
38
|
* ```
|
|
39
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
39
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/string_decoder.js)
|
|
40
40
|
*/
|
|
41
41
|
declare module 'string_decoder' {
|
|
42
42
|
class StringDecoder {
|