@types/node 12.19.7 → 12.19.11

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 v12.19/README.md CHANGED
@@ -8,7 +8,7 @@ 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/v12.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 25 Nov 2020 06:26:18 GMT
11
+ * Last updated: Wed, 23 Dec 2020 20:23:24 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Buffer`, `NodeJS`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
14
 
node v12.19/assert.d.ts CHANGED
@@ -15,6 +15,7 @@ declare module 'assert' {
15
15
  actual?: any;
16
16
  expected?: any;
17
17
  operator?: string;
18
+ // tslint:disable-next-line:ban-types
18
19
  stackStartFn?: Function;
19
20
  });
20
21
  }
@@ -37,6 +38,8 @@ declare module 'assert' {
37
38
  stack: object;
38
39
  }
39
40
 
41
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
42
+
40
43
  function fail(message?: string | Error): never;
41
44
  /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
42
45
  function fail(
@@ -44,6 +47,7 @@ declare module 'assert' {
44
47
  expected: any,
45
48
  message?: string | Error,
46
49
  operator?: string,
50
+ // tslint:disable-next-line:ban-types
47
51
  stackStartFn?: Function,
48
52
  ): never;
49
53
  function ok(value: any, message?: string | Error): asserts value;
@@ -61,22 +65,22 @@ declare module 'assert' {
61
65
  function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
62
66
 
63
67
  function throws(block: () => any, message?: string | Error): void;
64
- function throws(block: () => any, error: RegExp | Function | Object | Error, message?: string | Error): void;
68
+ function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
65
69
  function doesNotThrow(block: () => any, message?: string | Error): void;
66
- function doesNotThrow(block: () => any, error: RegExp | Function, message?: string | Error): void;
70
+ function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
67
71
 
68
72
  function ifError(value: any): asserts value is null | undefined;
69
73
 
70
74
  function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
71
75
  function rejects(
72
76
  block: (() => Promise<any>) | Promise<any>,
73
- error: RegExp | Function | Object | Error,
77
+ error: AssertPredicate,
74
78
  message?: string | Error,
75
79
  ): Promise<void>;
76
80
  function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
77
81
  function doesNotReject(
78
82
  block: (() => Promise<any>) | Promise<any>,
79
- error: RegExp | Function,
83
+ error: AssertPredicate,
80
84
  message?: string | Error,
81
85
  ): Promise<void>;
82
86
 
node v12.19/crypto.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- declare module "crypto" {
2
- import * as stream from "stream";
1
+ declare module 'crypto' {
2
+ import * as stream from 'stream';
3
3
 
4
4
  interface Certificate {
5
5
  exportChallenge(spkac: BinaryLike): Buffer;
@@ -7,11 +7,12 @@ declare module "crypto" {
7
7
  verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
8
8
  }
9
9
  const Certificate: {
10
- new(): Certificate;
10
+ new (): Certificate;
11
11
  (): Certificate;
12
12
  };
13
13
 
14
- namespace constants { // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants
14
+ namespace constants {
15
+ // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants
15
16
  const OPENSSL_VERSION_NUMBER: number;
16
17
 
17
18
  /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
@@ -120,11 +121,11 @@ declare module "crypto" {
120
121
  function createHash(algorithm: string, options?: HashOptions): Hash;
121
122
  function createHmac(algorithm: string, key: BinaryLike, options?: stream.TransformOptions): Hmac;
122
123
 
123
- type Utf8AsciiLatin1Encoding = "utf8" | "ascii" | "latin1";
124
- type HexBase64Latin1Encoding = "latin1" | "hex" | "base64";
125
- type Utf8AsciiBinaryEncoding = "utf8" | "ascii" | "binary";
126
- type HexBase64BinaryEncoding = "binary" | "base64" | "hex";
127
- type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";
124
+ type Utf8AsciiLatin1Encoding = 'utf8' | 'ascii' | 'latin1';
125
+ type HexBase64Latin1Encoding = 'latin1' | 'hex' | 'base64';
126
+ type Utf8AsciiBinaryEncoding = 'utf8' | 'ascii' | 'binary';
127
+ type HexBase64BinaryEncoding = 'binary' | 'base64' | 'hex';
128
+ type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
128
129
 
129
130
  class Hash extends stream.Transform {
130
131
  private constructor();
@@ -188,24 +189,35 @@ declare module "crypto" {
188
189
  algorithm: CipherCCMTypes,
189
190
  key: CipherKey,
190
191
  iv: BinaryLike | null,
191
- options: CipherCCMOptions
192
+ options: CipherCCMOptions,
192
193
  ): CipherCCM;
193
194
  function createCipheriv(
194
195
  algorithm: CipherGCMTypes,
195
196
  key: CipherKey,
196
197
  iv: BinaryLike | null,
197
- options?: CipherGCMOptions
198
+ options?: CipherGCMOptions,
198
199
  ): CipherGCM;
199
200
  function createCipheriv(
200
- algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions
201
+ algorithm: string,
202
+ key: CipherKey,
203
+ iv: BinaryLike | null,
204
+ options?: stream.TransformOptions,
201
205
  ): Cipher;
202
206
 
203
207
  class Cipher extends stream.Transform {
204
208
  private constructor();
205
209
  update(data: BinaryLike): Buffer;
206
210
  update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer;
207
- update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: HexBase64BinaryEncoding): string;
208
- update(data: string, input_encoding: Utf8AsciiBinaryEncoding | undefined, output_encoding: HexBase64BinaryEncoding): string;
211
+ update(
212
+ data: NodeJS.ArrayBufferView,
213
+ input_encoding: undefined,
214
+ output_encoding: HexBase64BinaryEncoding,
215
+ ): string;
216
+ update(
217
+ data: string,
218
+ input_encoding: Utf8AsciiBinaryEncoding | undefined,
219
+ output_encoding: HexBase64BinaryEncoding,
220
+ ): string;
209
221
  final(): Buffer;
210
222
  final(output_encoding: string): string;
211
223
  setAutoPadding(auto_padding?: boolean): this;
@@ -239,14 +251,27 @@ declare module "crypto" {
239
251
  iv: BinaryLike | null,
240
252
  options?: CipherGCMOptions,
241
253
  ): DecipherGCM;
242
- function createDecipheriv(algorithm: string, key: BinaryLike, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
254
+ function createDecipheriv(
255
+ algorithm: string,
256
+ key: BinaryLike,
257
+ iv: BinaryLike | null,
258
+ options?: stream.TransformOptions,
259
+ ): Decipher;
243
260
 
244
261
  class Decipher extends stream.Transform {
245
262
  private constructor();
246
263
  update(data: NodeJS.ArrayBufferView): Buffer;
247
264
  update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer;
248
- update(data: NodeJS.ArrayBufferView, input_encoding: HexBase64BinaryEncoding | undefined, output_encoding: Utf8AsciiBinaryEncoding): string;
249
- update(data: string, input_encoding: HexBase64BinaryEncoding | undefined, output_encoding: Utf8AsciiBinaryEncoding): string;
265
+ update(
266
+ data: NodeJS.ArrayBufferView,
267
+ input_encoding: HexBase64BinaryEncoding | undefined,
268
+ output_encoding: Utf8AsciiBinaryEncoding,
269
+ ): string;
270
+ update(
271
+ data: string,
272
+ input_encoding: HexBase64BinaryEncoding | undefined,
273
+ output_encoding: Utf8AsciiBinaryEncoding,
274
+ ): string;
250
275
  final(): Buffer;
251
276
  final(output_encoding: string): string;
252
277
  setAutoPadding(auto_padding?: boolean): this;
@@ -292,13 +317,11 @@ declare module "crypto" {
292
317
  dsaEncoding?: DSAEncoding;
293
318
  }
294
319
 
295
- interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {
296
- }
320
+ interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
297
321
  interface SignKeyObjectInput extends SigningOptions {
298
322
  key: KeyObject;
299
323
  }
300
- interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {
301
- }
324
+ interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {}
302
325
  interface VerifyKeyObjectInput extends SigningOptions {
303
326
  key: KeyObject;
304
327
  }
@@ -311,7 +334,10 @@ declare module "crypto" {
311
334
  update(data: BinaryLike): Signer;
312
335
  update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer;
313
336
  sign(private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
314
- sign(private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, output_format: HexBase64Latin1Encoding): string;
337
+ sign(
338
+ private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
339
+ output_format: HexBase64Latin1Encoding,
340
+ ): string;
315
341
  }
316
342
 
317
343
  function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
@@ -320,16 +346,32 @@ declare module "crypto" {
320
346
 
321
347
  update(data: BinaryLike): Verify;
322
348
  update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Verify;
323
- verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
324
- verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: string, signature_format?: HexBase64Latin1Encoding): boolean;
349
+ verify(
350
+ object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
351
+ signature: NodeJS.ArrayBufferView,
352
+ ): boolean;
353
+ verify(
354
+ object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
355
+ signature: string,
356
+ signature_format?: HexBase64Latin1Encoding,
357
+ ): boolean;
325
358
  // https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format
326
359
  // The signature field accepts a TypedArray type, but it is only available starting ES2017
327
360
  }
328
361
  function createDiffieHellman(prime_length: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman;
329
362
  function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman;
330
363
  function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman;
331
- function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | NodeJS.ArrayBufferView): DiffieHellman;
332
- function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman;
364
+ function createDiffieHellman(
365
+ prime: string,
366
+ prime_encoding: HexBase64Latin1Encoding,
367
+ generator: number | NodeJS.ArrayBufferView,
368
+ ): DiffieHellman;
369
+ function createDiffieHellman(
370
+ prime: string,
371
+ prime_encoding: HexBase64Latin1Encoding,
372
+ generator: string,
373
+ generator_encoding: HexBase64Latin1Encoding,
374
+ ): DiffieHellman;
333
375
  class DiffieHellman {
334
376
  private constructor();
335
377
  generateKeys(): Buffer;
@@ -337,7 +379,11 @@ declare module "crypto" {
337
379
  computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
338
380
  computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer;
339
381
  computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: HexBase64Latin1Encoding): string;
340
- computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string;
382
+ computeSecret(
383
+ other_public_key: string,
384
+ input_encoding: HexBase64Latin1Encoding,
385
+ output_encoding: HexBase64Latin1Encoding,
386
+ ): string;
341
387
  getPrime(): Buffer;
342
388
  getPrime(encoding: HexBase64Latin1Encoding): string;
343
389
  getGenerator(): Buffer;
@@ -361,7 +407,13 @@ declare module "crypto" {
361
407
  digest: string,
362
408
  callback: (err: Error | null, derivedKey: Buffer) => any,
363
409
  ): void;
364
- function pbkdf2Sync(password: BinaryLike, salt: BinaryLike, iterations: number, keylen: number, digest: string): Buffer;
410
+ function pbkdf2Sync(
411
+ password: BinaryLike,
412
+ salt: BinaryLike,
413
+ iterations: number,
414
+ keylen: number,
415
+ digest: string,
416
+ ): Buffer;
365
417
 
366
418
  function randomBytes(size: number): Buffer;
367
419
  function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
@@ -374,11 +426,26 @@ declare module "crypto" {
374
426
  function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
375
427
 
376
428
  function randomFillSync<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number, size?: number): T;
377
- function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, callback: (err: Error | null, buf: T) => void): void;
378
- function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void;
379
- function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void;
429
+ function randomFill<T extends NodeJS.ArrayBufferView>(
430
+ buffer: T,
431
+ callback: (err: Error | null, buf: T) => void,
432
+ ): void;
433
+ function randomFill<T extends NodeJS.ArrayBufferView>(
434
+ buffer: T,
435
+ offset: number,
436
+ callback: (err: Error | null, buf: T) => void,
437
+ ): void;
438
+ function randomFill<T extends NodeJS.ArrayBufferView>(
439
+ buffer: T,
440
+ offset: number,
441
+ size: number,
442
+ callback: (err: Error | null, buf: T) => void,
443
+ ): void;
380
444
 
381
445
  interface ScryptOptions {
446
+ cost?: number;
447
+ blockSize?: number;
448
+ parallelization?: number;
382
449
  N?: number;
383
450
  r?: number;
384
451
  p?: number;
@@ -387,7 +454,8 @@ declare module "crypto" {
387
454
  function scrypt(
388
455
  password: BinaryLike,
389
456
  salt: BinaryLike,
390
- keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void,
457
+ keylen: number,
458
+ callback: (err: Error | null, derivedKey: Buffer) => void,
391
459
  ): void;
392
460
  function scrypt(
393
461
  password: BinaryLike,
@@ -426,15 +494,19 @@ declare module "crypto" {
426
494
  key: BinaryLike,
427
495
  curve: string,
428
496
  inputEncoding?: HexBase64Latin1Encoding,
429
- outputEncoding?: "latin1" | "hex" | "base64",
430
- format?: "uncompressed" | "compressed" | "hybrid",
497
+ outputEncoding?: 'latin1' | 'hex' | 'base64',
498
+ format?: 'uncompressed' | 'compressed' | 'hybrid',
431
499
  ): Buffer | string;
432
500
  generateKeys(): Buffer;
433
501
  generateKeys(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string;
434
502
  computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
435
503
  computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer;
436
504
  computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: HexBase64Latin1Encoding): string;
437
- computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string;
505
+ computeSecret(
506
+ other_public_key: string,
507
+ input_encoding: HexBase64Latin1Encoding,
508
+ output_encoding: HexBase64Latin1Encoding,
509
+ ): string;
438
510
  getPrivateKey(): Buffer;
439
511
  getPrivateKey(encoding: HexBase64Latin1Encoding): string;
440
512
  getPublicKey(): Buffer;
@@ -474,15 +546,15 @@ declare module "crypto" {
474
546
  }
475
547
 
476
548
  interface X25519KeyPairKeyObjectOptions {
477
- /**
478
- * No options.
479
- */
549
+ /**
550
+ * No options.
551
+ */
480
552
  }
481
553
 
482
554
  interface X448KeyPairKeyObjectOptions {
483
- /**
484
- * No options.
485
- */
555
+ /**
556
+ * No options.
557
+ */
486
558
  }
487
559
 
488
560
  interface ECKeyPairKeyObjectOptions {
@@ -614,132 +686,446 @@ declare module "crypto" {
614
686
  privateKey: T2;
615
687
  }
616
688
 
617
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
618
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
619
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
620
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
689
+ function generateKeyPairSync(
690
+ type: 'rsa',
691
+ options: RSAKeyPairOptions<'pem', 'pem'>,
692
+ ): KeyPairSyncResult<string, string>;
693
+ function generateKeyPairSync(
694
+ type: 'rsa',
695
+ options: RSAKeyPairOptions<'pem', 'der'>,
696
+ ): KeyPairSyncResult<string, Buffer>;
697
+ function generateKeyPairSync(
698
+ type: 'rsa',
699
+ options: RSAKeyPairOptions<'der', 'pem'>,
700
+ ): KeyPairSyncResult<Buffer, string>;
701
+ function generateKeyPairSync(
702
+ type: 'rsa',
703
+ options: RSAKeyPairOptions<'der', 'der'>,
704
+ ): KeyPairSyncResult<Buffer, Buffer>;
621
705
  function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
622
706
 
623
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
624
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
625
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
626
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
707
+ function generateKeyPairSync(
708
+ type: 'dsa',
709
+ options: DSAKeyPairOptions<'pem', 'pem'>,
710
+ ): KeyPairSyncResult<string, string>;
711
+ function generateKeyPairSync(
712
+ type: 'dsa',
713
+ options: DSAKeyPairOptions<'pem', 'der'>,
714
+ ): KeyPairSyncResult<string, Buffer>;
715
+ function generateKeyPairSync(
716
+ type: 'dsa',
717
+ options: DSAKeyPairOptions<'der', 'pem'>,
718
+ ): KeyPairSyncResult<Buffer, string>;
719
+ function generateKeyPairSync(
720
+ type: 'dsa',
721
+ options: DSAKeyPairOptions<'der', 'der'>,
722
+ ): KeyPairSyncResult<Buffer, Buffer>;
627
723
  function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
628
724
 
629
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
630
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
631
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
632
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
725
+ function generateKeyPairSync(
726
+ type: 'ec',
727
+ options: ECKeyPairOptions<'pem', 'pem'>,
728
+ ): KeyPairSyncResult<string, string>;
729
+ function generateKeyPairSync(
730
+ type: 'ec',
731
+ options: ECKeyPairOptions<'pem', 'der'>,
732
+ ): KeyPairSyncResult<string, Buffer>;
733
+ function generateKeyPairSync(
734
+ type: 'ec',
735
+ options: ECKeyPairOptions<'der', 'pem'>,
736
+ ): KeyPairSyncResult<Buffer, string>;
737
+ function generateKeyPairSync(
738
+ type: 'ec',
739
+ options: ECKeyPairOptions<'der', 'der'>,
740
+ ): KeyPairSyncResult<Buffer, Buffer>;
633
741
  function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
634
742
 
635
- function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
636
- function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
637
- function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
638
- function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
743
+ function generateKeyPairSync(
744
+ type: 'ed25519',
745
+ options: ED25519KeyPairOptions<'pem', 'pem'>,
746
+ ): KeyPairSyncResult<string, string>;
747
+ function generateKeyPairSync(
748
+ type: 'ed25519',
749
+ options: ED25519KeyPairOptions<'pem', 'der'>,
750
+ ): KeyPairSyncResult<string, Buffer>;
751
+ function generateKeyPairSync(
752
+ type: 'ed25519',
753
+ options: ED25519KeyPairOptions<'der', 'pem'>,
754
+ ): KeyPairSyncResult<Buffer, string>;
755
+ function generateKeyPairSync(
756
+ type: 'ed25519',
757
+ options: ED25519KeyPairOptions<'der', 'der'>,
758
+ ): KeyPairSyncResult<Buffer, Buffer>;
639
759
  function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
640
760
 
641
- function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
642
- function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
643
- function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
644
- function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
761
+ function generateKeyPairSync(
762
+ type: 'ed448',
763
+ options: ED448KeyPairOptions<'pem', 'pem'>,
764
+ ): KeyPairSyncResult<string, string>;
765
+ function generateKeyPairSync(
766
+ type: 'ed448',
767
+ options: ED448KeyPairOptions<'pem', 'der'>,
768
+ ): KeyPairSyncResult<string, Buffer>;
769
+ function generateKeyPairSync(
770
+ type: 'ed448',
771
+ options: ED448KeyPairOptions<'der', 'pem'>,
772
+ ): KeyPairSyncResult<Buffer, string>;
773
+ function generateKeyPairSync(
774
+ type: 'ed448',
775
+ options: ED448KeyPairOptions<'der', 'der'>,
776
+ ): KeyPairSyncResult<Buffer, Buffer>;
645
777
  function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
646
778
 
647
- function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
648
- function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
649
- function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
650
- function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
779
+ function generateKeyPairSync(
780
+ type: 'x25519',
781
+ options: X25519KeyPairOptions<'pem', 'pem'>,
782
+ ): KeyPairSyncResult<string, string>;
783
+ function generateKeyPairSync(
784
+ type: 'x25519',
785
+ options: X25519KeyPairOptions<'pem', 'der'>,
786
+ ): KeyPairSyncResult<string, Buffer>;
787
+ function generateKeyPairSync(
788
+ type: 'x25519',
789
+ options: X25519KeyPairOptions<'der', 'pem'>,
790
+ ): KeyPairSyncResult<Buffer, string>;
791
+ function generateKeyPairSync(
792
+ type: 'x25519',
793
+ options: X25519KeyPairOptions<'der', 'der'>,
794
+ ): KeyPairSyncResult<Buffer, Buffer>;
651
795
  function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
652
796
 
653
- function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
654
- function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
655
- function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
656
- function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
797
+ function generateKeyPairSync(
798
+ type: 'x448',
799
+ options: X448KeyPairOptions<'pem', 'pem'>,
800
+ ): KeyPairSyncResult<string, string>;
801
+ function generateKeyPairSync(
802
+ type: 'x448',
803
+ options: X448KeyPairOptions<'pem', 'der'>,
804
+ ): KeyPairSyncResult<string, Buffer>;
805
+ function generateKeyPairSync(
806
+ type: 'x448',
807
+ options: X448KeyPairOptions<'der', 'pem'>,
808
+ ): KeyPairSyncResult<Buffer, string>;
809
+ function generateKeyPairSync(
810
+ type: 'x448',
811
+ options: X448KeyPairOptions<'der', 'der'>,
812
+ ): KeyPairSyncResult<Buffer, Buffer>;
657
813
  function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
658
814
 
659
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
660
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
661
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
662
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
663
- function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
664
-
665
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
666
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
667
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
668
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
669
- function generateKeyPair(type: 'dsa', options: DSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
670
-
671
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
672
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
673
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
674
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
675
- function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
676
-
677
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
678
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
679
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
680
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
681
- function generateKeyPair(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
682
-
683
- function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
684
- function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
685
- function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
686
- function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
687
- function generateKeyPair(type: 'ed448', options: ED448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
688
-
689
- function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
690
- function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
691
- function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
692
- function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
693
- function generateKeyPair(type: 'x25519', options: X25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
694
-
695
- function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
696
- function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
697
- function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
698
- function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
699
- function generateKeyPair(type: 'x448', options: X448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
815
+ function generateKeyPair(
816
+ type: 'rsa',
817
+ options: RSAKeyPairOptions<'pem', 'pem'>,
818
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
819
+ ): void;
820
+ function generateKeyPair(
821
+ type: 'rsa',
822
+ options: RSAKeyPairOptions<'pem', 'der'>,
823
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
824
+ ): void;
825
+ function generateKeyPair(
826
+ type: 'rsa',
827
+ options: RSAKeyPairOptions<'der', 'pem'>,
828
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
829
+ ): void;
830
+ function generateKeyPair(
831
+ type: 'rsa',
832
+ options: RSAKeyPairOptions<'der', 'der'>,
833
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
834
+ ): void;
835
+ function generateKeyPair(
836
+ type: 'rsa',
837
+ options: RSAKeyPairKeyObjectOptions,
838
+ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
839
+ ): void;
840
+
841
+ function generateKeyPair(
842
+ type: 'dsa',
843
+ options: DSAKeyPairOptions<'pem', 'pem'>,
844
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
845
+ ): void;
846
+ function generateKeyPair(
847
+ type: 'dsa',
848
+ options: DSAKeyPairOptions<'pem', 'der'>,
849
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
850
+ ): void;
851
+ function generateKeyPair(
852
+ type: 'dsa',
853
+ options: DSAKeyPairOptions<'der', 'pem'>,
854
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
855
+ ): void;
856
+ function generateKeyPair(
857
+ type: 'dsa',
858
+ options: DSAKeyPairOptions<'der', 'der'>,
859
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
860
+ ): void;
861
+ function generateKeyPair(
862
+ type: 'dsa',
863
+ options: DSAKeyPairKeyObjectOptions,
864
+ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
865
+ ): void;
866
+
867
+ function generateKeyPair(
868
+ type: 'ec',
869
+ options: ECKeyPairOptions<'pem', 'pem'>,
870
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
871
+ ): void;
872
+ function generateKeyPair(
873
+ type: 'ec',
874
+ options: ECKeyPairOptions<'pem', 'der'>,
875
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
876
+ ): void;
877
+ function generateKeyPair(
878
+ type: 'ec',
879
+ options: ECKeyPairOptions<'der', 'pem'>,
880
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
881
+ ): void;
882
+ function generateKeyPair(
883
+ type: 'ec',
884
+ options: ECKeyPairOptions<'der', 'der'>,
885
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
886
+ ): void;
887
+ function generateKeyPair(
888
+ type: 'ec',
889
+ options: ECKeyPairKeyObjectOptions,
890
+ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
891
+ ): void;
892
+
893
+ function generateKeyPair(
894
+ type: 'ed25519',
895
+ options: ED25519KeyPairOptions<'pem', 'pem'>,
896
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
897
+ ): void;
898
+ function generateKeyPair(
899
+ type: 'ed25519',
900
+ options: ED25519KeyPairOptions<'pem', 'der'>,
901
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
902
+ ): void;
903
+ function generateKeyPair(
904
+ type: 'ed25519',
905
+ options: ED25519KeyPairOptions<'der', 'pem'>,
906
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
907
+ ): void;
908
+ function generateKeyPair(
909
+ type: 'ed25519',
910
+ options: ED25519KeyPairOptions<'der', 'der'>,
911
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
912
+ ): void;
913
+ function generateKeyPair(
914
+ type: 'ed25519',
915
+ options: ED25519KeyPairKeyObjectOptions | undefined,
916
+ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
917
+ ): void;
918
+
919
+ function generateKeyPair(
920
+ type: 'ed448',
921
+ options: ED448KeyPairOptions<'pem', 'pem'>,
922
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
923
+ ): void;
924
+ function generateKeyPair(
925
+ type: 'ed448',
926
+ options: ED448KeyPairOptions<'pem', 'der'>,
927
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
928
+ ): void;
929
+ function generateKeyPair(
930
+ type: 'ed448',
931
+ options: ED448KeyPairOptions<'der', 'pem'>,
932
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
933
+ ): void;
934
+ function generateKeyPair(
935
+ type: 'ed448',
936
+ options: ED448KeyPairOptions<'der', 'der'>,
937
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
938
+ ): void;
939
+ function generateKeyPair(
940
+ type: 'ed448',
941
+ options: ED448KeyPairKeyObjectOptions | undefined,
942
+ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
943
+ ): void;
944
+
945
+ function generateKeyPair(
946
+ type: 'x25519',
947
+ options: X25519KeyPairOptions<'pem', 'pem'>,
948
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
949
+ ): void;
950
+ function generateKeyPair(
951
+ type: 'x25519',
952
+ options: X25519KeyPairOptions<'pem', 'der'>,
953
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
954
+ ): void;
955
+ function generateKeyPair(
956
+ type: 'x25519',
957
+ options: X25519KeyPairOptions<'der', 'pem'>,
958
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
959
+ ): void;
960
+ function generateKeyPair(
961
+ type: 'x25519',
962
+ options: X25519KeyPairOptions<'der', 'der'>,
963
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
964
+ ): void;
965
+ function generateKeyPair(
966
+ type: 'x25519',
967
+ options: X25519KeyPairKeyObjectOptions | undefined,
968
+ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
969
+ ): void;
970
+
971
+ function generateKeyPair(
972
+ type: 'x448',
973
+ options: X448KeyPairOptions<'pem', 'pem'>,
974
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
975
+ ): void;
976
+ function generateKeyPair(
977
+ type: 'x448',
978
+ options: X448KeyPairOptions<'pem', 'der'>,
979
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
980
+ ): void;
981
+ function generateKeyPair(
982
+ type: 'x448',
983
+ options: X448KeyPairOptions<'der', 'pem'>,
984
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
985
+ ): void;
986
+ function generateKeyPair(
987
+ type: 'x448',
988
+ options: X448KeyPairOptions<'der', 'der'>,
989
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
990
+ ): void;
991
+ function generateKeyPair(
992
+ type: 'x448',
993
+ options: X448KeyPairKeyObjectOptions | undefined,
994
+ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
995
+ ): void;
700
996
 
701
997
  namespace generateKeyPair {
702
- function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
703
- function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
704
- function __promisify__(type: "rsa", options: RSAKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
705
- function __promisify__(type: "rsa", options: RSAKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
706
- function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
707
-
708
- function __promisify__(type: "dsa", options: DSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
709
- function __promisify__(type: "dsa", options: DSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
710
- function __promisify__(type: "dsa", options: DSAKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
711
- function __promisify__(type: "dsa", options: DSAKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
712
- function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
713
-
714
- function __promisify__(type: "ec", options: ECKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
715
- function __promisify__(type: "ec", options: ECKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
716
- function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
717
- function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
718
- function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
719
-
720
- function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
721
- function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
722
- function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
723
- function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
724
- function __promisify__(type: "ed25519", options?: ED25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
725
-
726
- function __promisify__(type: "ed448", options: ED448KeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
727
- function __promisify__(type: "ed448", options: ED448KeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
728
- function __promisify__(type: "ed448", options: ED448KeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
729
- function __promisify__(type: "ed448", options: ED448KeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
730
- function __promisify__(type: "ed448", options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
731
-
732
- function __promisify__(type: "x25519", options: X25519KeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
733
- function __promisify__(type: "x25519", options: X25519KeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
734
- function __promisify__(type: "x25519", options: X25519KeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
735
- function __promisify__(type: "x25519", options: X25519KeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
736
- function __promisify__(type: "x25519", options?: X25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
737
-
738
- function __promisify__(type: "x448", options: X448KeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
739
- function __promisify__(type: "x448", options: X448KeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
740
- function __promisify__(type: "x448", options: X448KeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
741
- function __promisify__(type: "x448", options: X448KeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
742
- function __promisify__(type: "x448", options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
998
+ function __promisify__(
999
+ type: 'rsa',
1000
+ options: RSAKeyPairOptions<'pem', 'pem'>,
1001
+ ): Promise<{ publicKey: string; privateKey: string }>;
1002
+ function __promisify__(
1003
+ type: 'rsa',
1004
+ options: RSAKeyPairOptions<'pem', 'der'>,
1005
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
1006
+ function __promisify__(
1007
+ type: 'rsa',
1008
+ options: RSAKeyPairOptions<'der', 'pem'>,
1009
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
1010
+ function __promisify__(
1011
+ type: 'rsa',
1012
+ options: RSAKeyPairOptions<'der', 'der'>,
1013
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1014
+ function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
1015
+
1016
+ function __promisify__(
1017
+ type: 'dsa',
1018
+ options: DSAKeyPairOptions<'pem', 'pem'>,
1019
+ ): Promise<{ publicKey: string; privateKey: string }>;
1020
+ function __promisify__(
1021
+ type: 'dsa',
1022
+ options: DSAKeyPairOptions<'pem', 'der'>,
1023
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
1024
+ function __promisify__(
1025
+ type: 'dsa',
1026
+ options: DSAKeyPairOptions<'der', 'pem'>,
1027
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
1028
+ function __promisify__(
1029
+ type: 'dsa',
1030
+ options: DSAKeyPairOptions<'der', 'der'>,
1031
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1032
+ function __promisify__(type: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
1033
+
1034
+ function __promisify__(
1035
+ type: 'ec',
1036
+ options: ECKeyPairOptions<'pem', 'pem'>,
1037
+ ): Promise<{ publicKey: string; privateKey: string }>;
1038
+ function __promisify__(
1039
+ type: 'ec',
1040
+ options: ECKeyPairOptions<'pem', 'der'>,
1041
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
1042
+ function __promisify__(
1043
+ type: 'ec',
1044
+ options: ECKeyPairOptions<'der', 'pem'>,
1045
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
1046
+ function __promisify__(
1047
+ type: 'ec',
1048
+ options: ECKeyPairOptions<'der', 'der'>,
1049
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1050
+ function __promisify__(type: 'ec', options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
1051
+
1052
+ function __promisify__(
1053
+ type: 'ed25519',
1054
+ options: ED25519KeyPairOptions<'pem', 'pem'>,
1055
+ ): Promise<{ publicKey: string; privateKey: string }>;
1056
+ function __promisify__(
1057
+ type: 'ed25519',
1058
+ options: ED25519KeyPairOptions<'pem', 'der'>,
1059
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
1060
+ function __promisify__(
1061
+ type: 'ed25519',
1062
+ options: ED25519KeyPairOptions<'der', 'pem'>,
1063
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
1064
+ function __promisify__(
1065
+ type: 'ed25519',
1066
+ options: ED25519KeyPairOptions<'der', 'der'>,
1067
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1068
+ function __promisify__(
1069
+ type: 'ed25519',
1070
+ options?: ED25519KeyPairKeyObjectOptions,
1071
+ ): Promise<KeyPairKeyObjectResult>;
1072
+
1073
+ function __promisify__(
1074
+ type: 'ed448',
1075
+ options: ED448KeyPairOptions<'pem', 'pem'>,
1076
+ ): Promise<{ publicKey: string; privateKey: string }>;
1077
+ function __promisify__(
1078
+ type: 'ed448',
1079
+ options: ED448KeyPairOptions<'pem', 'der'>,
1080
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
1081
+ function __promisify__(
1082
+ type: 'ed448',
1083
+ options: ED448KeyPairOptions<'der', 'pem'>,
1084
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
1085
+ function __promisify__(
1086
+ type: 'ed448',
1087
+ options: ED448KeyPairOptions<'der', 'der'>,
1088
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1089
+ function __promisify__(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
1090
+
1091
+ function __promisify__(
1092
+ type: 'x25519',
1093
+ options: X25519KeyPairOptions<'pem', 'pem'>,
1094
+ ): Promise<{ publicKey: string; privateKey: string }>;
1095
+ function __promisify__(
1096
+ type: 'x25519',
1097
+ options: X25519KeyPairOptions<'pem', 'der'>,
1098
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
1099
+ function __promisify__(
1100
+ type: 'x25519',
1101
+ options: X25519KeyPairOptions<'der', 'pem'>,
1102
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
1103
+ function __promisify__(
1104
+ type: 'x25519',
1105
+ options: X25519KeyPairOptions<'der', 'der'>,
1106
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1107
+ function __promisify__(
1108
+ type: 'x25519',
1109
+ options?: X25519KeyPairKeyObjectOptions,
1110
+ ): Promise<KeyPairKeyObjectResult>;
1111
+
1112
+ function __promisify__(
1113
+ type: 'x448',
1114
+ options: X448KeyPairOptions<'pem', 'pem'>,
1115
+ ): Promise<{ publicKey: string; privateKey: string }>;
1116
+ function __promisify__(
1117
+ type: 'x448',
1118
+ options: X448KeyPairOptions<'pem', 'der'>,
1119
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
1120
+ function __promisify__(
1121
+ type: 'x448',
1122
+ options: X448KeyPairOptions<'der', 'pem'>,
1123
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
1124
+ function __promisify__(
1125
+ type: 'x448',
1126
+ options: X448KeyPairOptions<'der', 'der'>,
1127
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1128
+ function __promisify__(type: 'x448', options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
743
1129
  }
744
1130
 
745
1131
  /**
@@ -750,7 +1136,11 @@ declare module "crypto" {
750
1136
  * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
751
1137
  * passed to [`crypto.createPrivateKey()`][].
752
1138
  */
753
- function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
1139
+ function sign(
1140
+ algorithm: string | null | undefined,
1141
+ data: NodeJS.ArrayBufferView,
1142
+ key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
1143
+ ): Buffer;
754
1144
 
755
1145
  /**
756
1146
  * Calculates and returns the signature for `data` using the given private key and
@@ -760,5 +1150,10 @@ declare module "crypto" {
760
1150
  * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
761
1151
  * passed to [`crypto.createPublicKey()`][].
762
1152
  */
763
- function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): Buffer;
1153
+ function verify(
1154
+ algorithm: string | null | undefined,
1155
+ data: NodeJS.ArrayBufferView,
1156
+ key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
1157
+ signature: NodeJS.ArrayBufferView,
1158
+ ): Buffer;
764
1159
  }
node v12.19/http.d.ts CHANGED
@@ -173,7 +173,7 @@ declare module "http" {
173
173
  rawHeaders: string[];
174
174
  }
175
175
 
176
- // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77
176
+ // https://github.com/nodejs/node/blob/v12.20.0/lib/_http_client.js#L85
177
177
  class ClientRequest extends OutgoingMessage {
178
178
  connection: Socket;
179
179
  socket: Socket;
@@ -183,6 +183,7 @@ declare module "http" {
183
183
 
184
184
  constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
185
185
 
186
+ method: string;
186
187
  readonly path: string;
187
188
  abort(): void;
188
189
  onSocket(socket: Socket): void;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "12.19.7",
3
+ "version": "12.19.11",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -231,6 +231,6 @@
231
231
  },
232
232
  "scripts": {},
233
233
  "dependencies": {},
234
- "typesPublisherContentHash": "eb2d669c9c3ace7b48a571fbb9cf7bd493f62d84524b80d7edf02ee6be35e0e0",
234
+ "typesPublisherContentHash": "7d5072f90b5227c477562304b010d4a00ea5a0cf965b451a72e50dec4917d8fa",
235
235
  "typeScriptVersion": "3.3"
236
236
  }
@@ -15,6 +15,7 @@ declare module 'assert' {
15
15
  actual?: any;
16
16
  expected?: any;
17
17
  operator?: string;
18
+ // tslint:disable-next-line:ban-types
18
19
  stackStartFn?: Function;
19
20
  });
20
21
  }
@@ -37,6 +38,8 @@ declare module 'assert' {
37
38
  stack: object;
38
39
  }
39
40
 
41
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
42
+
40
43
  function fail(message?: string | Error): never;
41
44
  /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
42
45
  function fail(
@@ -44,6 +47,7 @@ declare module 'assert' {
44
47
  expected: any,
45
48
  message?: string | Error,
46
49
  operator?: string,
50
+ // tslint:disable-next-line:ban-types
47
51
  stackStartFn?: Function,
48
52
  ): never;
49
53
  function ok(value: any, message?: string | Error): void;
@@ -61,22 +65,22 @@ declare module 'assert' {
61
65
  function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
62
66
 
63
67
  function throws(block: () => any, message?: string | Error): void;
64
- function throws(block: () => any, error: RegExp | Function | Object | Error, message?: string | Error): void;
68
+ function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
65
69
  function doesNotThrow(block: () => any, message?: string | Error): void;
66
- function doesNotThrow(block: () => any, error: RegExp | Function, message?: string | Error): void;
70
+ function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
67
71
 
68
72
  function ifError(value: any): void;
69
73
 
70
74
  function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
71
75
  function rejects(
72
76
  block: (() => Promise<any>) | Promise<any>,
73
- error: RegExp | Function | Object | Error,
77
+ error: AssertPredicate,
74
78
  message?: string | Error,
75
79
  ): Promise<void>;
76
80
  function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
77
81
  function doesNotReject(
78
82
  block: (() => Promise<any>) | Promise<any>,
79
- error: RegExp | Function,
83
+ error: AssertPredicate,
80
84
  message?: string | Error,
81
85
  ): Promise<void>;
82
86
 
node v12.19/util.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  declare module "util" {
2
2
  interface InspectOptions extends NodeJS.InspectOptions { }
3
- function format(format: any, ...param: any[]): string;
4
- function formatWithOptions(inspectOptions: InspectOptions, format: string, ...param: any[]): string;
3
+ function format(format?: any, ...param: any[]): string;
4
+ function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
5
5
  /** @deprecated since v0.11.3 - use a third party module instead. */
6
6
  function log(string: string): void;
7
7
  function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;