@types/node 16.9.3 → 16.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
node/README.md 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: Sun, 19 Sep 2021 09:01:21 GMT
11
+ * Last updated: Sat, 25 Sep 2021 09: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
@@ -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`.
@@ -1151,6 +1167,26 @@ declare module 'crypto' {
1151
1167
  },
1152
1168
  callback: (err: Error | null, key: KeyObject) => void
1153
1169
  ): void;
1170
+ /**
1171
+ * Synchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
1172
+ *
1173
+ * ```js
1174
+ * const {
1175
+ * generateKeySync
1176
+ * } = await import('crypto');
1177
+ *
1178
+ * const key = generateKeySync('hmac', 64);
1179
+ * console.log(key.export().toString('hex')); // e89..........41e
1180
+ * ```
1181
+ * @since v15.0.0
1182
+ * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
1183
+ */
1184
+ function generateKeySync(
1185
+ type: 'hmac' | 'aes',
1186
+ options: {
1187
+ length: number;
1188
+ }
1189
+ ): KeyObject;
1154
1190
  interface JsonWebKeyInput {
1155
1191
  key: JsonWebKey;
1156
1192
  format: 'jwk';
@@ -1524,7 +1560,7 @@ declare module 'crypto' {
1524
1560
  }
1525
1561
  /**
1526
1562
  * 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'`,
1563
+ * 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
1564
  * `'modp18'` (defined in [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt)). The
1529
1565
  * returned object mimics the interface of objects created by {@link createDiffieHellman}, but will not allow changing
1530
1566
  * the keys (with `diffieHellman.setPublicKey()`, for example). The
@@ -2209,7 +2245,7 @@ declare module 'crypto' {
2209
2245
  * This function is based on a constant-time algorithm.
2210
2246
  * Returns true if `a` is equal to `b`, without leaking timing information that
2211
2247
  * 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/).
2248
+ * comparing HMAC digests or secret values like authentication cookies or [capability urls](https://www.w3.org/TR/capability-urls/).
2213
2249
  *
2214
2250
  * `a` and `b` must both be `Buffer`s, `TypedArray`s, or `DataView`s, and they
2215
2251
  * must have the same byte length.
@@ -2243,7 +2279,7 @@ declare module 'crypto' {
2243
2279
  interface X448KeyPairKeyObjectOptions {}
2244
2280
  interface ECKeyPairKeyObjectOptions {
2245
2281
  /**
2246
- * Name of the curve to use.
2282
+ * Name of the curve to use
2247
2283
  */
2248
2284
  namedCurve: string;
2249
2285
  }
@@ -2253,6 +2289,7 @@ declare module 'crypto' {
2253
2289
  */
2254
2290
  modulusLength: number;
2255
2291
  /**
2292
+ * Public exponent
2256
2293
  * @default 0x10001
2257
2294
  */
2258
2295
  publicExponent?: number | undefined;
@@ -2263,9 +2300,22 @@ declare module 'crypto' {
2263
2300
  */
2264
2301
  modulusLength: number;
2265
2302
  /**
2303
+ * Public exponent
2266
2304
  * @default 0x10001
2267
2305
  */
2268
2306
  publicExponent?: number | undefined;
2307
+ /**
2308
+ * Name of the message digest
2309
+ */
2310
+ hashAlgorithm?: string;
2311
+ /**
2312
+ * Name of the message digest used by MGF1
2313
+ */
2314
+ mgf1HashAlgorithm?: string;
2315
+ /**
2316
+ * Minimal salt length in bytes
2317
+ */
2318
+ saltLength?: string;
2269
2319
  }
2270
2320
  interface DSAKeyPairKeyObjectOptions {
2271
2321
  /**
@@ -2283,6 +2333,7 @@ declare module 'crypto' {
2283
2333
  */
2284
2334
  modulusLength: number;
2285
2335
  /**
2336
+ * Public exponent
2286
2337
  * @default 0x10001
2287
2338
  */
2288
2339
  publicExponent?: number | undefined;
@@ -2300,9 +2351,22 @@ declare module 'crypto' {
2300
2351
  */
2301
2352
  modulusLength: number;
2302
2353
  /**
2354
+ * Public exponent
2303
2355
  * @default 0x10001
2304
2356
  */
2305
2357
  publicExponent?: number | undefined;
2358
+ /**
2359
+ * Name of the message digest
2360
+ */
2361
+ hashAlgorithm?: string;
2362
+ /**
2363
+ * Name of the message digest used by MGF1
2364
+ */
2365
+ mgf1HashAlgorithm?: string;
2366
+ /**
2367
+ * Minimal salt length in bytes
2368
+ */
2369
+ saltLength?: string;
2306
2370
  publicKeyEncoding: {
2307
2371
  type: 'spki';
2308
2372
  format: PubF;
@@ -2382,8 +2446,8 @@ declare module 'crypto' {
2382
2446
  privateKey: T2;
2383
2447
  }
2384
2448
  /**
2385
- * Generates a new asymmetric key pair of the given `type`. RSA, DSA, EC, Ed25519,
2386
- * Ed448, X25519, X448, and DH are currently supported.
2449
+ * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
2450
+ * Ed25519, Ed448, X25519, X448, and DH are currently supported.
2387
2451
  *
2388
2452
  * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
2389
2453
  * behaves as if `keyObject.export()` had been called on its result. Otherwise,
@@ -2463,8 +2527,8 @@ declare module 'crypto' {
2463
2527
  function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2464
2528
  function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2465
2529
  /**
2466
- * Generates a new asymmetric key pair of the given `type`. RSA, DSA, EC, Ed25519,
2467
- * Ed448, X25519, X448, and DH are currently supported.
2530
+ * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
2531
+ * Ed25519, Ed448, X25519, X448, and DH are currently supported.
2468
2532
  *
2469
2533
  * If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
2470
2534
  * behaves as if `keyObject.export()` had been called on its result. Otherwise,
@@ -2499,7 +2563,7 @@ declare module 'crypto' {
2499
2563
  * If this method is invoked as its `util.promisify()` ed version, it returns
2500
2564
  * a `Promise` for an `Object` with `publicKey` and `privateKey` properties.
2501
2565
  * @since v10.12.0
2502
- * @param type Must be `'rsa'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
2566
+ * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
2503
2567
  */
2504
2568
  function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2505
2569
  function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
@@ -2880,7 +2944,7 @@ declare module 'crypto' {
2880
2944
  *
2881
2945
  * 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
2946
  * 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
2947
+ * 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
2948
  * of the input arguments specify invalid values or types.
2885
2949
  *
2886
2950
  * ```js
@@ -2907,7 +2971,7 @@ declare module 'crypto' {
2907
2971
  * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The
2908
2972
  * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of`keylen` bytes.
2909
2973
  *
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).
2974
+ * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer).
2911
2975
  *
2912
2976
  * An error will be thrown if any of the input arguments specify invalid values or
2913
2977
  * types, or if the derived key cannot be generated.
@@ -3169,8 +3233,8 @@ declare module 'crypto' {
3169
3233
  * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
3170
3234
  *
3171
3235
  * 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.
3236
+ * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
3237
+ * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided.
3174
3238
  * @since v15.8.0
3175
3239
  * @param size The size (in bits) of the prime to generate.
3176
3240
  */
@@ -3200,8 +3264,8 @@ declare module 'crypto' {
3200
3264
  * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
3201
3265
  *
3202
3266
  * 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.
3267
+ * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
3268
+ * [bigint](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) is provided.
3205
3269
  * @since v15.8.0
3206
3270
  * @param size The size (in bits) of the prime to generate.
3207
3271
  */
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