@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 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: Thu, 16 Sep 2021 21:31:22 GMT
11
+ * Last updated: Tue, 21 Sep 2021 19:02:14 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
@@ -1271,12 +1279,13 @@ declare module 'child_process' {
1271
1279
  * @param args List of string arguments.
1272
1280
  */
1273
1281
  function spawnSync(command: string): SpawnSyncReturns<Buffer>;
1274
- function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
1275
- function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
1276
- function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
1277
- function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
1278
- function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
1279
- function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
1282
+ function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
1283
+ function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
1284
+ function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
1285
+ function spawnSync(command: string, args: ReadonlyArray<string>): SpawnSyncReturns<Buffer>;
1286
+ function spawnSync(command: string, args: ReadonlyArray<string>, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
1287
+ function spawnSync(command: string, args: ReadonlyArray<string>, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
1288
+ function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
1280
1289
  interface CommonExecOptions extends CommonOptions {
1281
1290
  input?: string | NodeJS.ArrayBufferView | undefined;
1282
1291
  stdio?: StdioOptions | undefined;
@@ -1310,9 +1319,9 @@ declare module 'child_process' {
1310
1319
  * @return The stdout from the command.
1311
1320
  */
1312
1321
  function execSync(command: string): Buffer;
1313
- function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string;
1314
- function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer;
1315
- function execSync(command: string, options?: ExecSyncOptions): Buffer;
1322
+ function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
1323
+ function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer;
1324
+ function execSync(command: string, options?: ExecSyncOptions): string | Buffer;
1316
1325
  interface ExecFileSyncOptions extends CommonExecOptions {
1317
1326
  shell?: boolean | string | undefined;
1318
1327
  }
@@ -1320,7 +1329,7 @@ declare module 'child_process' {
1320
1329
  encoding: BufferEncoding;
1321
1330
  }
1322
1331
  interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
1323
- encoding: BufferEncoding; // specify `null`.
1332
+ encoding?: 'buffer' | null; // specify `null`.
1324
1333
  }
1325
1334
  /**
1326
1335
  * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not
@@ -1343,12 +1352,13 @@ declare module 'child_process' {
1343
1352
  * @return The stdout from the command.
1344
1353
  */
1345
1354
  function execFileSync(file: string): Buffer;
1346
- function execFileSync(file: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
1347
- function execFileSync(file: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
1348
- function execFileSync(file: string, options?: ExecFileSyncOptions): Buffer;
1349
- function execFileSync(file: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithStringEncoding): string;
1350
- function execFileSync(file: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
1351
- function execFileSync(file: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): Buffer;
1355
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string;
1356
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
1357
+ function execFileSync(file: string, options?: ExecFileSyncOptions): string | Buffer;
1358
+ function execFileSync(file: string, args: ReadonlyArray<string>): Buffer;
1359
+ function execFileSync(file: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithStringEncoding): string;
1360
+ function execFileSync(file: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
1361
+ function execFileSync(file: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): string | Buffer;
1352
1362
  }
1353
1363
  declare module 'node:child_process' {
1354
1364
  export * from 'child_process';
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';
@@ -548,6 +548,22 @@ declare module 'crypto' {
548
548
  class KeyObject {
549
549
  private constructor();
550
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
+ * ```
551
567
  * @since v15.0.0
552
568
  */
553
569
  static from(key: webcrypto.CryptoKey): KeyObject;
@@ -660,7 +676,7 @@ declare module 'crypto' {
660
676
  * non-cryptographically secure hash algorithm allow passwords to be tested very
661
677
  * rapidly.
662
678
  *
663
- * 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
664
680
  * developers derive a key and IV on
665
681
  * their own using {@link scrypt} and to use {@link createCipheriv} to create the `Cipher` object. Users should not use ciphers with counter mode
666
682
  * (e.g. CTR, GCM, or CCM) in `crypto.createCipher()`. A warning is emitted when
@@ -688,7 +704,7 @@ declare module 'crypto' {
688
704
  * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
689
705
  * display the available cipher algorithms.
690
706
  *
691
- * 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
692
708
  * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
693
709
  * a `KeyObject` of type `secret`. If the cipher does not need
694
710
  * an initialization vector, `iv` may be `null`.
@@ -905,7 +921,7 @@ declare module 'crypto' {
905
921
  * non-cryptographically secure hash algorithm allow passwords to be tested very
906
922
  * rapidly.
907
923
  *
908
- * 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
909
925
  * developers derive a key and IV on
910
926
  * their own using {@link scrypt} and to use {@link createDecipheriv} to create the `Decipher` object.
911
927
  * @since v0.1.94
@@ -929,7 +945,7 @@ declare module 'crypto' {
929
945
  * recent OpenSSL releases, `openssl list -cipher-algorithms`(`openssl list-cipher-algorithms` for older versions of OpenSSL) will
930
946
  * display the available cipher algorithms.
931
947
  *
932
- * 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
933
949
  * strings,`Buffers`, `TypedArray`, or `DataView`s. The `key` may optionally be
934
950
  * a `KeyObject` of type `secret`. If the cipher does not need
935
951
  * an initialization vector, `iv` may be `null`.
@@ -1524,7 +1540,7 @@ declare module 'crypto' {
1524
1540
  }
1525
1541
  /**
1526
1542
  * Creates a predefined `DiffieHellmanGroup` key exchange object. The
1527
- * 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'`,
1528
1544
  * `'modp18'` (defined in [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt)). The
1529
1545
  * returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing
1530
1546
  * the keys (with `diffieHellman.setPublicKey()`, for example). The
@@ -2209,7 +2225,7 @@ declare module 'crypto' {
2209
2225
  * This function is based on a constant-time algorithm.
2210
2226
  * Returns true if `a` is equal to `b`, without leaking timing information that
2211
2227
  * would allow an attacker to guess one of the values. This is suitable for
2212
- * 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/).
2213
2229
  *
2214
2230
  * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they
2215
2231
  * must have the same byte length.
@@ -2382,8 +2398,8 @@ declare module 'crypto' {
2382
2398
  privateKey: T2;
2383
2399
  }
2384
2400
  /**
2385
- * Generates a new asymmetric key pair of the given `type`. RSA, DSA, EC, Ed25519,
2386
- * 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.
2387
2403
  *
2388
2404
  * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
2389
2405
  * behaves as if `keyObject.export()` had been called on its result. Otherwise,
@@ -2463,8 +2479,8 @@ declare module 'crypto' {
2463
2479
  function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2464
2480
  function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2465
2481
  /**
2466
- * Generates a new asymmetric key pair of the given `type`. RSA, DSA, EC, Ed25519,
2467
- * 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.
2468
2484
  *
2469
2485
  * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
2470
2486
  * behaves as if `keyObject.export()` had been called on its result. Otherwise,
@@ -2499,7 +2515,7 @@ declare module 'crypto' {
2499
2515
  * If this method is invoked as its `util.promisify()` ed version, it returns
2500
2516
  * a `Promise` for an `Object` with `publicKey` and `privateKey` properties.
2501
2517
  * @since v10.12.0
2502
- * @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'`.
2503
2519
  */
2504
2520
  function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2505
2521
  function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
@@ -2880,7 +2896,7 @@ declare module 'crypto' {
2880
2896
  *
2881
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;
2882
2898
  * otherwise `err` will be `null`. The successfully generated `derivedKey` will
2883
- * 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
2884
2900
  * of the input arguments specify invalid values or types.
2885
2901
  *
2886
2902
  * ```js
@@ -2907,7 +2923,7 @@ declare module 'crypto' {
2907
2923
  * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The
2908
2924
  * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of`keylen` bytes.
2909
2925
  *
2910
- * 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).
2911
2927
  *
2912
2928
  * An error will be thrown if any of the input arguments specify invalid values or
2913
2929
  * types, or if the derived key cannot be generated.
@@ -3169,8 +3185,8 @@ declare module 'crypto' {
3169
3185
  * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
3170
3186
  *
3171
3187
  * By default, the prime is encoded as a big-endian sequence of octets
3172
- * 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
3173
- * [&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.
3174
3190
  * @since v15.8.0
3175
3191
  * @param size The size (in bits) of the prime to generate.
3176
3192
  */
@@ -3200,8 +3216,8 @@ declare module 'crypto' {
3200
3216
  * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
3201
3217
  *
3202
3218
  * By default, the prime is encoded as a big-endian sequence of octets
3203
- * 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
3204
- * [&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.
3205
3221
  * @since v15.8.0
3206
3222
  * @param size The size (in bits) of the prime to generate.
3207
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.