@types/node 20.13.0 → 20.14.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 (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 31 May 2024 19:31:07 GMT
11
+ * Last updated: Sun, 02 Jun 2024 20:07:09 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node/buffer.d.ts CHANGED
@@ -88,7 +88,7 @@ declare module "buffer" {
88
88
  * Throws if the `fromEnc` or `toEnc` specify invalid character encodings or if
89
89
  * conversion from `fromEnc` to `toEnc` is not permitted.
90
90
  *
91
- * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`,`'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`.
91
+ * Encodings supported by `buffer.transcode()` are: `'ascii'`, `'utf8'`, `'utf16le'`, `'ucs2'`, `'latin1'`, and `'binary'`.
92
92
  *
93
93
  * The transcoding process will use substitution characters if a given byte
94
94
  * sequence cannot be adequately represented in the target encoding. For instance:
@@ -781,7 +781,7 @@ declare module "buffer" {
781
781
  * // (This result is equal to: [buf1, buf3, buf2].)
782
782
  * ```
783
783
  *
784
- * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd`arguments can be used to limit the comparison to specific ranges within `target`and `buf` respectively.
784
+ * The optional `targetStart`, `targetEnd`, `sourceStart`, and `sourceEnd` arguments can be used to limit the comparison to specific ranges within `target` and `buf` respectively.
785
785
  *
786
786
  * ```js
787
787
  * import { Buffer } from 'node:buffer';
@@ -797,7 +797,7 @@ declare module "buffer" {
797
797
  * // Prints: 1
798
798
  * ```
799
799
  *
800
- * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`,`targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`.
800
+ * `ERR_OUT_OF_RANGE` is thrown if `targetStart < 0`, `sourceStart < 0`, `targetEnd > target.byteLength`, or `sourceEnd > source.byteLength`.
801
801
  * @since v0.11.13
802
802
  * @param target A `Buffer` or {@link Uint8Array} with which to compare `buf`.
803
803
  * @param [targetStart=0] The offset within `target` at which to begin comparison.
@@ -1215,7 +1215,7 @@ declare module "buffer" {
1215
1215
  */
1216
1216
  readBigInt64LE(offset?: number): bigint;
1217
1217
  /**
1218
- * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned, little-endian integer supporting
1218
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned, little-endian integer supporting
1219
1219
  * up to 48 bits of accuracy.
1220
1220
  *
1221
1221
  * This function is also available under the `readUintLE` alias.
@@ -1239,7 +1239,7 @@ declare module "buffer" {
1239
1239
  */
1240
1240
  readUintLE(offset: number, byteLength: number): number;
1241
1241
  /**
1242
- * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as an unsigned big-endian integer supporting
1242
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned big-endian integer supporting
1243
1243
  * up to 48 bits of accuracy.
1244
1244
  *
1245
1245
  * This function is also available under the `readUintBE` alias.
@@ -1265,7 +1265,7 @@ declare module "buffer" {
1265
1265
  */
1266
1266
  readUintBE(offset: number, byteLength: number): number;
1267
1267
  /**
1268
- * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a little-endian, two's complement signed value
1268
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a little-endian, two's complement signed value
1269
1269
  * supporting up to 48 bits of accuracy.
1270
1270
  *
1271
1271
  * ```js
@@ -1282,7 +1282,7 @@ declare module "buffer" {
1282
1282
  */
1283
1283
  readIntLE(offset: number, byteLength: number): number;
1284
1284
  /**
1285
- * Reads `byteLength` number of bytes from `buf` at the specified `offset`and interprets the result as a big-endian, two's complement signed value
1285
+ * Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a big-endian, two's complement signed value
1286
1286
  * supporting up to 48 bits of accuracy.
1287
1287
  *
1288
1288
  * ```js
@@ -1329,7 +1329,7 @@ declare module "buffer" {
1329
1329
  */
1330
1330
  readUint8(offset?: number): number;
1331
1331
  /**
1332
- * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified`offset`.
1332
+ * Reads an unsigned, little-endian 16-bit integer from `buf` at the specified `offset`.
1333
1333
  *
1334
1334
  * This function is also available under the `readUint16LE` alias.
1335
1335
  *
@@ -1702,7 +1702,7 @@ declare module "buffer" {
1702
1702
  */
1703
1703
  writeUint8(value: number, offset?: number): number;
1704
1704
  /**
1705
- * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is
1705
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is
1706
1706
  * anything other than an unsigned 16-bit integer.
1707
1707
  *
1708
1708
  * This function is also available under the `writeUint16LE` alias.
@@ -1730,7 +1730,7 @@ declare module "buffer" {
1730
1730
  */
1731
1731
  writeUint16LE(value: number, offset?: number): number;
1732
1732
  /**
1733
- * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an
1733
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value`is anything other than an
1734
1734
  * unsigned 16-bit integer.
1735
1735
  *
1736
1736
  * This function is also available under the `writeUint16BE` alias.
@@ -1758,7 +1758,7 @@ declare module "buffer" {
1758
1758
  */
1759
1759
  writeUint16BE(value: number, offset?: number): number;
1760
1760
  /**
1761
- * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is
1761
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is
1762
1762
  * anything other than an unsigned 32-bit integer.
1763
1763
  *
1764
1764
  * This function is also available under the `writeUint32LE` alias.
@@ -1785,7 +1785,7 @@ declare module "buffer" {
1785
1785
  */
1786
1786
  writeUint32LE(value: number, offset?: number): number;
1787
1787
  /**
1788
- * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an
1788
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value`is anything other than an
1789
1789
  * unsigned 32-bit integer.
1790
1790
  *
1791
1791
  * This function is also available under the `writeUint32BE` alias.
@@ -1836,7 +1836,7 @@ declare module "buffer" {
1836
1836
  */
1837
1837
  writeInt8(value: number, offset?: number): number;
1838
1838
  /**
1839
- * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is
1839
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is
1840
1840
  * anything other than a signed 16-bit integer.
1841
1841
  *
1842
1842
  * The `value` is interpreted and written as a two's complement signed integer.
@@ -1858,7 +1858,7 @@ declare module "buffer" {
1858
1858
  */
1859
1859
  writeInt16LE(value: number, offset?: number): number;
1860
1860
  /**
1861
- * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 16-bit integer. Behavior is undefined when `value` is
1861
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is
1862
1862
  * anything other than a signed 16-bit integer.
1863
1863
  *
1864
1864
  * The `value` is interpreted and written as a two's complement signed integer.
@@ -1880,7 +1880,7 @@ declare module "buffer" {
1880
1880
  */
1881
1881
  writeInt16BE(value: number, offset?: number): number;
1882
1882
  /**
1883
- * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is
1883
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is
1884
1884
  * anything other than a signed 32-bit integer.
1885
1885
  *
1886
1886
  * The `value` is interpreted and written as a two's complement signed integer.
@@ -1902,7 +1902,7 @@ declare module "buffer" {
1902
1902
  */
1903
1903
  writeInt32LE(value: number, offset?: number): number;
1904
1904
  /**
1905
- * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a valid signed 32-bit integer. Behavior is undefined when `value` is
1905
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is
1906
1906
  * anything other than a signed 32-bit integer.
1907
1907
  *
1908
1908
  * The `value` is interpreted and written as a two's complement signed integer.
@@ -1964,7 +1964,7 @@ declare module "buffer" {
1964
1964
  */
1965
1965
  writeFloatBE(value: number, offset?: number): number;
1966
1966
  /**
1967
- * Writes `value` to `buf` at the specified `offset` as little-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything
1967
+ * Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything
1968
1968
  * other than a JavaScript number.
1969
1969
  *
1970
1970
  * ```js
@@ -1984,7 +1984,7 @@ declare module "buffer" {
1984
1984
  */
1985
1985
  writeDoubleLE(value: number, offset?: number): number;
1986
1986
  /**
1987
- * Writes `value` to `buf` at the specified `offset` as big-endian. The `value`must be a JavaScript number. Behavior is undefined when `value` is anything
1987
+ * Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything
1988
1988
  * other than a JavaScript number.
1989
1989
  *
1990
1990
  * ```js
@@ -2066,7 +2066,7 @@ declare module "buffer" {
2066
2066
  /**
2067
2067
  * If `value` is:
2068
2068
  *
2069
- * * a string, `value` is interpreted according to the character encoding in`encoding`.
2069
+ * * a string, `value` is interpreted according to the character encoding in `encoding`.
2070
2070
  * * a `Buffer` or [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array), `value` will be used in its entirety.
2071
2071
  * To compare a partial `Buffer`, use `buf.subarray`.
2072
2072
  * * a number, `value` will be interpreted as an unsigned 8-bit integer
@@ -2164,7 +2164,7 @@ declare module "buffer" {
2164
2164
  * // Prints: 4
2165
2165
  * ```
2166
2166
  *
2167
- * If `value` is not a string, number, or `Buffer`, this method will throw a`TypeError`. If `value` is a number, it will be coerced to a valid byte value,
2167
+ * If `value` is not a string, number, or `Buffer`, this method will throw a `TypeError`. If `value` is a number, it will be coerced to a valid byte value,
2168
2168
  * an integer between 0 and 255.
2169
2169
  *
2170
2170
  * If `byteOffset` is not a number, it will be coerced to a number. Any arguments
@@ -2323,7 +2323,7 @@ declare module "buffer" {
2323
2323
  * **and should never be used in new code, because they use strings to represent**
2324
2324
  * **binary data and predate the introduction of typed arrays in JavaScript.**
2325
2325
  * **For code running using Node.js APIs, converting between base64-encoded strings**
2326
- * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
2326
+ * **and binary data should be performed using `Buffer.from(str, 'base64')` and `buf.toString('base64')`.**
2327
2327
  * @since v15.13.0, v14.17.0
2328
2328
  * @legacy Use `Buffer.from(data, 'base64')` instead.
2329
2329
  * @param data The Base64-encoded input string.
@@ -2339,7 +2339,7 @@ declare module "buffer" {
2339
2339
  * **and should never be used in new code, because they use strings to represent**
2340
2340
  * **binary data and predate the introduction of typed arrays in JavaScript.**
2341
2341
  * **For code running using Node.js APIs, converting between base64-encoded strings**
2342
- * **and binary data should be performed using `Buffer.from(str, 'base64')` and`buf.toString('base64')`.**
2342
+ * **and binary data should be performed using `Buffer.from(str, 'base64')` and `buf.toString('base64')`.**
2343
2343
  * @since v15.13.0, v14.17.0
2344
2344
  * @legacy Use `buf.toString('base64')` instead.
2345
2345
  * @param data An ASCII (Latin1) string.
node/child_process.d.ts CHANGED
@@ -95,7 +95,7 @@ declare module "child_process" {
95
95
  * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
96
96
  * refer to the same value.
97
97
  *
98
- * The `subprocess.stdin` property can be `null` or `undefined`if the child process could not be successfully spawned.
98
+ * The `subprocess.stdin` property can be `null` or `undefined` if the child process could not be successfully spawned.
99
99
  * @since v0.1.90
100
100
  */
101
101
  stdin: Writable | null;
@@ -118,7 +118,7 @@ declare module "child_process" {
118
118
  * });
119
119
  * ```
120
120
  *
121
- * The `subprocess.stdout` property can be `null` or `undefined`if the child process could not be successfully spawned.
121
+ * The `subprocess.stdout` property can be `null` or `undefined` if the child process could not be successfully spawned.
122
122
  * @since v0.1.90
123
123
  */
124
124
  stdout: Readable | null;
@@ -131,7 +131,7 @@ declare module "child_process" {
131
131
  * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
132
132
  * refer to the same value.
133
133
  *
134
- * The `subprocess.stderr` property can be `null` or `undefined`if the child process could not be successfully spawned.
134
+ * The `subprocess.stderr` property can be `null` or `undefined` if the child process could not be successfully spawned.
135
135
  * @since v0.1.90
136
136
  */
137
137
  stderr: Readable | null;
node/crypto.d.ts CHANGED
@@ -907,8 +907,8 @@ declare module "crypto" {
907
907
  private constructor();
908
908
  /**
909
909
  * Updates the cipher with `data`. If the `inputEncoding` argument is given,
910
- * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or`DataView`. If `data` is a `Buffer`,
911
- * `TypedArray`, or `DataView`, then`inputEncoding` is ignored.
910
+ * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`, `TypedArray`, or `DataView`. If `data` is a `Buffer`,
911
+ * `TypedArray`, or `DataView`, then `inputEncoding` is ignored.
912
912
  *
913
913
  * The `outputEncoding` specifies the output format of the enciphered
914
914
  * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
@@ -981,7 +981,7 @@ declare module "crypto" {
981
981
  * Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key).
982
982
  *
983
983
  * The `options` argument controls stream behavior and is optional except when a
984
- * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
984
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the `authTagLength` option is required and specifies the length of the
985
985
  * authentication tag in bytes, see `CCM mode`.
986
986
  * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
987
987
  *
@@ -1009,11 +1009,11 @@ declare module "crypto" {
1009
1009
  /** @deprecated since v10.0.0 use `createDecipheriv()` */
1010
1010
  function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
1011
1011
  /**
1012
- * Creates and returns a `Decipher` object that uses the given `algorithm`, `key`and initialization vector (`iv`).
1012
+ * Creates and returns a `Decipher` object that uses the given `algorithm`, `key` and initialization vector (`iv`).
1013
1013
  *
1014
1014
  * The `options` argument controls stream behavior and is optional except when a
1015
- * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the`authTagLength` option is required and specifies the length of the
1016
- * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength`option is not required but can be used to restrict accepted authentication tags
1015
+ * cipher in CCM or OCB mode (e.g. `'aes-128-ccm'`) is used. In that case, the `authTagLength` option is required and specifies the length of the
1016
+ * authentication tag in bytes, see `CCM mode`. In GCM mode, the `authTagLength` option is not required but can be used to restrict accepted authentication tags
1017
1017
  * to those with the specified length.
1018
1018
  * For `chacha20-poly1305`, the `authTagLength` option defaults to 16 bytes.
1019
1019
  *
@@ -1173,11 +1173,11 @@ declare module "crypto" {
1173
1173
  private constructor();
1174
1174
  /**
1175
1175
  * Updates the decipher with `data`. If the `inputEncoding` argument is given,
1176
- * the `data`argument is a string using the specified encoding. If the `inputEncoding`argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is
1176
+ * the `data` argument is a string using the specified encoding. If the `inputEncoding` argument is not given, `data` must be a `Buffer`. If `data` is a `Buffer` then `inputEncoding` is
1177
1177
  * ignored.
1178
1178
  *
1179
1179
  * The `outputEncoding` specifies the output format of the enciphered
1180
- * data. If the `outputEncoding`is specified, a string using the specified encoding is returned. If no`outputEncoding` is provided, a `Buffer` is returned.
1180
+ * data. If the `outputEncoding` is specified, a string using the specified encoding is returned. If no `outputEncoding` is provided, a `Buffer` is returned.
1181
1181
  *
1182
1182
  * The `decipher.update()` method can be called multiple times with new data until `decipher.final()` is called. Calling `decipher.update()` after `decipher.final()` will result in an error
1183
1183
  * being thrown.
@@ -1200,7 +1200,7 @@ declare module "crypto" {
1200
1200
  final(): Buffer;
1201
1201
  final(outputEncoding: BufferEncoding): string;
1202
1202
  /**
1203
- * When data has been encrypted without standard block padding, calling`decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and
1203
+ * When data has been encrypted without standard block padding, calling `decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and
1204
1204
  * removing padding.
1205
1205
  *
1206
1206
  * Turning auto padding off will only work if the input data's length is a
@@ -1254,7 +1254,7 @@ declare module "crypto" {
1254
1254
  encoding?: string | undefined;
1255
1255
  }
1256
1256
  /**
1257
- * Asynchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
1257
+ * Asynchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`.
1258
1258
  *
1259
1259
  * ```js
1260
1260
  * const {
@@ -1280,7 +1280,7 @@ declare module "crypto" {
1280
1280
  callback: (err: Error | null, key: KeyObject) => void,
1281
1281
  ): void;
1282
1282
  /**
1283
- * Synchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
1283
+ * Synchronously generates a new random secret key of the given `length`. The `type` will determine which validations will be performed on the `length`.
1284
1284
  *
1285
1285
  * ```js
1286
1286
  * const {
@@ -1308,7 +1308,7 @@ declare module "crypto" {
1308
1308
  }
1309
1309
  /**
1310
1310
  * Creates and returns a new key object containing a private key. If `key` is a
1311
- * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key`must be an object with the properties described above.
1311
+ * string or `Buffer`, `format` is assumed to be `'pem'`; otherwise, `key` must be an object with the properties described above.
1312
1312
  *
1313
1313
  * If the private key is encrypted, a `passphrase` must be specified. The length
1314
1314
  * of the passphrase is limited to 1024 bytes.
@@ -1317,7 +1317,7 @@ declare module "crypto" {
1317
1317
  function createPrivateKey(key: PrivateKeyInput | string | Buffer | JsonWebKeyInput): KeyObject;
1318
1318
  /**
1319
1319
  * Creates and returns a new key object containing a public key. If `key` is a
1320
- * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject`with type `'private'`, the public key is derived from the given private key;
1320
+ * string or `Buffer`, `format` is assumed to be `'pem'`; if `key` is a `KeyObject` with type `'private'`, the public key is derived from the given private key;
1321
1321
  * otherwise, `key` must be an object with the properties described above.
1322
1322
  *
1323
1323
  * If the format is `'pem'`, the `'key'` may also be an X.509 certificate.
@@ -1325,7 +1325,7 @@ declare module "crypto" {
1325
1325
  * Because public keys can be derived from private keys, a private key may be
1326
1326
  * passed instead of a public key. In that case, this function behaves as if {@link createPrivateKey} had been called, except that the type of the
1327
1327
  * returned `KeyObject` will be `'public'` and that the private key cannot be
1328
- * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type`'private'` is given, a new `KeyObject` with type `'public'` will be returned
1328
+ * extracted from the returned `KeyObject`. Similarly, if a `KeyObject` with type `'private'` is given, a new `KeyObject` with type `'public'` will be returned
1329
1329
  * and it will be impossible to extract the private key from the returned object.
1330
1330
  * @since v11.6.0
1331
1331
  */
@@ -1450,7 +1450,7 @@ declare module "crypto" {
1450
1450
  /**
1451
1451
  * Calculates the signature on all the data passed through using either `sign.update()` or `sign.write()`.
1452
1452
  *
1453
- * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
1453
+ * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an
1454
1454
  * object, the following additional properties can be passed:
1455
1455
  *
1456
1456
  * If `outputEncoding` is provided a string is returned; otherwise a `Buffer` is returned.
@@ -1468,7 +1468,7 @@ declare module "crypto" {
1468
1468
  /**
1469
1469
  * Creates and returns a `Verify` object that uses the given algorithm.
1470
1470
  * Use {@link getHashes} to obtain an array of names of the available
1471
- * signing algorithms. Optional `options` argument controls the`stream.Writable` behavior.
1471
+ * signing algorithms. Optional `options` argument controls the `stream.Writable` behavior.
1472
1472
  *
1473
1473
  * In some cases, a `Verify` instance can be created using the name of a signature
1474
1474
  * algorithm, such as `'RSA-SHA256'`, instead of a digest algorithm. This will use
@@ -1488,7 +1488,7 @@ declare module "crypto" {
1488
1488
  * * Using the `verify.update()` and `verify.verify()` methods to verify
1489
1489
  * the signature.
1490
1490
  *
1491
- * The {@link createVerify} method is used to create `Verify` instances.`Verify` objects are not to be created directly using the `new` keyword.
1491
+ * The {@link createVerify} method is used to create `Verify` instances. `Verify` objects are not to be created directly using the `new` keyword.
1492
1492
  *
1493
1493
  * See `Sign` for examples.
1494
1494
  * @since v0.1.92
@@ -1499,7 +1499,7 @@ declare module "crypto" {
1499
1499
  * Updates the `Verify` content with the given `data`, the encoding of which
1500
1500
  * is given in `inputEncoding`.
1501
1501
  * If `inputEncoding` is not provided, and the `data` is a string, an
1502
- * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
1502
+ * encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or `DataView`, then `inputEncoding` is ignored.
1503
1503
  *
1504
1504
  * This can be called many times with new data as it is streamed.
1505
1505
  * @since v0.1.92
@@ -1510,13 +1510,13 @@ declare module "crypto" {
1510
1510
  /**
1511
1511
  * Verifies the provided data using the given `object` and `signature`.
1512
1512
  *
1513
- * If `object` is not a `KeyObject`, this function behaves as if`object` had been passed to {@link createPublicKey}. If it is an
1513
+ * If `object` is not a `KeyObject`, this function behaves as if `object` had been passed to {@link createPublicKey}. If it is an
1514
1514
  * object, the following additional properties can be passed:
1515
1515
  *
1516
1516
  * The `signature` argument is the previously calculated signature for the data, in
1517
1517
  * the `signatureEncoding`.
1518
1518
  * If a `signatureEncoding` is specified, the `signature` is expected to be a
1519
- * string; otherwise `signature` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
1519
+ * string; otherwise `signature` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
1520
1520
  *
1521
1521
  * The `verify` object can not be used again after `verify.verify()` has been
1522
1522
  * called. Multiple calls to `verify.verify()` will result in an error being
@@ -1540,7 +1540,7 @@ declare module "crypto" {
1540
1540
  * Creates a `DiffieHellman` key exchange object using the supplied `prime` and an
1541
1541
  * optional specific `generator`.
1542
1542
  *
1543
- * The `generator` argument can be a number, string, or `Buffer`. If`generator` is not specified, the value `2` is used.
1543
+ * The `generator` argument can be a number, string, or `Buffer`. If `generator` is not specified, the value `2` is used.
1544
1544
  *
1545
1545
  * If `primeEncoding` is specified, `prime` is expected to be a string; otherwise
1546
1546
  * a `Buffer`, `TypedArray`, or `DataView` is expected.
@@ -1626,7 +1626,7 @@ declare module "crypto" {
1626
1626
  * key is interpreted using the specified `inputEncoding`, and secret is
1627
1627
  * encoded using specified `outputEncoding`.
1628
1628
  * If the `inputEncoding` is not
1629
- * provided, `otherPublicKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
1629
+ * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
1630
1630
  *
1631
1631
  * If `outputEncoding` is given a string is returned; otherwise, a `Buffer` is returned.
1632
1632
  * @since v0.5.0
@@ -1682,7 +1682,7 @@ declare module "crypto" {
1682
1682
  getPrivateKey(): Buffer;
1683
1683
  getPrivateKey(encoding: BinaryToTextEncoding): string;
1684
1684
  /**
1685
- * Sets the Diffie-Hellman public key. If the `encoding` argument is provided,`publicKey` is expected
1685
+ * Sets the Diffie-Hellman public key. If the `encoding` argument is provided, `publicKey` is expected
1686
1686
  * to be a string. If no `encoding` is provided, `publicKey` is expected
1687
1687
  * to be a `Buffer`, `TypedArray`, or `DataView`.
1688
1688
  * @since v0.5.0
@@ -1785,10 +1785,10 @@ declare module "crypto" {
1785
1785
  /**
1786
1786
  * Provides an asynchronous Password-Based Key Derivation Function 2 (PBKDF2)
1787
1787
  * implementation. A selected HMAC digest algorithm specified by `digest` is
1788
- * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
1788
+ * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`.
1789
1789
  *
1790
- * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an error occurs while deriving the key, `err` will be set;
1791
- * otherwise `err` will be `null`. By default, the successfully generated`derivedKey` will be passed to the callback as a `Buffer`. An error will be
1790
+ * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an error occurs while deriving the key, `err` will be set;
1791
+ * otherwise `err` will be `null`. By default, the successfully generated `derivedKey` will be passed to the callback as a `Buffer`. An error will be
1792
1792
  * thrown if any of the input arguments specify invalid values or types.
1793
1793
  *
1794
1794
  * The `iterations` argument must be a number set as high as possible. The
@@ -1828,7 +1828,7 @@ declare module "crypto" {
1828
1828
  /**
1829
1829
  * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2)
1830
1830
  * implementation. A selected HMAC digest algorithm specified by `digest` is
1831
- * applied to derive a key of the requested byte length (`keylen`) from the`password`, `salt` and `iterations`.
1831
+ * applied to derive a key of the requested byte length (`keylen`) from the `password`, `salt` and `iterations`.
1832
1832
  *
1833
1833
  * If an error occurs an `Error` will be thrown, otherwise the derived key will be
1834
1834
  * returned as a `Buffer`.
@@ -1867,7 +1867,7 @@ declare module "crypto" {
1867
1867
  *
1868
1868
  * If a `callback` function is provided, the bytes are generated asynchronously
1869
1869
  * and the `callback` function is invoked with two arguments: `err` and `buf`.
1870
- * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The`buf` argument is a `Buffer` containing the generated bytes.
1870
+ * If an error occurs, `err` will be an `Error` object; otherwise it is `null`. The `buf` argument is a `Buffer` containing the generated bytes.
1871
1871
  *
1872
1872
  * ```js
1873
1873
  * // Asynchronous
@@ -2038,7 +2038,7 @@ declare module "crypto" {
2038
2038
  * });
2039
2039
  * ```
2040
2040
  *
2041
- * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as`buffer`.
2041
+ * Any `ArrayBuffer`, `TypedArray`, or `DataView` instance may be passed as `buffer`.
2042
2042
  *
2043
2043
  * While this includes instances of `Float32Array` and `Float64Array`, this
2044
2044
  * function should not be used to generate random floating-point numbers. The
@@ -2118,7 +2118,7 @@ declare module "crypto" {
2118
2118
  *
2119
2119
  * When passing strings for `password` or `salt`, please consider `caveats when using strings as inputs to cryptographic APIs`.
2120
2120
  *
2121
- * The `callback` function is called with two arguments: `err` and `derivedKey`.`err` is an exception object when key derivation fails, otherwise `err` is`null`. `derivedKey` is passed to the
2121
+ * The `callback` function is called with two arguments: `err` and `derivedKey`. `err` is an exception object when key derivation fails, otherwise `err` is `null`. `derivedKey` is passed to the
2122
2122
  * callback as a `Buffer`.
2123
2123
  *
2124
2124
  * An exception is thrown when any of the input arguments specify invalid values
@@ -2204,8 +2204,8 @@ declare module "crypto" {
2204
2204
  * Encrypts the content of `buffer` with `key` and returns a new `Buffer` with encrypted content. The returned data can be decrypted using
2205
2205
  * the corresponding private key, for example using {@link privateDecrypt}.
2206
2206
  *
2207
- * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
2208
- * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
2207
+ * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an
2208
+ * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`.
2209
2209
  *
2210
2210
  * Because RSA public keys can be derived from private keys, a private key may
2211
2211
  * be passed instead of a public key.
@@ -2216,8 +2216,8 @@ declare module "crypto" {
2216
2216
  * Decrypts `buffer` with `key`.`buffer` was previously encrypted using
2217
2217
  * the corresponding private key, for example using {@link privateEncrypt}.
2218
2218
  *
2219
- * If `key` is not a `KeyObject`, this function behaves as if`key` had been passed to {@link createPublicKey}. If it is an
2220
- * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
2219
+ * If `key` is not a `KeyObject`, this function behaves as if `key` had been passed to {@link createPublicKey}. If it is an
2220
+ * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`.
2221
2221
  *
2222
2222
  * Because RSA public keys can be derived from private keys, a private key may
2223
2223
  * be passed instead of a public key.
@@ -2228,8 +2228,8 @@ declare module "crypto" {
2228
2228
  * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
2229
2229
  * the corresponding public key, for example using {@link publicEncrypt}.
2230
2230
  *
2231
- * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
2232
- * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_OAEP_PADDING`.
2231
+ * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an
2232
+ * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`.
2233
2233
  * @since v0.11.14
2234
2234
  */
2235
2235
  function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
@@ -2237,8 +2237,8 @@ declare module "crypto" {
2237
2237
  * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
2238
2238
  * the corresponding public key, for example using {@link publicDecrypt}.
2239
2239
  *
2240
- * If `privateKey` is not a `KeyObject`, this function behaves as if`privateKey` had been passed to {@link createPrivateKey}. If it is an
2241
- * object, the `padding` property can be passed. Otherwise, this function uses`RSA_PKCS1_PADDING`.
2240
+ * If `privateKey` is not a `KeyObject`, this function behaves as if `privateKey` had been passed to {@link createPrivateKey}. If it is an
2241
+ * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`.
2242
2242
  * @since v1.1.0
2243
2243
  */
2244
2244
  function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
@@ -2333,9 +2333,9 @@ declare module "crypto" {
2333
2333
  * On recent OpenSSL releases, `openssl ecparam -list_curves` will also display
2334
2334
  * the name and description of each available elliptic curve.
2335
2335
  *
2336
- * If `format` is not specified the point will be returned in `'uncompressed'`format.
2336
+ * If `format` is not specified the point will be returned in `'uncompressed'` format.
2337
2337
  *
2338
- * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
2338
+ * If the `inputEncoding` is not provided, `key` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
2339
2339
  *
2340
2340
  * Example (uncompressing a key):
2341
2341
  *
@@ -2376,7 +2376,7 @@ declare module "crypto" {
2376
2376
  * the public key in the specified `format` and `encoding`. This key should be
2377
2377
  * transferred to the other party.
2378
2378
  *
2379
- * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format.
2379
+ * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified, the point will be returned in`'uncompressed'` format.
2380
2380
  *
2381
2381
  * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
2382
2382
  * @since v0.11.14
@@ -2391,11 +2391,11 @@ declare module "crypto" {
2391
2391
  * key is interpreted using specified `inputEncoding`, and the returned secret
2392
2392
  * is encoded using the specified `outputEncoding`.
2393
2393
  * If the `inputEncoding` is not
2394
- * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or`DataView`.
2394
+ * provided, `otherPublicKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
2395
2395
  *
2396
2396
  * If `outputEncoding` is given a string will be returned; otherwise a `Buffer` is returned.
2397
2397
  *
2398
- * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey`lies outside of the elliptic curve. Since `otherPublicKey` is
2398
+ * `ecdh.computeSecret` will throw an`ERR_CRYPTO_ECDH_INVALID_PUBLIC_KEY` error when `otherPublicKey` lies outside of the elliptic curve. Since `otherPublicKey` is
2399
2399
  * usually supplied from a remote user over an insecure network,
2400
2400
  * be sure to handle this exception accordingly.
2401
2401
  * @since v0.11.14
@@ -2420,7 +2420,7 @@ declare module "crypto" {
2420
2420
  getPrivateKey(): Buffer;
2421
2421
  getPrivateKey(encoding: BinaryToTextEncoding): string;
2422
2422
  /**
2423
- * The `format` argument specifies point encoding and can be `'compressed'` or`'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format.
2423
+ * The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format.
2424
2424
  *
2425
2425
  * If `encoding` is specified, a string is returned; otherwise a `Buffer` is
2426
2426
  * returned.
@@ -2434,7 +2434,7 @@ declare module "crypto" {
2434
2434
  /**
2435
2435
  * Sets the EC Diffie-Hellman private key.
2436
2436
  * If `encoding` is provided, `privateKey` is expected
2437
- * to be a string; otherwise `privateKey` is expected to be a `Buffer`,`TypedArray`, or `DataView`.
2437
+ * to be a string; otherwise `privateKey` is expected to be a `Buffer`, `TypedArray`, or `DataView`.
2438
2438
  *
2439
2439
  * If `privateKey` is not valid for the curve specified when the `ECDH` object was
2440
2440
  * created, an error is thrown. Upon setting the private key, the associated
@@ -2454,7 +2454,7 @@ declare module "crypto" {
2454
2454
  */
2455
2455
  function createECDH(curveName: string): ECDH;
2456
2456
  /**
2457
- * This function compares the underlying bytes that represent the given`ArrayBuffer`, `TypedArray`, or `DataView` instances using a constant-time
2457
+ * This function compares the underlying bytes that represent the given `ArrayBuffer`, `TypedArray`, or `DataView` instances using a constant-time
2458
2458
  * algorithm.
2459
2459
  *
2460
2460
  * This function does not leak timing information that
@@ -2469,8 +2469,8 @@ declare module "crypto" {
2469
2469
  * entry, such as `Uint16Array`, the result will be computed using the platform
2470
2470
  * byte order.
2471
2471
  *
2472
- * **When both of the inputs are `Float32Array`s or`Float64Array`s, this function might return unexpected results due to IEEE 754**
2473
- * **encoding of floating-point numbers. In particular, neither `x === y` nor`Object.is(x, y)` implies that the byte representations of two floating-point**
2472
+ * **When both of the inputs are `Float32Array`s or `Float64Array`s, this function might return unexpected results due to IEEE 754**
2473
+ * **encoding of floating-point numbers. In particular, neither `x === y` nor `Object.is(x, y)` implies that the byte representations of two floating-point**
2474
2474
  * **numbers `x` and `y` are equal.**
2475
2475
  *
2476
2476
  * Use of `crypto.timingSafeEqual` does not guarantee that the _surrounding_ code
@@ -2847,7 +2847,7 @@ declare module "crypto" {
2847
2847
  * behaves as if `keyObject.export()` had been called on its result. Otherwise,
2848
2848
  * the respective part of the key is returned as a `KeyObject`.
2849
2849
  *
2850
- * It is recommended to encode public keys as `'spki'` and private keys as`'pkcs8'` with encryption for long-term storage:
2850
+ * It is recommended to encode public keys as `'spki'` and private keys as `'pkcs8'` with encryption for long-term storage:
2851
2851
  *
2852
2852
  * ```js
2853
2853
  * const {
@@ -3375,7 +3375,7 @@ declare module "crypto" {
3375
3375
  ): void;
3376
3376
  /**
3377
3377
  * Computes the Diffie-Hellman secret based on a `privateKey` and a `publicKey`.
3378
- * Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'`(for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES).
3378
+ * Both keys must have the same `asymmetricKeyType`, which must be one of `'dh'` (for Diffie-Hellman), `'ec'` (for ECDH), `'x448'`, or `'x25519'` (for ECDH-ES).
3379
3379
  * @since v13.9.0, v12.17.0
3380
3380
  */
3381
3381
  function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer;
@@ -3466,9 +3466,9 @@ declare module "crypto" {
3466
3466
  */
3467
3467
  function getCipherInfo(nameOrNid: string | number, options?: CipherInfoOptions): CipherInfo | undefined;
3468
3468
  /**
3469
- * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`,`salt` and `info` are used with the `digest` to derive a key of `keylen` bytes.
3469
+ * HKDF is a simple key derivation function defined in RFC 5869\. The given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes.
3470
3470
  *
3471
- * The supplied `callback` function is called with two arguments: `err` and`derivedKey`. If an errors occurs while deriving the key, `err` will be set;
3471
+ * The supplied `callback` function is called with two arguments: `err` and `derivedKey`. If an errors occurs while deriving the key, `err` will be set;
3472
3472
  * otherwise `err` will be `null`. The successfully generated `derivedKey` will
3473
3473
  * 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
3474
3474
  * of the input arguments specify invalid values or types.
@@ -3502,7 +3502,7 @@ declare module "crypto" {
3502
3502
  ): void;
3503
3503
  /**
3504
3504
  * Provides a synchronous HKDF key derivation function as defined in RFC 5869\. The
3505
- * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of`keylen` bytes.
3505
+ * given `ikm`, `salt` and `info` are used with the `digest` to derive a key of `keylen` bytes.
3506
3506
  *
3507
3507
  * The successfully generated `derivedKey` will be returned as an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer).
3508
3508
  *
@@ -3831,7 +3831,7 @@ declare module "crypto" {
3831
3831
  /**
3832
3832
  * Generates a pseudorandom prime of `size` bits.
3833
3833
  *
3834
- * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime.
3834
+ * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime.
3835
3835
  *
3836
3836
  * The `options.add` and `options.rem` parameters can be used to enforce additional
3837
3837
  * requirements, e.g., for Diffie-Hellman:
@@ -3847,7 +3847,7 @@ declare module "crypto" {
3847
3847
  * * `options.rem` is ignored if `options.add` is not given.
3848
3848
  *
3849
3849
  * Both `options.add` and `options.rem` must be encoded as big-endian sequences
3850
- * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
3850
+ * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`.
3851
3851
  *
3852
3852
  * By default, the prime is encoded as a big-endian sequence of octets
3853
3853
  * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
@@ -3874,7 +3874,7 @@ declare module "crypto" {
3874
3874
  /**
3875
3875
  * Generates a pseudorandom prime of `size` bits.
3876
3876
  *
3877
- * If `options.safe` is `true`, the prime will be a safe prime -- that is,`(prime - 1) / 2` will also be a prime.
3877
+ * If `options.safe` is `true`, the prime will be a safe prime -- that is, `(prime - 1) / 2` will also be a prime.
3878
3878
  *
3879
3879
  * The `options.add` and `options.rem` parameters can be used to enforce additional
3880
3880
  * requirements, e.g., for Diffie-Hellman:
@@ -3890,7 +3890,7 @@ declare module "crypto" {
3890
3890
  * * `options.rem` is ignored if `options.add` is not given.
3891
3891
  *
3892
3892
  * Both `options.add` and `options.rem` must be encoded as big-endian sequences
3893
- * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or`DataView`.
3893
+ * if given as an `ArrayBuffer`, `SharedArrayBuffer`, `TypedArray`, `Buffer`, or `DataView`.
3894
3894
  *
3895
3895
  * By default, the prime is encoded as a big-endian sequence of octets
3896
3896
  * in an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer). If the `bigint` option is `true`, then a
@@ -3936,7 +3936,7 @@ declare module "crypto" {
3936
3936
  *
3937
3937
  * `engine` could be either an id or a path to the engine's shared library.
3938
3938
  *
3939
- * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. The `flags`is a bit field taking one of or a mix of the following flags (defined in`crypto.constants`):
3939
+ * The optional `flags` argument uses `ENGINE_METHOD_ALL` by default. The `flags` is a bit field taking one of or a mix of the following flags (defined in `crypto.constants`):
3940
3940
  *
3941
3941
  * * `crypto.constants.ENGINE_METHOD_RSA`
3942
3942
  * * `crypto.constants.ENGINE_METHOD_DSA`
node/dgram.d.ts CHANGED
@@ -276,7 +276,7 @@ declare module "dgram" {
276
276
  *
277
277
  * The `address` argument is a string. If the value of `address` is a host name,
278
278
  * DNS will be used to resolve the address of the host. If `address` is not
279
- * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'`(for `udp6` sockets) will be used by default.
279
+ * provided or otherwise nullish, `'127.0.0.1'` (for `udp4` sockets) or `'::1'` (for `udp6` sockets) will be used by default.
280
280
  *
281
281
  * If the socket has not been previously bound with a call to `bind`, the socket
282
282
  * is assigned a random port number and is bound to the "all interfaces" address
node/http.d.ts CHANGED
@@ -1425,7 +1425,7 @@ declare module "http" {
1425
1425
  * });
1426
1426
  * ```
1427
1427
  *
1428
- * An agent may also be used for an individual request. By providing `{agent: false}` as an option to the `http.get()` or `http.request()`functions, a one-time use `Agent` with default options
1428
+ * An agent may also be used for an individual request. By providing `{agent: false}` as an option to the `http.get()` or `http.request()` functions, a one-time use `Agent` with default options
1429
1429
  * will be used
1430
1430
  * for the client connection.
1431
1431
  *
node/https.d.ts CHANGED
@@ -324,8 +324,8 @@ declare module "https" {
324
324
  /**
325
325
  * Makes a request to a secure web server.
326
326
  *
327
- * The following additional `options` from `tls.connect()` are also accepted:`ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`,`honorCipherOrder`, `key`, `passphrase`,
328
- * `pfx`, `rejectUnauthorized`,`secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`,`highWaterMark`.
327
+ * The following additional `options` from `tls.connect()` are also accepted: `ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`, `honorCipherOrder`, `key`, `passphrase`,
328
+ * `pfx`, `rejectUnauthorized`, `secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`, `highWaterMark`.
329
329
  *
330
330
  * `options` can be an object, a string, or a `URL` object. If `options` is a
331
331
  * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
node/net.d.ts CHANGED
@@ -278,7 +278,7 @@ declare module "net" {
278
278
  */
279
279
  readonly bytesWritten: number;
280
280
  /**
281
- * If `true`,`socket.connect(options[, connectListener])` was
281
+ * If `true`, `socket.connect(options[, connectListener])` was
282
282
  * called and has not yet finished. It will stay `true` until the socket becomes
283
283
  * connected, then it is set to `false` and the `'connect'` event is emitted. Note
284
284
  * that the `socket.connect(options[, connectListener])` callback is a listener for the `'connect'` event.
node/os.d.ts CHANGED
@@ -417,7 +417,7 @@ declare module "os" {
417
417
  const EOL: string;
418
418
  /**
419
419
  * Returns the operating system CPU architecture for which the Node.js binary was
420
- * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`,`'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`,
420
+ * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`,
421
421
  * and `'x64'`.
422
422
  *
423
423
  * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v20.x/api/process.html#processarch).
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.13.0",
3
+ "version": "20.14.0",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -212,6 +212,6 @@
212
212
  "dependencies": {
213
213
  "undici-types": "~5.26.4"
214
214
  },
215
- "typesPublisherContentHash": "8ba5089e5963695bf9e7fca8c31ce3f7c0fc5f4faa573ff0e2865b6c2836613f",
215
+ "typesPublisherContentHash": "617b5661e3a7308e9f83ded9bbc7e6976f0ac4422f8b246b4dbca9a6e5f2e30a",
216
216
  "typeScriptVersion": "4.7"
217
217
  }
node/perf_hooks.d.ts CHANGED
@@ -506,7 +506,7 @@ declare module "perf_hooks" {
506
506
  */
507
507
  disconnect(): void;
508
508
  /**
509
- * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes`or `options.type`:
509
+ * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes` or `options.type`:
510
510
  *
511
511
  * ```js
512
512
  * const {
node/process.d.ts CHANGED
@@ -1242,7 +1242,7 @@ declare module "process" {
1242
1242
  title: string;
1243
1243
  /**
1244
1244
  * The operating system CPU architecture for which the Node.js binary was compiled.
1245
- * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`.
1245
+ * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`.
1246
1246
  *
1247
1247
  * ```js
1248
1248
  * import { arch } from 'node:process';
node/repl.d.ts CHANGED
@@ -251,7 +251,7 @@ declare module "repl" {
251
251
  private constructor();
252
252
  /**
253
253
  * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands
254
- * to the REPL instance. Such commands are invoked by typing a `.` followed by the`keyword`. The `cmd` is either a `Function` or an `Object` with the following
254
+ * to the REPL instance. Such commands are invoked by typing a `.` followed by the `keyword`. The `cmd` is either a `Function` or an `Object` with the following
255
255
  * properties:
256
256
  *
257
257
  * The following example shows two new commands added to the REPL instance:
@@ -289,7 +289,7 @@ declare module "repl" {
289
289
  defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void;
290
290
  /**
291
291
  * The `replServer.displayPrompt()` method readies the REPL instance for input
292
- * from the user, printing the configured `prompt` to a new line in the `output`and resuming the `input` to accept new input.
292
+ * from the user, printing the configured `prompt` to a new line in the `output` and resuming the `input` to accept new input.
293
293
  *
294
294
  * When multi-line input is being entered, an ellipsis is printed rather than the
295
295
  * 'prompt'.
@@ -304,7 +304,7 @@ declare module "repl" {
304
304
  /**
305
305
  * The `replServer.clearBufferedCommand()` method clears any command that has been
306
306
  * buffered but not yet executed. This method is primarily intended to be
307
- * called from within the action function for commands registered using the`replServer.defineCommand()` method.
307
+ * called from within the action function for commands registered using the `replServer.defineCommand()` method.
308
308
  * @since v9.0.0
309
309
  */
310
310
  clearBufferedCommand(): void;
node/test.d.ts CHANGED
@@ -299,49 +299,57 @@ declare module "node:test" {
299
299
  }
300
300
  interface RunOptions {
301
301
  /**
302
- * If a number is provided, then that many files would run in parallel.
303
- * If truthy, it would run (number of cpu cores - 1) files in parallel.
304
- * If falsy, it would only run one file at a time.
305
- * If unspecified, subtests inherit this value from their parent.
306
- * @default true
302
+ * If a number is provided, then that many test processes would run in parallel, where each process corresponds to one test file.
303
+ * If `true`, it would run `os.availableParallelism() - 1` test files in parallel. If `false`, it would only run one test file at a time.
304
+ * @default false
307
305
  */
308
306
  concurrency?: number | boolean | undefined;
309
307
  /**
310
- * An array containing the list of files to run.
311
- * If unspecified, the test runner execution model will be used.
308
+ * An array containing the list of files to run. **Default** matching files from
309
+ * [test runner execution model](https://nodejs.org/docs/latest-v20.x/api/test.html#test-runner-execution-model).
312
310
  */
313
311
  files?: readonly string[] | undefined;
314
312
  /**
315
- * Allows aborting an in-progress test execution.
316
- * @default undefined
317
- */
318
- signal?: AbortSignal | undefined;
319
- /**
320
- * A number of milliseconds the test will fail after.
321
- * If unspecified, subtests inherit this value from their parent.
322
- * @default Infinity
313
+ * Configures the test runner to exit the process once all known
314
+ * tests have finished executing even if the event loop would
315
+ * otherwise remain active.
316
+ * @default false
323
317
  */
324
- timeout?: number | undefined;
318
+ forceExit?: boolean | undefined;
325
319
  /**
326
320
  * Sets inspector port of test child process.
327
321
  * If a nullish value is provided, each process gets its own port,
328
322
  * incremented from the primary's `process.debugPort`.
323
+ * @default undefined
329
324
  */
330
325
  inspectPort?: number | (() => number) | undefined;
331
- /**
332
- * That can be used to only run tests whose name matches the provided pattern.
333
- * Test name patterns are interpreted as JavaScript regular expressions.
334
- * For each test that is executed, any corresponding test hooks, such as `beforeEach()`, are also run.
335
- */
336
- testNamePatterns?: string | RegExp | string[] | RegExp[];
337
326
  /**
338
327
  * If truthy, the test context will only run tests that have the `only` option set
339
328
  */
340
329
  only?: boolean;
341
330
  /**
342
- * A function that accepts the TestsStream instance and can be used to setup listeners before any tests are run.
331
+ * A function that accepts the `TestsStream` instance and can be used to setup listeners before any tests are run.
332
+ * @default undefined
343
333
  */
344
334
  setup?: (root: Test) => void | Promise<void>;
335
+ /**
336
+ * Allows aborting an in-progress test execution.
337
+ */
338
+ signal?: AbortSignal | undefined;
339
+ /**
340
+ * A String, RegExp or a RegExp Array, that can be used to only run tests whose
341
+ * name matches the provided pattern. Test name patterns are interpreted as JavaScript
342
+ * regular expressions. For each test that is executed, any corresponding test hooks,
343
+ * such as `beforeEach()`, are also run.
344
+ * @default undefined
345
+ */
346
+ testNamePatterns?: string | RegExp | string[] | RegExp[];
347
+ /**
348
+ * A number of milliseconds the test execution will fail after.
349
+ * If unspecified, subtests inherit this value from their parent.
350
+ * @default Infinity
351
+ */
352
+ timeout?: number | undefined;
345
353
  /**
346
354
  * Whether to run in watch mode or not.
347
355
  * @default false