@types/node 12.19.10 → 12.19.14
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 +1 -1
- node v12.19/crypto.d.ts +548 -153
- node v12.19/domain.d.ts +6 -6
- node v12.19/events.d.ts +26 -30
- node v12.19/package.json +3 -8
- node v12.19/stream.d.ts +3 -3
- node v12.19/{ts3.3 → ts3.6}/assert.d.ts +0 -0
- node v12.19/ts3.6/base.d.ts +39 -1
- node v12.19/ts3.6/index.d.ts +1 -2
- node v12.19/url.d.ts +6 -0
- node v12.19/ts3.3/base.d.ts +0 -54
- node v12.19/ts3.3/globals.global.d.ts +0 -1
- node v12.19/ts3.3/index.d.ts +0 -8
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:
|
|
11
|
+
* Last updated: Thu, 14 Jan 2021 21:29:49 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/crypto.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare module
|
|
2
|
-
import * as stream from
|
|
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 {
|
|
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 =
|
|
124
|
-
type HexBase64Latin1Encoding =
|
|
125
|
-
type Utf8AsciiBinaryEncoding =
|
|
126
|
-
type HexBase64BinaryEncoding =
|
|
127
|
-
type ECDHKeyFormat =
|
|
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,
|
|
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(
|
|
208
|
-
|
|
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(
|
|
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(
|
|
249
|
-
|
|
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(
|
|
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(
|
|
324
|
-
|
|
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(
|
|
332
|
-
|
|
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(
|
|
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(
|
|
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>(
|
|
378
|
-
|
|
379
|
-
|
|
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,
|
|
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?:
|
|
430
|
-
format?:
|
|
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(
|
|
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
|
-
|
|
479
|
-
|
|
549
|
+
/**
|
|
550
|
+
* No options.
|
|
551
|
+
*/
|
|
480
552
|
}
|
|
481
553
|
|
|
482
554
|
interface X448KeyPairKeyObjectOptions {
|
|
483
|
-
|
|
484
|
-
|
|
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(
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
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(
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
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(
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
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(
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
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(
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
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(
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
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(
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
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(
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
function generateKeyPair(
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
function generateKeyPair(
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
function generateKeyPair(
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
function generateKeyPair(
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
function generateKeyPair(
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
function generateKeyPair(
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
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__(
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
function __promisify__(
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
function __promisify__(
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
function __promisify__(
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
function __promisify__(type:
|
|
719
|
-
|
|
720
|
-
function __promisify__(
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
function __promisify__(
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
function __promisify__(
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
function __promisify__(
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
function __promisify__(type:
|
|
737
|
-
|
|
738
|
-
function __promisify__(
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
function __promisify__(
|
|
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(
|
|
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(
|
|
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/domain.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
declare module
|
|
2
|
-
import
|
|
1
|
+
declare module 'domain' {
|
|
2
|
+
import EventEmitter = require('events');
|
|
3
3
|
|
|
4
|
-
class Domain extends
|
|
4
|
+
class Domain extends EventEmitter implements NodeJS.Domain {
|
|
5
5
|
run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
|
|
6
|
-
add(emitter:
|
|
7
|
-
remove(emitter:
|
|
6
|
+
add(emitter: EventEmitter | NodeJS.Timer): void;
|
|
7
|
+
remove(emitter: EventEmitter | NodeJS.Timer): void;
|
|
8
8
|
bind<T extends Function>(cb: T): T;
|
|
9
9
|
intercept<T extends Function>(cb: T): T;
|
|
10
|
-
members: Array<
|
|
10
|
+
members: Array<EventEmitter | NodeJS.Timer>;
|
|
11
11
|
enter(): void;
|
|
12
12
|
exit(): void;
|
|
13
13
|
}
|
node v12.19/events.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
declare module
|
|
2
|
-
class internal extends NodeJS.EventEmitter { }
|
|
3
|
-
|
|
1
|
+
declare module 'events' {
|
|
4
2
|
interface NodeEventTarget {
|
|
5
3
|
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
6
4
|
}
|
|
@@ -9,9 +7,15 @@ declare module "events" {
|
|
|
9
7
|
addEventListener(event: string, listener: (...args: any[]) => void, opts?: { once: boolean }): any;
|
|
10
8
|
}
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
class EventEmitter extends NodeJS.EventEmitter {
|
|
11
|
+
constructor();
|
|
12
|
+
|
|
13
|
+
static once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>;
|
|
14
|
+
static once(emitter: DOMEventTarget, event: string): Promise<any[]>;
|
|
15
|
+
static on(emitter: NodeJS.EventEmitter, event: string): AsyncIterableIterator<any>;
|
|
16
|
+
|
|
17
|
+
/** @deprecated since v4.0.0 */
|
|
18
|
+
static listenerCount(emitter: NodeJS.EventEmitter, event: string | symbol): number;
|
|
15
19
|
|
|
16
20
|
/**
|
|
17
21
|
* This symbol shall be used to install a listener for only monitoring `'error'`
|
|
@@ -22,30 +26,22 @@ declare module "events" {
|
|
|
22
26
|
* `'error'` event is emitted, therefore the process will still crash if no
|
|
23
27
|
* regular `'error'` listener is installed.
|
|
24
28
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
setMaxListeners(n: number): this;
|
|
41
|
-
getMaxListeners(): number;
|
|
42
|
-
listeners(event: string | symbol): Function[];
|
|
43
|
-
rawListeners(event: string | symbol): Function[];
|
|
44
|
-
emit(event: string | symbol, ...args: any[]): boolean;
|
|
45
|
-
eventNames(): Array<string | symbol>;
|
|
46
|
-
listenerCount(type: string | symbol): number;
|
|
47
|
-
}
|
|
29
|
+
static readonly errorMonitor: unique symbol;
|
|
30
|
+
static readonly captureRejectionSymbol: unique symbol;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Sets or gets the default captureRejection value for all emitters.
|
|
34
|
+
*/
|
|
35
|
+
// TODO: These should be described using static getter/setter pairs:
|
|
36
|
+
static captureRejections: boolean;
|
|
37
|
+
static defaultMaxListeners: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
import internal = require('events');
|
|
41
|
+
namespace EventEmitter {
|
|
42
|
+
// Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
|
|
43
|
+
export { internal as EventEmitter };
|
|
48
44
|
}
|
|
49
45
|
|
|
50
|
-
export =
|
|
46
|
+
export = EventEmitter;
|
|
51
47
|
}
|
node v12.19/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "12.19.
|
|
3
|
+
"version": "12.19.14",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -213,11 +213,6 @@
|
|
|
213
213
|
"main": "",
|
|
214
214
|
"types": "index.d.ts",
|
|
215
215
|
"typesVersions": {
|
|
216
|
-
"<=3.3": {
|
|
217
|
-
"*": [
|
|
218
|
-
"ts3.3/*"
|
|
219
|
-
]
|
|
220
|
-
},
|
|
221
216
|
"<=3.6": {
|
|
222
217
|
"*": [
|
|
223
218
|
"ts3.6/*"
|
|
@@ -231,6 +226,6 @@
|
|
|
231
226
|
},
|
|
232
227
|
"scripts": {},
|
|
233
228
|
"dependencies": {},
|
|
234
|
-
"typesPublisherContentHash": "
|
|
235
|
-
"typeScriptVersion": "3.
|
|
229
|
+
"typesPublisherContentHash": "284f8d9969ff88a17b5e9c0a7936399fe8db8ef90df2cb13b2a65a38ca240c22",
|
|
230
|
+
"typeScriptVersion": "3.4"
|
|
236
231
|
}
|
node v12.19/stream.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare module
|
|
2
|
-
import
|
|
1
|
+
declare module 'stream' {
|
|
2
|
+
import EventEmitter = require('events');
|
|
3
3
|
|
|
4
|
-
class internal extends
|
|
4
|
+
class internal extends EventEmitter {
|
|
5
5
|
pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
|
|
6
6
|
}
|
|
7
7
|
|
|
File without changes
|
node v12.19/ts3.6/base.d.ts
CHANGED
|
@@ -13,7 +13,45 @@
|
|
|
13
13
|
/// <reference lib="esnext.bigint" />
|
|
14
14
|
|
|
15
15
|
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
|
|
16
|
-
/// <reference path="../
|
|
16
|
+
/// <reference path="../globals.d.ts" />
|
|
17
|
+
/// <reference path="../async_hooks.d.ts" />
|
|
18
|
+
/// <reference path="../buffer.d.ts" />
|
|
19
|
+
/// <reference path="../child_process.d.ts" />
|
|
20
|
+
/// <reference path="../cluster.d.ts" />
|
|
21
|
+
/// <reference path="../console.d.ts" />
|
|
22
|
+
/// <reference path="../constants.d.ts" />
|
|
23
|
+
/// <reference path="../crypto.d.ts" />
|
|
24
|
+
/// <reference path="../dgram.d.ts" />
|
|
25
|
+
/// <reference path="../dns.d.ts" />
|
|
26
|
+
/// <reference path="../domain.d.ts" />
|
|
27
|
+
/// <reference path="../events.d.ts" />
|
|
28
|
+
/// <reference path="../fs.d.ts" />
|
|
29
|
+
/// <reference path="../http.d.ts" />
|
|
30
|
+
/// <reference path="../http2.d.ts" />
|
|
31
|
+
/// <reference path="../https.d.ts" />
|
|
32
|
+
/// <reference path="../inspector.d.ts" />
|
|
33
|
+
/// <reference path="../module.d.ts" />
|
|
34
|
+
/// <reference path="../net.d.ts" />
|
|
35
|
+
/// <reference path="../os.d.ts" />
|
|
36
|
+
/// <reference path="../path.d.ts" />
|
|
37
|
+
/// <reference path="../perf_hooks.d.ts" />
|
|
38
|
+
/// <reference path="../process.d.ts" />
|
|
39
|
+
/// <reference path="../punycode.d.ts" />
|
|
40
|
+
/// <reference path="../querystring.d.ts" />
|
|
41
|
+
/// <reference path="../readline.d.ts" />
|
|
42
|
+
/// <reference path="../repl.d.ts" />
|
|
43
|
+
/// <reference path="../stream.d.ts" />
|
|
44
|
+
/// <reference path="../string_decoder.d.ts" />
|
|
45
|
+
/// <reference path="../timers.d.ts" />
|
|
46
|
+
/// <reference path="../tls.d.ts" />
|
|
47
|
+
/// <reference path="../trace_events.d.ts" />
|
|
48
|
+
/// <reference path="../tty.d.ts" />
|
|
49
|
+
/// <reference path="../url.d.ts" />
|
|
50
|
+
/// <reference path="../util.d.ts" />
|
|
51
|
+
/// <reference path="../v8.d.ts" />
|
|
52
|
+
/// <reference path="../vm.d.ts" />
|
|
53
|
+
/// <reference path="../worker_threads.d.ts" />
|
|
54
|
+
/// <reference path="../zlib.d.ts" />
|
|
17
55
|
|
|
18
56
|
// TypeScript 3.5-specific augmentations:
|
|
19
57
|
/// <reference path="../globals.global.d.ts" />
|
node v12.19/ts3.6/index.d.ts
CHANGED
node v12.19/url.d.ts
CHANGED
|
@@ -41,13 +41,19 @@ declare module "url" {
|
|
|
41
41
|
query: string | null;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
|
|
44
45
|
function parse(urlStr: string): UrlWithStringQuery;
|
|
46
|
+
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
|
|
45
47
|
function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
|
|
48
|
+
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
|
|
46
49
|
function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
|
|
50
|
+
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
|
|
47
51
|
function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
|
|
48
52
|
|
|
49
53
|
function format(URL: URL, options?: URLFormatOptions): string;
|
|
54
|
+
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
|
|
50
55
|
function format(urlObject: UrlObject | string): string;
|
|
56
|
+
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
|
|
51
57
|
function resolve(from: string, to: string): string;
|
|
52
58
|
|
|
53
59
|
function domainToASCII(domain: string): string;
|
node v12.19/ts3.3/base.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// NOTE: These definitions support NodeJS and TypeScript 3.2.
|
|
2
|
-
|
|
3
|
-
// NOTE: TypeScript version-specific augmentations can be found in the following paths:
|
|
4
|
-
// - ~/base.d.ts - Shared definitions common to all TypeScript versions
|
|
5
|
-
// - ~/index.d.ts - Definitions specific to TypeScript 2.1
|
|
6
|
-
// - ~/ts3.2/base.d.ts - Definitions specific to TypeScript 3.2
|
|
7
|
-
// - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 with global and assert pulled in
|
|
8
|
-
|
|
9
|
-
// Reference required types from the default lib:
|
|
10
|
-
/// <reference lib="es2018" />
|
|
11
|
-
/// <reference lib="esnext.asynciterable" />
|
|
12
|
-
/// <reference lib="esnext.intl" />
|
|
13
|
-
/// <reference lib="esnext.bigint" />
|
|
14
|
-
|
|
15
|
-
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
|
|
16
|
-
/// <reference path="../globals.d.ts" />
|
|
17
|
-
/// <reference path="../async_hooks.d.ts" />
|
|
18
|
-
/// <reference path="../buffer.d.ts" />
|
|
19
|
-
/// <reference path="../child_process.d.ts" />
|
|
20
|
-
/// <reference path="../cluster.d.ts" />
|
|
21
|
-
/// <reference path="../console.d.ts" />
|
|
22
|
-
/// <reference path="../constants.d.ts" />
|
|
23
|
-
/// <reference path="../crypto.d.ts" />
|
|
24
|
-
/// <reference path="../dgram.d.ts" />
|
|
25
|
-
/// <reference path="../dns.d.ts" />
|
|
26
|
-
/// <reference path="../domain.d.ts" />
|
|
27
|
-
/// <reference path="../events.d.ts" />
|
|
28
|
-
/// <reference path="../fs.d.ts" />
|
|
29
|
-
/// <reference path="../http.d.ts" />
|
|
30
|
-
/// <reference path="../http2.d.ts" />
|
|
31
|
-
/// <reference path="../https.d.ts" />
|
|
32
|
-
/// <reference path="../inspector.d.ts" />
|
|
33
|
-
/// <reference path="../module.d.ts" />
|
|
34
|
-
/// <reference path="../net.d.ts" />
|
|
35
|
-
/// <reference path="../os.d.ts" />
|
|
36
|
-
/// <reference path="../path.d.ts" />
|
|
37
|
-
/// <reference path="../perf_hooks.d.ts" />
|
|
38
|
-
/// <reference path="../process.d.ts" />
|
|
39
|
-
/// <reference path="../punycode.d.ts" />
|
|
40
|
-
/// <reference path="../querystring.d.ts" />
|
|
41
|
-
/// <reference path="../readline.d.ts" />
|
|
42
|
-
/// <reference path="../repl.d.ts" />
|
|
43
|
-
/// <reference path="../stream.d.ts" />
|
|
44
|
-
/// <reference path="../string_decoder.d.ts" />
|
|
45
|
-
/// <reference path="../timers.d.ts" />
|
|
46
|
-
/// <reference path="../tls.d.ts" />
|
|
47
|
-
/// <reference path="../trace_events.d.ts" />
|
|
48
|
-
/// <reference path="../tty.d.ts" />
|
|
49
|
-
/// <reference path="../url.d.ts" />
|
|
50
|
-
/// <reference path="../util.d.ts" />
|
|
51
|
-
/// <reference path="../v8.d.ts" />
|
|
52
|
-
/// <reference path="../vm.d.ts" />
|
|
53
|
-
/// <reference path="../worker_threads.d.ts" />
|
|
54
|
-
/// <reference path="../zlib.d.ts" />
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare var global: NodeJS.Global;
|
node v12.19/ts3.3/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// NOTE: These definitions support NodeJS and TypeScript 3.2.
|
|
2
|
-
// This is requried to enable globalThis support for global in ts3.4 without causing errors
|
|
3
|
-
// This is requried to enable typing assert in ts3.7 without causing errors
|
|
4
|
-
// Typically type modifiations should be made in base.d.ts instead of here
|
|
5
|
-
|
|
6
|
-
/// <reference path="base.d.ts" />
|
|
7
|
-
/// <reference path="assert.d.ts" />
|
|
8
|
-
/// <reference path="globals.global.d.ts" />
|