@types/node 16.9.2 → 16.9.6
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 +1 -1
- node/async_hooks.d.ts +1 -1
- node/buffer.d.ts +3 -3
- node/child_process.d.ts +30 -20
- node/cluster.d.ts +1 -1
- node/console.d.ts +1 -1
- node/crypto.d.ts +34 -18
- node/dgram.d.ts +2 -2
- node/diagnostics_channel.d.ts +1 -1
- node/dns/promises.d.ts +1 -1
- node/dns.d.ts +2 -2
- node/domain.d.ts +1 -1
- node/events.d.ts +2 -2
- node/fs/promises.d.ts +17 -10
- node/fs.d.ts +44 -21
- node/http.d.ts +1 -1
- node/http2.d.ts +2 -2
- node/https.d.ts +1 -1
- node/inspector.d.ts +2 -2
- node/net.d.ts +1 -1
- node/os.d.ts +5 -5
- node/package.json +2 -2
- node/path.d.ts +1 -1
- node/perf_hooks.d.ts +3 -3
- node/process.d.ts +3 -3
- node/punycode.d.ts +3 -3
- node/querystring.d.ts +9 -9
- node/readline.d.ts +1 -1
- node/repl.d.ts +1 -1
- node/stream.d.ts +12 -1
- node/string_decoder.d.ts +1 -1
- node/timers.d.ts +1 -1
- node/tls.d.ts +6 -6
- node/trace_events.d.ts +2 -2
- node/tty.d.ts +1 -1
- node/url.d.ts +1 -1
- node/util.d.ts +11 -12
- node/v8.d.ts +2 -2
- node/vm.d.ts +3 -4
- node/wasi.d.ts +9 -4
- node/worker_threads.d.ts +4 -4
- node/zlib.d.ts +1 -1
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/v16.
|
|
19
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/fs.js)
|
|
20
20
|
*/
|
|
21
21
|
declare module 'fs' {
|
|
22
22
|
import * as stream from 'node:stream';
|
|
@@ -904,42 +904,42 @@ declare module 'fs' {
|
|
|
904
904
|
): Promise<BigIntStats>;
|
|
905
905
|
function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
|
|
906
906
|
}
|
|
907
|
-
export interface StatSyncFn
|
|
908
|
-
(path:
|
|
907
|
+
export interface StatSyncFn extends Function {
|
|
908
|
+
(path: PathLike, options?: undefined): Stats;
|
|
909
909
|
(
|
|
910
|
-
path:
|
|
911
|
-
options?:
|
|
910
|
+
path: PathLike,
|
|
911
|
+
options?: StatSyncOptions & {
|
|
912
912
|
bigint?: false | undefined;
|
|
913
913
|
throwIfNoEntry: false;
|
|
914
914
|
}
|
|
915
915
|
): Stats | undefined;
|
|
916
916
|
(
|
|
917
|
-
path:
|
|
918
|
-
options:
|
|
917
|
+
path: PathLike,
|
|
918
|
+
options: StatSyncOptions & {
|
|
919
919
|
bigint: true;
|
|
920
920
|
throwIfNoEntry: false;
|
|
921
921
|
}
|
|
922
922
|
): BigIntStats | undefined;
|
|
923
923
|
(
|
|
924
|
-
path:
|
|
925
|
-
options?:
|
|
924
|
+
path: PathLike,
|
|
925
|
+
options?: StatSyncOptions & {
|
|
926
926
|
bigint?: false | undefined;
|
|
927
927
|
}
|
|
928
928
|
): Stats;
|
|
929
929
|
(
|
|
930
|
-
path:
|
|
931
|
-
options:
|
|
930
|
+
path: PathLike,
|
|
931
|
+
options: StatSyncOptions & {
|
|
932
932
|
bigint: true;
|
|
933
933
|
}
|
|
934
934
|
): BigIntStats;
|
|
935
935
|
(
|
|
936
|
-
path:
|
|
937
|
-
options:
|
|
936
|
+
path: PathLike,
|
|
937
|
+
options: StatSyncOptions & {
|
|
938
938
|
bigint: boolean;
|
|
939
939
|
throwIfNoEntry?: false | undefined;
|
|
940
940
|
}
|
|
941
941
|
): Stats | BigIntStats;
|
|
942
|
-
(path:
|
|
942
|
+
(path: PathLike, options?: StatSyncOptions): Stats | BigIntStats | undefined;
|
|
943
943
|
}
|
|
944
944
|
/**
|
|
945
945
|
* Synchronous stat(2) - Get file status.
|
|
@@ -993,7 +993,20 @@ declare module 'fs' {
|
|
|
993
993
|
* Synchronous fstat(2) - Get file status.
|
|
994
994
|
* @param fd A file descriptor.
|
|
995
995
|
*/
|
|
996
|
-
export
|
|
996
|
+
export function fstatSync(
|
|
997
|
+
fd: number,
|
|
998
|
+
options?: StatOptions & {
|
|
999
|
+
bigint?: false | undefined;
|
|
1000
|
+
}
|
|
1001
|
+
): Stats;
|
|
1002
|
+
export function fstatSync(
|
|
1003
|
+
fd: number,
|
|
1004
|
+
options: StatOptions & {
|
|
1005
|
+
bigint: true;
|
|
1006
|
+
}
|
|
1007
|
+
): BigIntStats;
|
|
1008
|
+
export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
|
|
1009
|
+
|
|
997
1010
|
/**
|
|
998
1011
|
* Retrieves the `fs.Stats` for the symbolic link referred to by the path.
|
|
999
1012
|
* The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic
|
|
@@ -1045,8 +1058,8 @@ declare module 'fs' {
|
|
|
1045
1058
|
*/
|
|
1046
1059
|
export const lstatSync: StatSyncFn;
|
|
1047
1060
|
/**
|
|
1048
|
-
* Creates a new link from the `existingPath` to the `newPath`. See the POSIX[`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than
|
|
1049
|
-
* possible
|
|
1061
|
+
* Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. No arguments other than
|
|
1062
|
+
* a possible
|
|
1050
1063
|
* exception are given to the completion callback.
|
|
1051
1064
|
* @since v0.1.31
|
|
1052
1065
|
*/
|
|
@@ -1060,7 +1073,7 @@ declare module 'fs' {
|
|
|
1060
1073
|
function __promisify__(existingPath: PathLike, newPath: PathLike): Promise<void>;
|
|
1061
1074
|
}
|
|
1062
1075
|
/**
|
|
1063
|
-
* Creates a new link from the `existingPath` to the `newPath`. See the POSIX[`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`.
|
|
1076
|
+
* Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail. Returns `undefined`.
|
|
1064
1077
|
* @since v0.1.31
|
|
1065
1078
|
*/
|
|
1066
1079
|
export function linkSync(existingPath: PathLike, newPath: PathLike): void;
|
|
@@ -1949,7 +1962,7 @@ declare module 'fs' {
|
|
|
1949
1962
|
*
|
|
1950
1963
|
* Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented
|
|
1951
1964
|
* by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains
|
|
1952
|
-
* a colon, Node.js will open a file system stream, as described by[this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams).
|
|
1965
|
+
* a colon, Node.js will open a file system stream, as described by [this MSDN page](https://docs.microsoft.com/en-us/windows/desktop/FileIO/using-streams).
|
|
1953
1966
|
*
|
|
1954
1967
|
* Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc.
|
|
1955
1968
|
* @since v0.0.2
|
|
@@ -2510,6 +2523,8 @@ declare module 'fs' {
|
|
|
2510
2523
|
*
|
|
2511
2524
|
* The `encoding` option is ignored if `data` is a buffer.
|
|
2512
2525
|
*
|
|
2526
|
+
* The `mode` option only affects the newly created file. See {@link open} for more details.
|
|
2527
|
+
*
|
|
2513
2528
|
* If `data` is a plain object, it must have an own (not inherited) `toString`function property.
|
|
2514
2529
|
*
|
|
2515
2530
|
* ```js
|
|
@@ -2590,6 +2605,8 @@ declare module 'fs' {
|
|
|
2590
2605
|
*
|
|
2591
2606
|
* If `data` is a plain object, it must have an own (not inherited) `toString`function property.
|
|
2592
2607
|
*
|
|
2608
|
+
* The `mode` option only affects the newly created file. See {@link open} for more details.
|
|
2609
|
+
*
|
|
2593
2610
|
* For detailed information, see the documentation of the asynchronous version of
|
|
2594
2611
|
* this API: {@link writeFile}.
|
|
2595
2612
|
* @since v0.1.29
|
|
@@ -2600,6 +2617,8 @@ declare module 'fs' {
|
|
|
2600
2617
|
* Asynchronously append data to a file, creating the file if it does not yet
|
|
2601
2618
|
* exist. `data` can be a string or a `Buffer`.
|
|
2602
2619
|
*
|
|
2620
|
+
* The `mode` option only affects the newly created file. See {@link open} for more details.
|
|
2621
|
+
*
|
|
2603
2622
|
* ```js
|
|
2604
2623
|
* import { appendFile } from 'fs';
|
|
2605
2624
|
*
|
|
@@ -2674,6 +2693,8 @@ declare module 'fs' {
|
|
|
2674
2693
|
* Synchronously append data to a file, creating the file if it does not yet
|
|
2675
2694
|
* exist. `data` can be a string or a `Buffer`.
|
|
2676
2695
|
*
|
|
2696
|
+
* The `mode` option only affects the newly created file. See {@link open} for more details.
|
|
2697
|
+
*
|
|
2677
2698
|
* ```js
|
|
2678
2699
|
* import { appendFileSync } from 'fs';
|
|
2679
2700
|
*
|
|
@@ -3433,7 +3454,7 @@ declare module 'fs' {
|
|
|
3433
3454
|
export function createWriteStream(path: PathLike, options?: BufferEncoding | StreamOptions): WriteStream;
|
|
3434
3455
|
/**
|
|
3435
3456
|
* Forces all currently queued I/O operations associated with the file to the
|
|
3436
|
-
* 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
|
|
3457
|
+
* 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
|
|
3437
3458
|
* than a possible
|
|
3438
3459
|
* exception are given to the completion callback.
|
|
3439
3460
|
* @since v0.1.96
|
|
@@ -3448,7 +3469,7 @@ declare module 'fs' {
|
|
|
3448
3469
|
}
|
|
3449
3470
|
/**
|
|
3450
3471
|
* Forces all currently queued I/O operations associated with the file to the
|
|
3451
|
-
* 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. Returns `undefined`.
|
|
3472
|
+
* 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. Returns `undefined`.
|
|
3452
3473
|
* @since v0.1.96
|
|
3453
3474
|
*/
|
|
3454
3475
|
export function fdatasyncSync(fd: number): void;
|
|
@@ -3654,6 +3675,8 @@ declare module 'fs' {
|
|
|
3654
3675
|
}
|
|
3655
3676
|
export interface StatOptions {
|
|
3656
3677
|
bigint?: boolean | undefined;
|
|
3678
|
+
}
|
|
3679
|
+
export interface StatSyncOptions extends StatOptions {
|
|
3657
3680
|
throwIfNoEntry?: boolean | undefined;
|
|
3658
3681
|
}
|
|
3659
3682
|
export interface CopyOptions {
|
node/http.d.ts
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
* 'Host', 'mysite.com',
|
|
38
38
|
* 'accepT', '*' ]
|
|
39
39
|
* ```
|
|
40
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
40
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/http.js)
|
|
41
41
|
*/
|
|
42
42
|
declare module 'http' {
|
|
43
43
|
import * as stream from 'node:stream';
|
node/http2.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* const http2 = require('http2');
|
|
7
7
|
* ```
|
|
8
8
|
* @since v8.4.0
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/http2.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'http2' {
|
|
12
12
|
import EventEmitter = require('node:events');
|
|
@@ -2014,7 +2014,7 @@ declare module 'http2' {
|
|
|
2014
2014
|
/**
|
|
2015
2015
|
* Returns a `net.Server` instance that creates and manages `Http2Session`instances.
|
|
2016
2016
|
*
|
|
2017
|
-
* Since there are no browsers known that support[unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when
|
|
2017
|
+
* Since there are no browsers known that support [unencrypted HTTP/2](https://http2.github.io/faq/#does-http2-require-encryption), the use of {@link createSecureServer} is necessary when
|
|
2018
2018
|
* communicating
|
|
2019
2019
|
* with browser clients.
|
|
2020
2020
|
*
|
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/v16.
|
|
4
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/https.js)
|
|
5
5
|
*/
|
|
6
6
|
declare module 'https' {
|
|
7
7
|
import { Duplex } from 'node:stream';
|
node/inspector.d.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* ```js
|
|
16
16
|
* const inspector = require('inspector');
|
|
17
17
|
* ```
|
|
18
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
18
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/inspector.js)
|
|
19
19
|
*/
|
|
20
20
|
declare module 'inspector' {
|
|
21
21
|
import EventEmitter = require('node:events');
|
|
@@ -1797,7 +1797,7 @@ declare module 'inspector' {
|
|
|
1797
1797
|
* // Output: { type: 'number', value: 4, description: '4' }
|
|
1798
1798
|
* ```
|
|
1799
1799
|
*
|
|
1800
|
-
* The latest version of the V8 inspector protocol is published on the[Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/).
|
|
1800
|
+
* The latest version of the V8 inspector protocol is published on the [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/v8/).
|
|
1801
1801
|
*
|
|
1802
1802
|
* Node.js inspector supports all the Chrome DevTools Protocol domains declared
|
|
1803
1803
|
* by V8\. Chrome DevTools Protocol domain provides an interface for interacting
|
node/net.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* ```js
|
|
11
11
|
* const net = require('net');
|
|
12
12
|
* ```
|
|
13
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
13
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/net.js)
|
|
14
14
|
*/
|
|
15
15
|
declare module 'net' {
|
|
16
16
|
import * as stream from 'node:stream';
|
node/os.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* ```js
|
|
6
6
|
* const os = require('os');
|
|
7
7
|
* ```
|
|
8
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
8
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/os.js)
|
|
9
9
|
*/
|
|
10
10
|
declare module 'os' {
|
|
11
11
|
interface CpuInfo {
|
|
@@ -143,8 +143,8 @@ declare module 'os' {
|
|
|
143
143
|
/**
|
|
144
144
|
* Returns the operating system as a string.
|
|
145
145
|
*
|
|
146
|
-
* On POSIX systems, the operating system release is determined by calling[`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used.
|
|
147
|
-
*
|
|
146
|
+
* On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `GetVersionExW()` is used. See
|
|
147
|
+
* [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
|
|
148
148
|
* @since v0.3.3
|
|
149
149
|
*/
|
|
150
150
|
function release(): string;
|
|
@@ -396,8 +396,8 @@ declare module 'os' {
|
|
|
396
396
|
/**
|
|
397
397
|
* Returns a string identifying the kernel version.
|
|
398
398
|
*
|
|
399
|
-
* On POSIX systems, the operating system release is determined by calling[`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
|
|
400
|
-
* available, `GetVersionExW()` will be used. See[https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
|
|
399
|
+
* On POSIX systems, the operating system release is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
|
|
400
|
+
* available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
|
|
401
401
|
* @since v13.11.0, v12.17.0
|
|
402
402
|
*/
|
|
403
403
|
function version(): string;
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "16.9.
|
|
3
|
+
"version": "16.9.6",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -230,6 +230,6 @@
|
|
|
230
230
|
},
|
|
231
231
|
"scripts": {},
|
|
232
232
|
"dependencies": {},
|
|
233
|
-
"typesPublisherContentHash": "
|
|
233
|
+
"typesPublisherContentHash": "c4662ea2cb063daa42b8d823f2e21b1763849312ccfc39f1c758b1540b16ebd8",
|
|
234
234
|
"typeScriptVersion": "3.7"
|
|
235
235
|
}
|
node/path.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare module 'path/win32' {
|
|
|
13
13
|
* ```js
|
|
14
14
|
* const path = require('path');
|
|
15
15
|
* ```
|
|
16
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
16
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/path.js)
|
|
17
17
|
*/
|
|
18
18
|
declare module 'path' {
|
|
19
19
|
namespace path {
|
node/perf_hooks.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This module provides an implementation of a subset of the W3C[Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for
|
|
2
|
+
* This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for
|
|
3
3
|
* Node.js-specific performance measurements.
|
|
4
4
|
*
|
|
5
5
|
* Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/):
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* performance.measure('A to B', 'A', 'B');
|
|
27
27
|
* });
|
|
28
28
|
* ```
|
|
29
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
29
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/perf_hooks.js)
|
|
30
30
|
*/
|
|
31
31
|
declare module 'perf_hooks' {
|
|
32
32
|
import { AsyncResource } from 'node:async_hooks';
|
|
@@ -84,7 +84,7 @@ declare module 'perf_hooks' {
|
|
|
84
84
|
* Additional detail specific to the `entryType`.
|
|
85
85
|
* @since v16.0.0
|
|
86
86
|
*/
|
|
87
|
-
readonly
|
|
87
|
+
readonly detail?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type.
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
90
|
* _This property is an extension by Node.js. It is not available in Web browsers._
|
node/process.d.ts
CHANGED
|
@@ -639,7 +639,7 @@ declare module 'process' {
|
|
|
639
639
|
*/
|
|
640
640
|
getgid(): number;
|
|
641
641
|
/**
|
|
642
|
-
* The `process.setgid()` method sets the group identity of the process. (See[`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a
|
|
642
|
+
* The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a
|
|
643
643
|
* numeric ID or a group name
|
|
644
644
|
* string. If a group name is specified, this method blocks while resolving the
|
|
645
645
|
* associated numeric ID.
|
|
@@ -683,7 +683,7 @@ declare module 'process' {
|
|
|
683
683
|
*/
|
|
684
684
|
getuid(): number;
|
|
685
685
|
/**
|
|
686
|
-
* The `process.setuid(id)` method sets the user identity of the process. (See[`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a
|
|
686
|
+
* The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a
|
|
687
687
|
* numeric ID or a username string.
|
|
688
688
|
* If a username is specified, the method blocks while resolving the associated
|
|
689
689
|
* numeric ID.
|
|
@@ -1067,7 +1067,7 @@ declare module 'process' {
|
|
|
1067
1067
|
* ```
|
|
1068
1068
|
*
|
|
1069
1069
|
* The value `'android'` may also be returned if the Node.js is built on the
|
|
1070
|
-
* Android operating system. However, Android support in Node.js[is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
|
|
1070
|
+
* Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
|
|
1071
1071
|
* @since v0.1.16
|
|
1072
1072
|
*/
|
|
1073
1073
|
readonly platform: Platform;
|
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/v16.
|
|
27
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/punycode.js)
|
|
28
28
|
*/
|
|
29
29
|
declare module 'punycode' {
|
|
30
30
|
/**
|
|
@@ -39,7 +39,7 @@ declare module 'punycode' {
|
|
|
39
39
|
*/
|
|
40
40
|
function decode(string: string): string;
|
|
41
41
|
/**
|
|
42
|
-
* The `punycode.encode()` method converts a string of Unicode codepoints to a[Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters.
|
|
42
|
+
* The `punycode.encode()` method converts a string of Unicode codepoints to a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only characters.
|
|
43
43
|
*
|
|
44
44
|
* ```js
|
|
45
45
|
* punycode.encode('mañana'); // 'maana-pta'
|
|
@@ -50,7 +50,7 @@ declare module 'punycode' {
|
|
|
50
50
|
function encode(string: string): string;
|
|
51
51
|
/**
|
|
52
52
|
* The `punycode.toUnicode()` method converts a string representing a domain name
|
|
53
|
-
* containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492)encoded parts of the domain name are be
|
|
53
|
+
* containing [Punycode](https://tools.ietf.org/html/rfc3492) encoded characters into Unicode. Only the [Punycode](https://tools.ietf.org/html/rfc3492) encoded parts of the domain name are be
|
|
54
54
|
* converted.
|
|
55
55
|
*
|
|
56
56
|
* ```js
|
node/querystring.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* The `querystring` API is considered Legacy. While it is still maintained,
|
|
10
10
|
* new code should use the `URLSearchParams` API instead.
|
|
11
11
|
* @deprecated Legacy
|
|
12
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
12
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/querystring.js)
|
|
13
13
|
*/
|
|
14
14
|
declare module 'querystring' {
|
|
15
15
|
interface StringifyOptions {
|
|
@@ -25,14 +25,14 @@ declare module 'querystring' {
|
|
|
25
25
|
* The `querystring.stringify()` method produces a URL query string from a
|
|
26
26
|
* given `obj` by iterating through the object's "own properties".
|
|
27
27
|
*
|
|
28
|
-
* It serializes the following types of values passed in `obj`:[
|
|
29
|
-
* [
|
|
30
|
-
* [
|
|
31
|
-
* [
|
|
32
|
-
* [
|
|
33
|
-
* [
|
|
34
|
-
* [
|
|
35
|
-
* [
|
|
28
|
+
* It serializes the following types of values passed in `obj`:[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
|
|
29
|
+
* [number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
|
|
30
|
+
* [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
|
|
31
|
+
* [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) |
|
|
32
|
+
* [string\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) |
|
|
33
|
+
* [number\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) |
|
|
34
|
+
* [bigint\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) |
|
|
35
|
+
* [boolean\[\]](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) The numeric values must be finite. Any other input values will be coerced to
|
|
36
36
|
* empty strings.
|
|
37
37
|
*
|
|
38
38
|
* ```js
|
node/readline.d.ts
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
*
|
|
27
27
|
* 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
|
|
28
28
|
* received on the `input` stream.
|
|
29
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
29
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/readline.js)
|
|
30
30
|
*/
|
|
31
31
|
declare module 'readline' {
|
|
32
32
|
import { Abortable, EventEmitter } from 'node:events';
|
node/repl.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* ```js
|
|
7
7
|
* const repl = require('repl');
|
|
8
8
|
* ```
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.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 `stream` module is useful for creating new types of stream instances. It is
|
|
16
16
|
* usually not necessary to use the `stream` module to consume streams.
|
|
17
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
17
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/stream.js)
|
|
18
18
|
*/
|
|
19
19
|
declare module 'stream' {
|
|
20
20
|
import { EventEmitter, Abortable } from 'node:events';
|
|
@@ -60,6 +60,7 @@ declare module 'stream' {
|
|
|
60
60
|
/**
|
|
61
61
|
* Returns whether the stream was destroyed or errored before emitting `'end'`.
|
|
62
62
|
* @since v16.8.0
|
|
63
|
+
* @experimental
|
|
63
64
|
*/
|
|
64
65
|
readonly readableAborted: boolean;
|
|
65
66
|
/**
|
|
@@ -71,6 +72,7 @@ declare module 'stream' {
|
|
|
71
72
|
/**
|
|
72
73
|
* Returns whether `'data'` has been emitted.
|
|
73
74
|
* @since v16.7.0
|
|
75
|
+
* @experimental
|
|
74
76
|
*/
|
|
75
77
|
readonly readableDidRead: boolean;
|
|
76
78
|
/**
|
|
@@ -805,6 +807,15 @@ declare module 'stream' {
|
|
|
805
807
|
readonly writableLength: number;
|
|
806
808
|
readonly writableObjectMode: boolean;
|
|
807
809
|
readonly writableCorked: number;
|
|
810
|
+
/**
|
|
811
|
+
* If `false` then the stream will automatically end the writable side when the
|
|
812
|
+
* readable side ends. Set initially by the `allowHalfOpen` constructor option,
|
|
813
|
+
* which defaults to `false`.
|
|
814
|
+
*
|
|
815
|
+
* This can be changed manually to change the half-open behavior of an existing`Duplex` stream instance, but must be changed before the `'end'` event is
|
|
816
|
+
* emitted.
|
|
817
|
+
* @since v0.9.4
|
|
818
|
+
*/
|
|
808
819
|
allowHalfOpen: boolean;
|
|
809
820
|
constructor(opts?: DuplexOptions);
|
|
810
821
|
/**
|
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/v16.
|
|
39
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/string_decoder.js)
|
|
40
40
|
*/
|
|
41
41
|
declare module 'string_decoder' {
|
|
42
42
|
class StringDecoder {
|
node/timers.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* The timer functions within Node.js implement a similar API as the timers API
|
|
7
7
|
* provided by Web Browsers but use a different internal implementation that is
|
|
8
8
|
* built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/timers.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'timers' {
|
|
12
12
|
import { Abortable } from 'node:events';
|
node/tls.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* ```js
|
|
7
7
|
* const tls = require('tls');
|
|
8
8
|
* ```
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/tls.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'tls' {
|
|
12
12
|
import { X509Certificate } from 'node:crypto';
|
|
@@ -189,7 +189,7 @@ declare module 'tls' {
|
|
|
189
189
|
* }
|
|
190
190
|
* ```
|
|
191
191
|
*
|
|
192
|
-
* See[SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html)for more information.
|
|
192
|
+
* See [SSL\_CIPHER\_get\_name](https://www.openssl.org/docs/man1.1.1/man3/SSL_CIPHER_get_name.html) for more information.
|
|
193
193
|
* @since v0.11.4
|
|
194
194
|
*/
|
|
195
195
|
getCipher(): CipherNameAndProtocol;
|
|
@@ -274,7 +274,7 @@ declare module 'tls' {
|
|
|
274
274
|
*/
|
|
275
275
|
getSession(): Buffer | undefined;
|
|
276
276
|
/**
|
|
277
|
-
* See[SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html)for more information.
|
|
277
|
+
* See [SSL\_get\_shared\_sigalgs](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_shared_sigalgs.html) for more information.
|
|
278
278
|
* @since v12.11.0
|
|
279
279
|
* @return List of signature algorithms shared between the server and the client in the order of decreasing preference.
|
|
280
280
|
*/
|
|
@@ -810,8 +810,8 @@ declare module 'tls' {
|
|
|
810
810
|
/**
|
|
811
811
|
* Verifies the certificate `cert` is issued to `hostname`.
|
|
812
812
|
*
|
|
813
|
-
* Returns [
|
|
814
|
-
* failure. On success, returns [
|
|
813
|
+
* Returns [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object, populating it with `reason`, `host`, and `cert` on
|
|
814
|
+
* failure. On success, returns [undefined](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Undefined_type).
|
|
815
815
|
*
|
|
816
816
|
* This function can be overwritten by providing alternative function as part of
|
|
817
817
|
* the `options.checkServerIdentity` option passed to `tls.connect()`. The
|
|
@@ -962,7 +962,7 @@ declare module 'tls' {
|
|
|
962
962
|
*
|
|
963
963
|
* A key is _required_ for ciphers that use certificates. Either `key` or`pfx` can be used to provide it.
|
|
964
964
|
*
|
|
965
|
-
* If the `ca` option is not given, then Node.js will default to using[Mozilla's publicly trusted list of
|
|
965
|
+
* If the `ca` option is not given, then Node.js will default to using [Mozilla's publicly trusted list of
|
|
966
966
|
* CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt).
|
|
967
967
|
* @since v0.11.13
|
|
968
968
|
*/
|
node/trace_events.d.ts
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
* ```
|
|
57
57
|
*
|
|
58
58
|
* Running Node.js with tracing enabled will produce log files that can be opened
|
|
59
|
-
* in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool)tab of Chrome.
|
|
59
|
+
* in the [`chrome://tracing`](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) tab of Chrome.
|
|
60
60
|
*
|
|
61
61
|
* The logging file is by default called `node_trace.${rotation}.log`, where`${rotation}` is an incrementing log-rotation id. The filepath pattern can
|
|
62
62
|
* be specified with `--trace-event-file-pattern` that accepts a template
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
*
|
|
74
74
|
* The features from this module are not available in `Worker` threads.
|
|
75
75
|
* @experimental
|
|
76
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
76
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/trace_events.js)
|
|
77
77
|
*/
|
|
78
78
|
declare module 'trace_events' {
|
|
79
79
|
/**
|
node/tty.d.ts
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* In most cases, there should be little to no reason for an application to
|
|
24
24
|
* manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes.
|
|
25
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
25
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/tty.js)
|
|
26
26
|
*/
|
|
27
27
|
declare module 'tty' {
|
|
28
28
|
import * as net from 'node:net';
|
node/url.d.ts
CHANGED