@types/node 16.7.5 → 16.7.9

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,9 +8,9 @@ This package contains type definitions for Node.js (http://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: Sat, 28 Aug 2021 22:01:27 GMT
11
+ * Last updated: Tue, 31 Aug 2021 17:01:26 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
14
14
 
15
15
  # Credits
16
- These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), and [Linus Unnebäck](https://github.com/LinusU).
16
+ These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), and [Linus Unnebäck](https://github.com/LinusU).
node/crypto.d.ts CHANGED
@@ -2207,7 +2207,7 @@ declare module 'crypto' {
2207
2207
  function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
2208
2208
  /** @deprecated since v10.0.0 */
2209
2209
  const DEFAULT_ENCODING: BufferEncoding;
2210
- type KeyType = 'rsa' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
2210
+ type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
2211
2211
  type KeyFormat = 'pem' | 'der';
2212
2212
  interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
2213
2213
  format: T;
@@ -2238,6 +2238,16 @@ declare module 'crypto' {
2238
2238
  */
2239
2239
  publicExponent?: number | undefined;
2240
2240
  }
2241
+ interface RSAPSSKeyPairKeyObjectOptions {
2242
+ /**
2243
+ * Key size in bits
2244
+ */
2245
+ modulusLength: number;
2246
+ /**
2247
+ * @default 0x10001
2248
+ */
2249
+ publicExponent?: number | undefined;
2250
+ }
2241
2251
  interface DSAKeyPairKeyObjectOptions {
2242
2252
  /**
2243
2253
  * Key size in bits
@@ -2265,6 +2275,23 @@ declare module 'crypto' {
2265
2275
  type: 'pkcs1' | 'pkcs8';
2266
2276
  };
2267
2277
  }
2278
+ interface RSAPSSKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2279
+ /**
2280
+ * Key size in bits
2281
+ */
2282
+ modulusLength: number;
2283
+ /**
2284
+ * @default 0x10001
2285
+ */
2286
+ publicExponent?: number | undefined;
2287
+ publicKeyEncoding: {
2288
+ type: 'spki';
2289
+ format: PubF;
2290
+ };
2291
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2292
+ type: 'pkcs8';
2293
+ };
2294
+ }
2268
2295
  interface DSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2269
2296
  /**
2270
2297
  * Key size in bits
@@ -2374,13 +2401,18 @@ declare module 'crypto' {
2374
2401
  * When PEM encoding was selected, the respective key will be a string, otherwise
2375
2402
  * it will be a buffer containing the data encoded as DER.
2376
2403
  * @since v10.12.0
2377
- * @param type Must be `'rsa'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
2404
+ * @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
2378
2405
  */
2379
2406
  function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2380
2407
  function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2381
2408
  function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2382
2409
  function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2383
2410
  function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2411
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2412
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2413
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
2414
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
2415
+ function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2384
2416
  function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
2385
2417
  function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
2386
2418
  function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
@@ -2455,6 +2487,11 @@ declare module 'crypto' {
2455
2487
  function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2456
2488
  function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2457
2489
  function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2490
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2491
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2492
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
2493
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
2494
+ function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
2458
2495
  function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
2459
2496
  function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
2460
2497
  function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
@@ -2515,6 +2552,35 @@ declare module 'crypto' {
2515
2552
  privateKey: Buffer;
2516
2553
  }>;
2517
2554
  function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
2555
+ function __promisify__(
2556
+ type: 'rsa-pss',
2557
+ options: RSAPSSKeyPairOptions<'pem', 'pem'>
2558
+ ): Promise<{
2559
+ publicKey: string;
2560
+ privateKey: string;
2561
+ }>;
2562
+ function __promisify__(
2563
+ type: 'rsa-pss',
2564
+ options: RSAPSSKeyPairOptions<'pem', 'der'>
2565
+ ): Promise<{
2566
+ publicKey: string;
2567
+ privateKey: Buffer;
2568
+ }>;
2569
+ function __promisify__(
2570
+ type: 'rsa-pss',
2571
+ options: RSAPSSKeyPairOptions<'der', 'pem'>
2572
+ ): Promise<{
2573
+ publicKey: Buffer;
2574
+ privateKey: string;
2575
+ }>;
2576
+ function __promisify__(
2577
+ type: 'rsa-pss',
2578
+ options: RSAPSSKeyPairOptions<'der', 'der'>
2579
+ ): Promise<{
2580
+ publicKey: Buffer;
2581
+ privateKey: Buffer;
2582
+ }>;
2583
+ function __promisify__(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
2518
2584
  function __promisify__(
2519
2585
  type: 'dsa',
2520
2586
  options: DSAKeyPairOptions<'pem', 'pem'>
node/fs.d.ts CHANGED
@@ -188,7 +188,7 @@ declare module 'fs' {
188
188
  /**
189
189
  * A class representing a directory stream.
190
190
  *
191
- * Created by {@link opendir}, {@link opendirSync}, or {@link promises.opendir}.
191
+ * Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`.
192
192
  *
193
193
  * ```js
194
194
  * import { opendir } from 'fs/promises';
@@ -208,7 +208,7 @@ declare module 'fs' {
208
208
  */
209
209
  export class Dir implements AsyncIterable<Dirent> {
210
210
  /**
211
- * The read-only path of this directory as was provided to {@link opendir}, {@link opendirSync}, or {@link promises.opendir}.
211
+ * The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`.
212
212
  * @since v12.12.0
213
213
  */
214
214
  readonly path: string;
node/http2.d.ts CHANGED
@@ -1714,7 +1714,7 @@ declare module 'http2' {
1714
1714
  writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this;
1715
1715
  writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this;
1716
1716
  /**
1717
- * Call {@link tream.pushStream} with the given headers, and wrap the
1717
+ * Call `http2stream.pushStream()` with the given headers, and wrap the
1718
1718
  * given `Http2Stream` on a newly created `Http2ServerResponse` as the callback
1719
1719
  * parameter if successful. When `Http2ServerRequest` is closed, the callback is
1720
1720
  * called with an error `ERR_HTTP2_INVALID_STREAM`.
node/index.d.ts CHANGED
@@ -11,7 +11,6 @@
11
11
  // Deividas Bakanas <https://github.com/DeividasBakanas>
12
12
  // Eugene Y. Q. Shen <https://github.com/eyqs>
13
13
  // Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
14
- // Hoàng Văn Khải <https://github.com/KSXGitHub>
15
14
  // Huw <https://github.com/hoo29>
16
15
  // Kelvin Jin <https://github.com/kjin>
17
16
  // Klaus Meinhardt <https://github.com/ajafff>
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "16.7.5",
3
+ "version": "16.7.9",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -60,11 +60,6 @@
60
60
  "url": "https://github.com/Hannes-Magnusson-CK",
61
61
  "githubUsername": "Hannes-Magnusson-CK"
62
62
  },
63
- {
64
- "name": "Hoàng Văn Khải",
65
- "url": "https://github.com/KSXGitHub",
66
- "githubUsername": "KSXGitHub"
67
- },
68
63
  {
69
64
  "name": "Huw",
70
65
  "url": "https://github.com/hoo29",
@@ -230,6 +225,6 @@
230
225
  },
231
226
  "scripts": {},
232
227
  "dependencies": {},
233
- "typesPublisherContentHash": "670f012e9875deb3f4d2443913edfd5edd1d4e5d58720d42898cdb89c1915842",
228
+ "typesPublisherContentHash": "99d4d16c1290c51297a1ce826becf8f1271f8ddbeb981ab3241ed7c24796fb2f",
234
229
  "typeScriptVersion": "3.7"
235
230
  }
@@ -11,7 +11,6 @@ interface Blob {
11
11
  stream(): NodeJS.ReadableStream;
12
12
  text(): Promise<string>;
13
13
  }
14
-
15
14
  declare module 'stream/consumers' {
16
15
  import { Readable } from 'node:stream';
17
16
  function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;
node/tls.d.ts CHANGED
@@ -160,9 +160,10 @@ declare module 'tls' {
160
160
  encrypted: boolean;
161
161
  /**
162
162
  * String containing the selected ALPN protocol.
163
- * When ALPN has no selected protocol, tlsSocket.alpnProtocol equals false.
163
+ * Before a handshake has completed, this value is always null.
164
+ * When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false.
164
165
  */
165
- alpnProtocol?: string | undefined;
166
+ alpnProtocol: string | false | null;
166
167
  /**
167
168
  * Returns an object representing the local certificate. The returned object has
168
169
  * some properties corresponding to the fields of the certificate.
node/url.d.ts CHANGED
@@ -697,7 +697,7 @@ declare module 'url' {
697
697
  * Returns an ES6 `Iterator` over each of the name-value pairs in the query.
698
698
  * Each item of the iterator is a JavaScript `Array`. The first item of the `Array`is the `name`, the second item of the `Array` is the `value`.
699
699
  *
700
- * Alias for {@link earchParams[@@iterator]}.
700
+ * Alias for `urlSearchParams[@@iterator]()`.
701
701
  */
702
702
  entries(): IterableIterator<[string, string]>;
703
703
  /**