@types/node 16.9.0 → 16.9.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 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: Wed, 08 Sep 2021 20:31:20 GMT
11
+ * Last updated: Sun, 19 Sep 2021 18:01:23 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
14
14
 
node/assert.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The `assert` module provides a set of assertion functions for verifying
3
3
  * invariants.
4
- * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/assert.js)
4
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/assert.js)
5
5
  */
6
6
  declare module 'assert' {
7
7
  /**
node/async_hooks.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * import async_hooks from 'async_hooks';
7
7
  * ```
8
8
  * @experimental
9
- * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/async_hooks.js)
9
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/async_hooks.js)
10
10
  */
11
11
  declare module 'async_hooks' {
12
12
  /**
node/buffer.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and
6
6
  * extends it with methods that cover additional use cases. Node.js APIs accept
7
- * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)s wherever `Buffer`s are supported as well.
7
+ * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well.
8
8
  *
9
9
  * While the `Buffer` class is available within the global scope, it is still
10
10
  * recommended to explicitly reference it via an import or require statement.
@@ -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/v16.7.0/lib/buffer.js)
44
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/buffer.js)
45
45
  */
46
46
  declare module 'buffer' {
47
47
  import { BinaryLike } from 'node:crypto';
@@ -137,7 +137,7 @@ declare module 'buffer' {
137
137
  */
138
138
  constructor(sources: Array<BinaryLike | Blob>, options?: BlobOptions);
139
139
  /**
140
- * Returns a promise that fulfills with an [&lt;ArrayBuffer&gt;](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
140
+ * Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
141
141
  * the `Blob` data.
142
142
  * @since v15.7.0
143
143
  */
node/child_process.d.ts CHANGED
@@ -60,7 +60,7 @@
60
60
  * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
61
61
  * the synchronous methods can have significant impact on performance due to
62
62
  * stalling the event loop while spawned processes complete.
63
- * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/child_process.js)
63
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/child_process.js)
64
64
  */
65
65
  declare module 'child_process' {
66
66
  import { ObjectEncodingOptions } from 'node:fs';
@@ -70,6 +70,14 @@ declare module 'child_process' {
70
70
  import { URL } from 'node:url';
71
71
  type Serializable = string | object | number | boolean | bigint;
72
72
  type SendHandle = net.Socket | net.Server;
73
+ /**
74
+ * Instances of the `ChildProcess` represent spawned child processes.
75
+ *
76
+ * Instances of `ChildProcess` are not intended to be created directly. Rather,
77
+ * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create
78
+ * instances of `ChildProcess`.
79
+ * @since v2.2.0
80
+ */
73
81
  class ChildProcess extends EventEmitter {
74
82
  /**
75
83
  * A `Writable Stream` that represents the child process's `stdin`.
@@ -236,8 +244,8 @@ declare module 'child_process' {
236
244
  readonly spawnfile: string;
237
245
  /**
238
246
  * The `subprocess.kill()` method sends a signal to the child process. If no
239
- * argument is given, the process will be sent the `'SIGTERM'` signal. See[`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function
240
- * returns `true` if[`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise.
247
+ * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function
248
+ * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise.
241
249
  *
242
250
  * ```js
243
251
  * const { spawn } = require('child_process');
@@ -799,7 +807,7 @@ declare module 'child_process' {
799
807
  /**
800
808
  * Spawns a shell then executes the `command` within that shell, buffering any
801
809
  * generated output. The `command` string passed to the exec function is processed
802
- * directly by the shell and special characters (vary based on[shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters))
810
+ * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters))
803
811
  * need to be dealt with accordingly:
804
812
  *
805
813
  * ```js
node/cluster.d.ts CHANGED
@@ -49,7 +49,7 @@
49
49
  * ```
50
50
  *
51
51
  * On Windows, it is not yet possible to set up a named pipe server in a worker.
52
- * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/cluster.js)
52
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/cluster.js)
53
53
  */
54
54
  declare module 'cluster' {
55
55
  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/v16.7.0/lib/console.js)
56
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/console.js)
57
57
  */
58
58
  declare module 'console' {
59
59
  import console = require('node:console');
node/crypto.d.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * // Prints:
14
14
  * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
15
15
  * ```
16
- * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/crypto.js)
16
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/crypto.js)
17
17
  */
18
18
  declare module 'crypto' {
19
19
  import * as stream from 'node:stream';
@@ -547,6 +547,26 @@ declare module 'crypto' {
547
547
  */
548
548
  class KeyObject {
549
549
  private constructor();
550
+ /**
551
+ * Example: Converting a `CryptoKey` instance to a `KeyObject`:
552
+ *
553
+ * ```js
554
+ * const { webcrypto, KeyObject } = await import('crypto');
555
+ * const { subtle } = webcrypto;
556
+ *
557
+ * const key = await subtle.generateKey({
558
+ * name: 'HMAC',
559
+ * hash: 'SHA-256',
560
+ * length: 256
561
+ * }, true, ['sign', 'verify']);
562
+ *
563
+ * const keyObject = KeyObject.from(key);
564
+ * console.log(keyObject.symmetricKeySize);
565
+ * // Prints: 32 (symmetric key size in bytes)
566
+ * ```
567
+ * @since v15.0.0
568
+ */
569
+ static from(key: webcrypto.CryptoKey): KeyObject;
550
570
  /**
551
571
  * For asymmetric keys, this property represents the type of the key. Supported key
552
572
  * types are:
@@ -656,7 +676,7 @@ declare module 'crypto' {
656
676
  * non-cryptographically secure hash algorithm allow passwords to be tested very
657
677
  * rapidly.
658
678
  *
659
- * In line with OpenSSL's recommendation to use a more modern algorithm instead of[`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that
679
+ * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that
660
680
  * developers derive a key and IV on
661
681
  * their own using {@link scrypt} and to use {@link createCipheriv} to create the `Cipher` object. Users should not use ciphers with counter mode
662
682
  * (e.g. CTR, GCM, or CCM) in `crypto.createCipher()`. A warning is emitted when
@@ -684,7 +704,7 @@ declare module 'crypto' {
684
704
  * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
685
705
  * display the available cipher algorithms.
686
706
  *
687
- * The `key` is the raw key used by the `algorithm` and `iv` is an[initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
707
+ * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
688
708
  * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
689
709
  * a `KeyObject` of type `secret`. If the cipher does not need
690
710
  * an initialization vector, `iv` may be `null`.
@@ -901,7 +921,7 @@ declare module 'crypto' {
901
921
  * non-cryptographically secure hash algorithm allow passwords to be tested very
902
922
  * rapidly.
903
923
  *
904
- * In line with OpenSSL's recommendation to use a more modern algorithm instead of[`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that
924
+ * In line with OpenSSL's recommendation to use a more modern algorithm instead of [`EVP_BytesToKey`](https://www.openssl.org/docs/man1.1.0/crypto/EVP_BytesToKey.html) it is recommended that
905
925
  * developers derive a key and IV on
906
926
  * their own using {@link scrypt} and to use {@link createDecipheriv} to create the `Decipher` object.
907
927
  * @since v0.1.94
@@ -925,7 +945,7 @@ declare module 'crypto' {
925
945
  * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
926
946
  * display the available cipher algorithms.
927
947
  *
928
- * The `key` is the raw key used by the `algorithm` and `iv` is an[initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
948
+ * The `key` is the raw key used by the `algorithm` and `iv` is an [initialization vector](https://en.wikipedia.org/wiki/Initialization_vector). Both arguments must be `'utf8'` encoded
929
949
  * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
930
950
  * a `KeyObject` of type `secret`. If the cipher does not need
931
951
  * an initialization vector, `iv` may be `null`.
@@ -1520,7 +1540,7 @@ declare module 'crypto' {
1520
1540
  }
1521
1541
  /**
1522
1542
  * Creates a predefined `DiffieHellmanGroup` key exchange object. The
1523
- * supported groups are: `'modp1'`, `'modp2'`, `'modp5'` (defined in[RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt), but see `Caveats`) and `'modp14'`, `'modp15'`,`'modp16'`, `'modp17'`,
1543
+ * supported groups are: `'modp1'`, `'modp2'`, `'modp5'` (defined in [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt), but see `Caveats`) and `'modp14'`, `'modp15'`,`'modp16'`, `'modp17'`,
1524
1544
  * `'modp18'` (defined in [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt)). The
1525
1545
  * returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing
1526
1546
  * the keys (with `diffieHellman.setPublicKey()`, for example). The
@@ -2205,7 +2225,7 @@ declare module 'crypto' {
2205
2225
  * This function is based on a constant-time algorithm.
2206
2226
  * Returns true if `a` is equal to `b`, without leaking timing information that
2207
2227
  * would allow an attacker to guess one of the values. This is suitable for
2208
- * comparing HMAC digests or secret values like authentication cookies or[capability urls](https://www.w3.org/TR/capability-urls/).
2228
+ * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/).
2209
2229
  *
2210
2230
  * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they
2211
2231
  * must have the same byte length.
@@ -2378,8 +2398,8 @@ declare module 'crypto' {
2378
2398
  privateKey: T2;
2379
2399
  }
2380
2400
  /**
2381
- * Generates a new asymmetric key pair of the given `type`. RSA, DSA, EC, Ed25519,
2382
- * Ed448, X25519, X448, and DH are currently supported.
2401
+ * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
2402
+ * Ed25519, Ed448, X25519, X448, and DH are currently supported.
2383
2403
  *
2384
2404
  * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
2385
2405
  * behaves as if `keyObject.export()` had been called on its result. Otherwise,
@@ -2459,8 +2479,8 @@ declare module 'crypto' {
2459
2479
  function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2460
2480
  function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2461
2481
  /**
2462
- * Generates a new asymmetric key pair of the given `type`. RSA, DSA, EC, Ed25519,
2463
- * Ed448, X25519, X448, and DH are currently supported.
2482
+ * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
2483
+ * Ed25519, Ed448, X25519, X448, and DH are currently supported.
2464
2484
  *
2465
2485
  * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
2466
2486
  * behaves as if `keyObject.export()` had been called on its result. Otherwise,
@@ -2495,7 +2515,7 @@ declare module 'crypto' {
2495
2515
  * If this method is invoked as its `util.promisify()` ed version, it returns
2496
2516
  * a `Promise` for an `Object` with `publicKey` and `privateKey` properties.
2497
2517
  * @since v10.12.0
2498
- * @param type Must be `'rsa'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
2518
+ * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
2499
2519
  */
2500
2520
  function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2501
2521
  function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
@@ -2876,7 +2896,7 @@ declare module 'crypto' {
2876
2896
  *
2877
2897
  * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an errors occurs while deriving the key, `err` will be set;
2878
2898
  * otherwise `err` will be `null`. The successfully generated `derivedKey` will
2879
- * be passed to the callback as an [&lt;ArrayBuffer&gt;](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any
2899
+ * be passed to the callback as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). An error will be thrown if any
2880
2900
  * of the input arguments specify invalid values or types.
2881
2901
  *
2882
2902
  * ```js
@@ -2903,7 +2923,7 @@ declare module 'crypto' {
2903
2923
  * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The
2904
2924
  * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of`keylen` bytes.
2905
2925
  *
2906
- * The successfully generated `derivedKey` will be returned as an [&lt;ArrayBuffer&gt;](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer).
2926
+ * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer).
2907
2927
  *
2908
2928
  * An error will be thrown if any of the input arguments specify invalid values or
2909
2929
  * types, or if the derived key cannot be generated.
@@ -3165,8 +3185,8 @@ declare module 'crypto' {
3165
3185
  * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
3166
3186
  *
3167
3187
  * By default, the prime is encoded as a big-endian sequence of octets
3168
- * in an [&lt;ArrayBuffer&gt;](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
3169
- * [&lt;bigint&gt;](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt)is provided.
3188
+ * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
3189
+ * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided.
3170
3190
  * @since v15.8.0
3171
3191
  * @param size The size (in bits) of the prime to generate.
3172
3192
  */
@@ -3196,8 +3216,8 @@ declare module 'crypto' {
3196
3216
  * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
3197
3217
  *
3198
3218
  * By default, the prime is encoded as a big-endian sequence of octets
3199
- * in an [&lt;ArrayBuffer&gt;](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
3200
- * [&lt;bigint&gt;](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt)is provided.
3219
+ * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
3220
+ * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided.
3201
3221
  * @since v15.8.0
3202
3222
  * @param size The size (in bits) of the prime to generate.
3203
3223
  */
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/v16.7.0/lib/dgram.js)
26
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/dgram.js)
27
27
  */
28
28
  declare module 'dgram' {
29
29
  import { AddressInfo } from 'node:net';
@@ -350,7 +350,7 @@ declare module 'dgram' {
350
350
  */
351
351
  setBroadcast(flag: boolean): void;
352
352
  /**
353
- * _All references to scope in this section are referring to[IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC
353
+ * _All references to scope in this section are referring to [IPv6 Zone Indices](https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses), which are defined by [RFC
354
354
  * 4007](https://tools.ietf.org/html/rfc4007). In string form, an IP_
355
355
  * _with a scope index is written as `'IP%scope'` where scope is an interface name_
356
356
  * _or interface number._
@@ -20,7 +20,7 @@
20
20
  * should generally include the module name to avoid collisions with data from
21
21
  * other modules.
22
22
  * @experimental
23
- * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/diagnostics_channel.js)
23
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/diagnostics_channel.js)
24
24
  */
25
25
  declare module 'diagnostics_channel' {
26
26
  /**
node/dns/promises.d.ts CHANGED
@@ -323,7 +323,7 @@ declare module 'dns/promises' {
323
323
  * The `dnsPromises.setServers()` method must not be called while a DNS query is in
324
324
  * progress.
325
325
  *
326
- * This method works much like[resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
326
+ * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
327
327
  * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
328
328
  * subsequent servers provided. Fallback DNS servers will only be used if the
329
329
  * earlier ones time out or result in some other error.
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/v16.7.0/lib/dns.js)
45
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/dns.js)
46
46
  */
47
47
  declare module 'dns' {
48
48
  import * as dnsPromises from 'node:dns/promises';
@@ -502,7 +502,7 @@ declare module 'dns' {
502
502
  *
503
503
  * The {@link setServers} method affects only {@link resolve},`dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}).
504
504
  *
505
- * This method works much like[resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
505
+ * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
506
506
  * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
507
507
  * subsequent servers provided. Fallback DNS servers will only be used if the
508
508
  * earlier ones time out or result in some other error.
node/domain.d.ts CHANGED
@@ -11,7 +11,7 @@
11
11
  * will be notified, rather than losing the context of the error in the`process.on('uncaughtException')` handler, or causing the program to
12
12
  * exit immediately with an error code.
13
13
  * @deprecated Since v1.4.2 - Deprecated
14
- * @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/domain.js)
14
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/domain.js)
15
15
  */
16
16
  declare module 'domain' {
17
17
  import EventEmitter = require('node:events');
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/v16.7.0/lib/events.js)
35
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/events.js)
36
36
  */
37
37
  declare module 'events' {
38
38
  interface EventEmitterOptions {
@@ -78,7 +78,7 @@ declare module 'events' {
78
78
  * The `Promise` will resolve with an array of all the arguments emitted to the
79
79
  * given event.
80
80
  *
81
- * This method is intentionally generic and works with the web platform[EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event
81
+ * This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event
82
82
  * semantics and does not listen to the `'error'` event.
83
83
  *
84
84
  * ```js
node/fs/promises.d.ts CHANGED
@@ -92,7 +92,7 @@ declare module 'fs/promises' {
92
92
  chmod(mode: Mode): Promise<void>;
93
93
  /**
94
94
  * Forces all currently queued I/O operations associated with the file to the
95
- * 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.
95
+ * 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.
96
96
  *
97
97
  * Unlike `filehandle.sync` this method does not flush modified metadata.
98
98
  * @since v10.0.0
@@ -220,7 +220,10 @@ declare module 'fs/promises' {
220
220
  */
221
221
  utimes(atime: string | number | Date, mtime: string | number | Date): Promise<void>;
222
222
  /**
223
- * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, or an object with an own `toString` function
223
+ * Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
224
+ * [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or
225
+ * [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object, or an
226
+ * object with an own `toString` function
224
227
  * property. The promise is resolved with no arguments upon success.
225
228
  *
226
229
  * If `options` is a string, then it specifies the `encoding`.
@@ -274,7 +277,7 @@ declare module 'fs/promises' {
274
277
  buffer: string;
275
278
  }>;
276
279
  /**
277
- * Write an array of [&lt;ArrayBufferView&gt;](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView)s to the file.
280
+ * Write an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s to the file.
278
281
  *
279
282
  * The promise is resolved with an object containing a two properties:
280
283
  *
@@ -290,7 +293,7 @@ declare module 'fs/promises' {
290
293
  */
291
294
  writev(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
292
295
  /**
293
- * Read from a file and write to an array of [&lt;ArrayBufferView&gt;](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView)s
296
+ * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s
294
297
  * @since v13.13.0, v12.17.0
295
298
  * @param position The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position.
296
299
  * @return Fulfills upon success an object containing two properties:
@@ -324,7 +327,7 @@ declare module 'fs/promises' {
324
327
  *
325
328
  * If the accessibility check is successful, the promise is resolved with no
326
329
  * value. If any of the accessibility checks fail, the promise is rejected
327
- * with an [&lt;Error&gt;](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and
330
+ * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and
328
331
  * written by the current process.
329
332
  *
330
333
  * ```js
@@ -391,7 +394,7 @@ declare module 'fs/promises' {
391
394
  *
392
395
  * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented
393
396
  * by [Naming Files, Paths, and Namespaces](https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file). Under NTFS, if the filename contains
394
- * 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).
397
+ * 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).
395
398
  * @since v10.0.0
396
399
  * @param [flags='r'] See `support of file system `flags``.
397
400
  * @param [mode=0o666] Sets the file mode (permission and sticky bits) if the file is created.
@@ -539,7 +542,7 @@ declare module 'fs/promises' {
539
542
  }
540
543
  ): Promise<Dirent[]>;
541
544
  /**
542
- * Reads the contents of the symbolic link referred to by `path`. See the POSIX[`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is
545
+ * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is
543
546
  * resolved with the`linkString` upon success.
544
547
  *
545
548
  * The optional `options` argument can be a string specifying an encoding, or an
@@ -611,7 +614,7 @@ declare module 'fs/promises' {
611
614
  ): Promise<BigIntStats>;
612
615
  function stat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
613
616
  /**
614
- * 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.
617
+ * 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.
615
618
  * @since v10.0.0
616
619
  * @return Fulfills with `undefined` upon success.
617
620
  */
@@ -619,7 +622,7 @@ declare module 'fs/promises' {
619
622
  /**
620
623
  * If `path` refers to a symbolic link, then the link is removed without affecting
621
624
  * the file or directory to which that link refers. If the `path` refers to a file
622
- * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html)documentation for more detail.
625
+ * path that is not a symbolic link, the file is deleted. See the POSIX [`unlink(2)`](http://man7.org/linux/man-pages/man2/unlink.2.html) documentation for more detail.
623
626
  * @since v10.0.0
624
627
  * @return Fulfills with `undefined` upon success.
625
628
  */
@@ -746,6 +749,8 @@ declare module 'fs/promises' {
746
749
  *
747
750
  * If `options` is a string, then it specifies the encoding.
748
751
  *
752
+ * The `mode` option only affects the newly created file. See `fs.open()` for more details.
753
+ *
749
754
  * Any specified `FileHandle` has to support writing.
750
755
  *
751
756
  * It is unsafe to use `fsPromises.writeFile()` multiple times on the same file
@@ -802,6 +807,8 @@ declare module 'fs/promises' {
802
807
  *
803
808
  * If `options` is a string, then it specifies the `encoding`.
804
809
  *
810
+ * The `mode` option only affects the newly created file. See `fs.open()` for more details.
811
+ *
805
812
  * The `path` may be specified as a `FileHandle` that has been opened
806
813
  * for appending (using `fsPromises.open()`).
807
814
  * @since v10.0.0
@@ -894,7 +901,7 @@ declare module 'fs/promises' {
894
901
  | null
895
902
  ): Promise<string | Buffer>;
896
903
  /**
897
- * Asynchronously open a directory for iterative scanning. See the POSIX[`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail.
904
+ * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail.
898
905
  *
899
906
  * Creates an `fs.Dir`, which contains all further functions for reading from
900
907
  * and cleaning up the directory.
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.7.0/lib/fs.js)
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';
@@ -1045,8 +1045,8 @@ declare module 'fs' {
1045
1045
  */
1046
1046
  export const lstatSync: StatSyncFn;
1047
1047
  /**
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 a
1049
- * possible
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
+ * a possible
1050
1050
  * exception are given to the completion callback.
1051
1051
  * @since v0.1.31
1052
1052
  */
@@ -1060,7 +1060,7 @@ declare module 'fs' {
1060
1060
  function __promisify__(existingPath: PathLike, newPath: PathLike): Promise<void>;
1061
1061
  }
1062
1062
  /**
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`.
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`.
1064
1064
  * @since v0.1.31
1065
1065
  */
1066
1066
  export function linkSync(existingPath: PathLike, newPath: PathLike): void;
@@ -1949,7 +1949,7 @@ declare module 'fs' {
1949
1949
  *
1950
1950
  * Some characters (`< > : " / \ | ? *`) are reserved under Windows as documented
1951
1951
  * 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).
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).
1953
1953
  *
1954
1954
  * Functions based on `fs.open()` exhibit this behavior as well:`fs.writeFile()`, `fs.readFile()`, etc.
1955
1955
  * @since v0.0.2
@@ -2510,6 +2510,8 @@ declare module 'fs' {
2510
2510
  *
2511
2511
  * The `encoding` option is ignored if `data` is a buffer.
2512
2512
  *
2513
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
2514
+ *
2513
2515
  * If `data` is a plain object, it must have an own (not inherited) `toString`function property.
2514
2516
  *
2515
2517
  * ```js
@@ -2590,6 +2592,8 @@ declare module 'fs' {
2590
2592
  *
2591
2593
  * If `data` is a plain object, it must have an own (not inherited) `toString`function property.
2592
2594
  *
2595
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
2596
+ *
2593
2597
  * For detailed information, see the documentation of the asynchronous version of
2594
2598
  * this API: {@link writeFile}.
2595
2599
  * @since v0.1.29
@@ -2600,6 +2604,8 @@ declare module 'fs' {
2600
2604
  * Asynchronously append data to a file, creating the file if it does not yet
2601
2605
  * exist. `data` can be a string or a `Buffer`.
2602
2606
  *
2607
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
2608
+ *
2603
2609
  * ```js
2604
2610
  * import { appendFile } from 'fs';
2605
2611
  *
@@ -2674,6 +2680,8 @@ declare module 'fs' {
2674
2680
  * Synchronously append data to a file, creating the file if it does not yet
2675
2681
  * exist. `data` can be a string or a `Buffer`.
2676
2682
  *
2683
+ * The `mode` option only affects the newly created file. See {@link open} for more details.
2684
+ *
2677
2685
  * ```js
2678
2686
  * import { appendFileSync } from 'fs';
2679
2687
  *
@@ -3433,7 +3441,7 @@ declare module 'fs' {
3433
3441
  export function createWriteStream(path: PathLike, options?: BufferEncoding | StreamOptions): WriteStream;
3434
3442
  /**
3435
3443
  * 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
3444
+ * 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
3445
  * than a possible
3438
3446
  * exception are given to the completion callback.
3439
3447
  * @since v0.1.96
@@ -3448,7 +3456,7 @@ declare module 'fs' {
3448
3456
  }
3449
3457
  /**
3450
3458
  * 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`.
3459
+ * 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
3460
  * @since v0.1.96
3453
3461
  */
3454
3462
  export function fdatasyncSync(fd: number): void;
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.7.0/lib/http.js)
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.7.0/lib/http2.js)
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.7.0/lib/https.js)
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.7.0/lib/inspector.js)
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