@types/node 13.13.35 → 13.13.39
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 v13.13/README.md +1 -1
- node v13.13/assert.d.ts +4 -2
- node v13.13/crypto.d.ts +281 -78
- node v13.13/package.json +2 -2
- node v13.13/ts3.4/assert.d.ts +4 -2
- node v13.13/url.d.ts +6 -0
- node v13.13/util.d.ts +2 -2
node v13.13/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/v13.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Mon, 04 Jan 2021 20:50:29 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
14
|
|
node v13.13/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
|
}
|
|
@@ -28,6 +29,7 @@ declare module 'assert' {
|
|
|
28
29
|
expected: any,
|
|
29
30
|
message?: string | Error,
|
|
30
31
|
operator?: string,
|
|
32
|
+
// tslint:disable-next-line:ban-types
|
|
31
33
|
stackStartFn?: Function,
|
|
32
34
|
): never;
|
|
33
35
|
function ok(value: any, message?: string | Error): asserts value;
|
|
@@ -47,7 +49,7 @@ declare module 'assert' {
|
|
|
47
49
|
function throws(block: () => any, message?: string | Error): void;
|
|
48
50
|
function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
|
|
49
51
|
function doesNotThrow(block: () => any, message?: string | Error): void;
|
|
50
|
-
function doesNotThrow(block: () => any, error:
|
|
52
|
+
function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
|
|
51
53
|
|
|
52
54
|
function ifError(value: any): asserts value is null | undefined;
|
|
53
55
|
|
|
@@ -60,7 +62,7 @@ declare module 'assert' {
|
|
|
60
62
|
function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
|
|
61
63
|
function doesNotReject(
|
|
62
64
|
block: (() => Promise<any>) | Promise<any>,
|
|
63
|
-
error:
|
|
65
|
+
error: AssertPredicate,
|
|
64
66
|
message?: string | Error,
|
|
65
67
|
): Promise<void>;
|
|
66
68
|
|
node v13.13/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 | KeyObject, 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();
|
|
@@ -189,24 +190,35 @@ declare module "crypto" {
|
|
|
189
190
|
algorithm: CipherCCMTypes,
|
|
190
191
|
key: CipherKey,
|
|
191
192
|
iv: BinaryLike | null,
|
|
192
|
-
options: CipherCCMOptions
|
|
193
|
+
options: CipherCCMOptions,
|
|
193
194
|
): CipherCCM;
|
|
194
195
|
function createCipheriv(
|
|
195
196
|
algorithm: CipherGCMTypes,
|
|
196
197
|
key: CipherKey,
|
|
197
198
|
iv: BinaryLike | null,
|
|
198
|
-
options?: CipherGCMOptions
|
|
199
|
+
options?: CipherGCMOptions,
|
|
199
200
|
): CipherGCM;
|
|
200
201
|
function createCipheriv(
|
|
201
|
-
algorithm: string,
|
|
202
|
+
algorithm: string,
|
|
203
|
+
key: CipherKey,
|
|
204
|
+
iv: BinaryLike | null,
|
|
205
|
+
options?: stream.TransformOptions,
|
|
202
206
|
): Cipher;
|
|
203
207
|
|
|
204
208
|
class Cipher extends stream.Transform {
|
|
205
209
|
private constructor();
|
|
206
210
|
update(data: BinaryLike): Buffer;
|
|
207
211
|
update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer;
|
|
208
|
-
update(
|
|
209
|
-
|
|
212
|
+
update(
|
|
213
|
+
data: NodeJS.ArrayBufferView,
|
|
214
|
+
input_encoding: undefined,
|
|
215
|
+
output_encoding: HexBase64BinaryEncoding,
|
|
216
|
+
): string;
|
|
217
|
+
update(
|
|
218
|
+
data: string,
|
|
219
|
+
input_encoding: Utf8AsciiBinaryEncoding | undefined,
|
|
220
|
+
output_encoding: HexBase64BinaryEncoding,
|
|
221
|
+
): string;
|
|
210
222
|
final(): Buffer;
|
|
211
223
|
final(output_encoding: string): string;
|
|
212
224
|
setAutoPadding(auto_padding?: boolean): this;
|
|
@@ -240,14 +252,27 @@ declare module "crypto" {
|
|
|
240
252
|
iv: BinaryLike | null,
|
|
241
253
|
options?: CipherGCMOptions,
|
|
242
254
|
): DecipherGCM;
|
|
243
|
-
function createDecipheriv(
|
|
255
|
+
function createDecipheriv(
|
|
256
|
+
algorithm: string,
|
|
257
|
+
key: CipherKey,
|
|
258
|
+
iv: BinaryLike | null,
|
|
259
|
+
options?: stream.TransformOptions,
|
|
260
|
+
): Decipher;
|
|
244
261
|
|
|
245
262
|
class Decipher extends stream.Transform {
|
|
246
263
|
private constructor();
|
|
247
264
|
update(data: NodeJS.ArrayBufferView): Buffer;
|
|
248
265
|
update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer;
|
|
249
|
-
update(
|
|
250
|
-
|
|
266
|
+
update(
|
|
267
|
+
data: NodeJS.ArrayBufferView,
|
|
268
|
+
input_encoding: HexBase64BinaryEncoding | undefined,
|
|
269
|
+
output_encoding: Utf8AsciiBinaryEncoding,
|
|
270
|
+
): string;
|
|
271
|
+
update(
|
|
272
|
+
data: string,
|
|
273
|
+
input_encoding: HexBase64BinaryEncoding | undefined,
|
|
274
|
+
output_encoding: Utf8AsciiBinaryEncoding,
|
|
275
|
+
): string;
|
|
251
276
|
final(): Buffer;
|
|
252
277
|
final(output_encoding: string): string;
|
|
253
278
|
setAutoPadding(auto_padding?: boolean): this;
|
|
@@ -290,8 +315,7 @@ declare module "crypto" {
|
|
|
290
315
|
saltLength?: number;
|
|
291
316
|
}
|
|
292
317
|
|
|
293
|
-
interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {
|
|
294
|
-
}
|
|
318
|
+
interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
|
|
295
319
|
|
|
296
320
|
type KeyLike = string | Buffer | KeyObject;
|
|
297
321
|
|
|
@@ -318,8 +342,17 @@ declare module "crypto" {
|
|
|
318
342
|
function createDiffieHellman(prime_length: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman;
|
|
319
343
|
function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman;
|
|
320
344
|
function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman;
|
|
321
|
-
function createDiffieHellman(
|
|
322
|
-
|
|
345
|
+
function createDiffieHellman(
|
|
346
|
+
prime: string,
|
|
347
|
+
prime_encoding: HexBase64Latin1Encoding,
|
|
348
|
+
generator: number | NodeJS.ArrayBufferView,
|
|
349
|
+
): DiffieHellman;
|
|
350
|
+
function createDiffieHellman(
|
|
351
|
+
prime: string,
|
|
352
|
+
prime_encoding: HexBase64Latin1Encoding,
|
|
353
|
+
generator: string,
|
|
354
|
+
generator_encoding: HexBase64Latin1Encoding,
|
|
355
|
+
): DiffieHellman;
|
|
323
356
|
class DiffieHellman {
|
|
324
357
|
private constructor();
|
|
325
358
|
generateKeys(): Buffer;
|
|
@@ -327,7 +360,11 @@ declare module "crypto" {
|
|
|
327
360
|
computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
|
|
328
361
|
computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer;
|
|
329
362
|
computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: HexBase64Latin1Encoding): string;
|
|
330
|
-
computeSecret(
|
|
363
|
+
computeSecret(
|
|
364
|
+
other_public_key: string,
|
|
365
|
+
input_encoding: HexBase64Latin1Encoding,
|
|
366
|
+
output_encoding: HexBase64Latin1Encoding,
|
|
367
|
+
): string;
|
|
331
368
|
getPrime(): Buffer;
|
|
332
369
|
getPrime(encoding: HexBase64Latin1Encoding): string;
|
|
333
370
|
getGenerator(): Buffer;
|
|
@@ -351,7 +388,13 @@ declare module "crypto" {
|
|
|
351
388
|
digest: string,
|
|
352
389
|
callback: (err: Error | null, derivedKey: Buffer) => any,
|
|
353
390
|
): void;
|
|
354
|
-
function pbkdf2Sync(
|
|
391
|
+
function pbkdf2Sync(
|
|
392
|
+
password: BinaryLike,
|
|
393
|
+
salt: BinaryLike,
|
|
394
|
+
iterations: number,
|
|
395
|
+
keylen: number,
|
|
396
|
+
digest: string,
|
|
397
|
+
): Buffer;
|
|
355
398
|
|
|
356
399
|
function randomBytes(size: number): Buffer;
|
|
357
400
|
function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
|
|
@@ -359,11 +402,26 @@ declare module "crypto" {
|
|
|
359
402
|
function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
|
|
360
403
|
|
|
361
404
|
function randomFillSync<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number, size?: number): T;
|
|
362
|
-
function randomFill<T extends NodeJS.ArrayBufferView>(
|
|
363
|
-
|
|
364
|
-
|
|
405
|
+
function randomFill<T extends NodeJS.ArrayBufferView>(
|
|
406
|
+
buffer: T,
|
|
407
|
+
callback: (err: Error | null, buf: T) => void,
|
|
408
|
+
): void;
|
|
409
|
+
function randomFill<T extends NodeJS.ArrayBufferView>(
|
|
410
|
+
buffer: T,
|
|
411
|
+
offset: number,
|
|
412
|
+
callback: (err: Error | null, buf: T) => void,
|
|
413
|
+
): void;
|
|
414
|
+
function randomFill<T extends NodeJS.ArrayBufferView>(
|
|
415
|
+
buffer: T,
|
|
416
|
+
offset: number,
|
|
417
|
+
size: number,
|
|
418
|
+
callback: (err: Error | null, buf: T) => void,
|
|
419
|
+
): void;
|
|
365
420
|
|
|
366
421
|
interface ScryptOptions {
|
|
422
|
+
cost?: number;
|
|
423
|
+
blockSize?: number;
|
|
424
|
+
parallelization?: number;
|
|
367
425
|
N?: number;
|
|
368
426
|
r?: number;
|
|
369
427
|
p?: number;
|
|
@@ -372,7 +430,8 @@ declare module "crypto" {
|
|
|
372
430
|
function scrypt(
|
|
373
431
|
password: BinaryLike,
|
|
374
432
|
salt: BinaryLike,
|
|
375
|
-
keylen: number,
|
|
433
|
+
keylen: number,
|
|
434
|
+
callback: (err: Error | null, derivedKey: Buffer) => void,
|
|
376
435
|
): void;
|
|
377
436
|
function scrypt(
|
|
378
437
|
password: BinaryLike,
|
|
@@ -411,15 +470,19 @@ declare module "crypto" {
|
|
|
411
470
|
key: BinaryLike,
|
|
412
471
|
curve: string,
|
|
413
472
|
inputEncoding?: HexBase64Latin1Encoding,
|
|
414
|
-
outputEncoding?:
|
|
415
|
-
format?:
|
|
473
|
+
outputEncoding?: 'latin1' | 'hex' | 'base64',
|
|
474
|
+
format?: 'uncompressed' | 'compressed' | 'hybrid',
|
|
416
475
|
): Buffer | string;
|
|
417
476
|
generateKeys(): Buffer;
|
|
418
477
|
generateKeys(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string;
|
|
419
478
|
computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
|
|
420
479
|
computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer;
|
|
421
480
|
computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: HexBase64Latin1Encoding): string;
|
|
422
|
-
computeSecret(
|
|
481
|
+
computeSecret(
|
|
482
|
+
other_public_key: string,
|
|
483
|
+
input_encoding: HexBase64Latin1Encoding,
|
|
484
|
+
output_encoding: HexBase64Latin1Encoding,
|
|
485
|
+
): string;
|
|
423
486
|
getPrivateKey(): Buffer;
|
|
424
487
|
getPrivateKey(encoding: HexBase64Latin1Encoding): string;
|
|
425
488
|
getPublicKey(): Buffer;
|
|
@@ -535,60 +598,192 @@ declare module "crypto" {
|
|
|
535
598
|
privateKey: T2;
|
|
536
599
|
}
|
|
537
600
|
|
|
538
|
-
function generateKeyPairSync(
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
601
|
+
function generateKeyPairSync(
|
|
602
|
+
type: 'rsa',
|
|
603
|
+
options: RSAKeyPairOptions<'pem', 'pem'>,
|
|
604
|
+
): KeyPairSyncResult<string, string>;
|
|
605
|
+
function generateKeyPairSync(
|
|
606
|
+
type: 'rsa',
|
|
607
|
+
options: RSAKeyPairOptions<'pem', 'der'>,
|
|
608
|
+
): KeyPairSyncResult<string, Buffer>;
|
|
609
|
+
function generateKeyPairSync(
|
|
610
|
+
type: 'rsa',
|
|
611
|
+
options: RSAKeyPairOptions<'der', 'pem'>,
|
|
612
|
+
): KeyPairSyncResult<Buffer, string>;
|
|
613
|
+
function generateKeyPairSync(
|
|
614
|
+
type: 'rsa',
|
|
615
|
+
options: RSAKeyPairOptions<'der', 'der'>,
|
|
616
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
542
617
|
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
543
618
|
|
|
544
|
-
function generateKeyPairSync(
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
619
|
+
function generateKeyPairSync(
|
|
620
|
+
type: 'dsa',
|
|
621
|
+
options: DSAKeyPairOptions<'pem', 'pem'>,
|
|
622
|
+
): KeyPairSyncResult<string, string>;
|
|
623
|
+
function generateKeyPairSync(
|
|
624
|
+
type: 'dsa',
|
|
625
|
+
options: DSAKeyPairOptions<'pem', 'der'>,
|
|
626
|
+
): KeyPairSyncResult<string, Buffer>;
|
|
627
|
+
function generateKeyPairSync(
|
|
628
|
+
type: 'dsa',
|
|
629
|
+
options: DSAKeyPairOptions<'der', 'pem'>,
|
|
630
|
+
): KeyPairSyncResult<Buffer, string>;
|
|
631
|
+
function generateKeyPairSync(
|
|
632
|
+
type: 'dsa',
|
|
633
|
+
options: DSAKeyPairOptions<'der', 'der'>,
|
|
634
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
548
635
|
function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
549
636
|
|
|
550
|
-
function generateKeyPairSync(
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
637
|
+
function generateKeyPairSync(
|
|
638
|
+
type: 'ec',
|
|
639
|
+
options: ECKeyPairOptions<'pem', 'pem'>,
|
|
640
|
+
): KeyPairSyncResult<string, string>;
|
|
641
|
+
function generateKeyPairSync(
|
|
642
|
+
type: 'ec',
|
|
643
|
+
options: ECKeyPairOptions<'pem', 'der'>,
|
|
644
|
+
): KeyPairSyncResult<string, Buffer>;
|
|
645
|
+
function generateKeyPairSync(
|
|
646
|
+
type: 'ec',
|
|
647
|
+
options: ECKeyPairOptions<'der', 'pem'>,
|
|
648
|
+
): KeyPairSyncResult<Buffer, string>;
|
|
649
|
+
function generateKeyPairSync(
|
|
650
|
+
type: 'ec',
|
|
651
|
+
options: ECKeyPairOptions<'der', 'der'>,
|
|
652
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
554
653
|
function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
555
654
|
|
|
556
|
-
function generateKeyPair(
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
655
|
+
function generateKeyPair(
|
|
656
|
+
type: 'rsa',
|
|
657
|
+
options: RSAKeyPairOptions<'pem', 'pem'>,
|
|
658
|
+
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
659
|
+
): void;
|
|
660
|
+
function generateKeyPair(
|
|
661
|
+
type: 'rsa',
|
|
662
|
+
options: RSAKeyPairOptions<'pem', 'der'>,
|
|
663
|
+
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
|
|
664
|
+
): void;
|
|
665
|
+
function generateKeyPair(
|
|
666
|
+
type: 'rsa',
|
|
667
|
+
options: RSAKeyPairOptions<'der', 'pem'>,
|
|
668
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
|
|
669
|
+
): void;
|
|
670
|
+
function generateKeyPair(
|
|
671
|
+
type: 'rsa',
|
|
672
|
+
options: RSAKeyPairOptions<'der', 'der'>,
|
|
673
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
|
|
674
|
+
): void;
|
|
675
|
+
function generateKeyPair(
|
|
676
|
+
type: 'rsa',
|
|
677
|
+
options: RSAKeyPairKeyObjectOptions,
|
|
678
|
+
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
679
|
+
): void;
|
|
561
680
|
|
|
562
|
-
function generateKeyPair(
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
681
|
+
function generateKeyPair(
|
|
682
|
+
type: 'dsa',
|
|
683
|
+
options: DSAKeyPairOptions<'pem', 'pem'>,
|
|
684
|
+
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
685
|
+
): void;
|
|
686
|
+
function generateKeyPair(
|
|
687
|
+
type: 'dsa',
|
|
688
|
+
options: DSAKeyPairOptions<'pem', 'der'>,
|
|
689
|
+
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
|
|
690
|
+
): void;
|
|
691
|
+
function generateKeyPair(
|
|
692
|
+
type: 'dsa',
|
|
693
|
+
options: DSAKeyPairOptions<'der', 'pem'>,
|
|
694
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
|
|
695
|
+
): void;
|
|
696
|
+
function generateKeyPair(
|
|
697
|
+
type: 'dsa',
|
|
698
|
+
options: DSAKeyPairOptions<'der', 'der'>,
|
|
699
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
|
|
700
|
+
): void;
|
|
701
|
+
function generateKeyPair(
|
|
702
|
+
type: 'dsa',
|
|
703
|
+
options: DSAKeyPairKeyObjectOptions,
|
|
704
|
+
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
705
|
+
): void;
|
|
567
706
|
|
|
568
|
-
function generateKeyPair(
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
707
|
+
function generateKeyPair(
|
|
708
|
+
type: 'ec',
|
|
709
|
+
options: ECKeyPairOptions<'pem', 'pem'>,
|
|
710
|
+
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
711
|
+
): void;
|
|
712
|
+
function generateKeyPair(
|
|
713
|
+
type: 'ec',
|
|
714
|
+
options: ECKeyPairOptions<'pem', 'der'>,
|
|
715
|
+
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
|
|
716
|
+
): void;
|
|
717
|
+
function generateKeyPair(
|
|
718
|
+
type: 'ec',
|
|
719
|
+
options: ECKeyPairOptions<'der', 'pem'>,
|
|
720
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
|
|
721
|
+
): void;
|
|
722
|
+
function generateKeyPair(
|
|
723
|
+
type: 'ec',
|
|
724
|
+
options: ECKeyPairOptions<'der', 'der'>,
|
|
725
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
|
|
726
|
+
): void;
|
|
727
|
+
function generateKeyPair(
|
|
728
|
+
type: 'ec',
|
|
729
|
+
options: ECKeyPairKeyObjectOptions,
|
|
730
|
+
callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
|
|
731
|
+
): void;
|
|
573
732
|
|
|
574
733
|
namespace generateKeyPair {
|
|
575
|
-
function __promisify__(
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
function __promisify__(
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
function __promisify__(
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
function __promisify__(
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
function __promisify__(type:
|
|
734
|
+
function __promisify__(
|
|
735
|
+
type: 'rsa',
|
|
736
|
+
options: RSAKeyPairOptions<'pem', 'pem'>,
|
|
737
|
+
): Promise<{ publicKey: string; privateKey: string }>;
|
|
738
|
+
function __promisify__(
|
|
739
|
+
type: 'rsa',
|
|
740
|
+
options: RSAKeyPairOptions<'pem', 'der'>,
|
|
741
|
+
): Promise<{ publicKey: string; privateKey: Buffer }>;
|
|
742
|
+
function __promisify__(
|
|
743
|
+
type: 'rsa',
|
|
744
|
+
options: RSAKeyPairOptions<'der', 'pem'>,
|
|
745
|
+
): Promise<{ publicKey: Buffer; privateKey: string }>;
|
|
746
|
+
function __promisify__(
|
|
747
|
+
type: 'rsa',
|
|
748
|
+
options: RSAKeyPairOptions<'der', 'der'>,
|
|
749
|
+
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
|
|
750
|
+
function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
751
|
+
|
|
752
|
+
function __promisify__(
|
|
753
|
+
type: 'dsa',
|
|
754
|
+
options: DSAKeyPairOptions<'pem', 'pem'>,
|
|
755
|
+
): Promise<{ publicKey: string; privateKey: string }>;
|
|
756
|
+
function __promisify__(
|
|
757
|
+
type: 'dsa',
|
|
758
|
+
options: DSAKeyPairOptions<'pem', 'der'>,
|
|
759
|
+
): Promise<{ publicKey: string; privateKey: Buffer }>;
|
|
760
|
+
function __promisify__(
|
|
761
|
+
type: 'dsa',
|
|
762
|
+
options: DSAKeyPairOptions<'der', 'pem'>,
|
|
763
|
+
): Promise<{ publicKey: Buffer; privateKey: string }>;
|
|
764
|
+
function __promisify__(
|
|
765
|
+
type: 'dsa',
|
|
766
|
+
options: DSAKeyPairOptions<'der', 'der'>,
|
|
767
|
+
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
|
|
768
|
+
function __promisify__(type: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
769
|
+
|
|
770
|
+
function __promisify__(
|
|
771
|
+
type: 'ec',
|
|
772
|
+
options: ECKeyPairOptions<'pem', 'pem'>,
|
|
773
|
+
): Promise<{ publicKey: string; privateKey: string }>;
|
|
774
|
+
function __promisify__(
|
|
775
|
+
type: 'ec',
|
|
776
|
+
options: ECKeyPairOptions<'pem', 'der'>,
|
|
777
|
+
): Promise<{ publicKey: string; privateKey: Buffer }>;
|
|
778
|
+
function __promisify__(
|
|
779
|
+
type: 'ec',
|
|
780
|
+
options: ECKeyPairOptions<'der', 'pem'>,
|
|
781
|
+
): Promise<{ publicKey: Buffer; privateKey: string }>;
|
|
782
|
+
function __promisify__(
|
|
783
|
+
type: 'ec',
|
|
784
|
+
options: ECKeyPairOptions<'der', 'der'>,
|
|
785
|
+
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
|
|
786
|
+
function __promisify__(type: 'ec', options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
592
787
|
}
|
|
593
788
|
|
|
594
789
|
/**
|
|
@@ -599,10 +794,13 @@ declare module "crypto" {
|
|
|
599
794
|
* If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
|
|
600
795
|
* passed to [`crypto.createPrivateKey()`][].
|
|
601
796
|
*/
|
|
602
|
-
function sign(
|
|
797
|
+
function sign(
|
|
798
|
+
algorithm: string | null | undefined,
|
|
799
|
+
data: NodeJS.ArrayBufferView,
|
|
800
|
+
key: KeyLike | SignPrivateKeyInput,
|
|
801
|
+
): Buffer;
|
|
603
802
|
|
|
604
|
-
interface VerifyKeyWithOptions extends KeyObject, SigningOptions {
|
|
605
|
-
}
|
|
803
|
+
interface VerifyKeyWithOptions extends KeyObject, SigningOptions {}
|
|
606
804
|
|
|
607
805
|
/**
|
|
608
806
|
* Calculates and returns the signature for `data` using the given private key and
|
|
@@ -612,5 +810,10 @@ declare module "crypto" {
|
|
|
612
810
|
* If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
|
|
613
811
|
* passed to [`crypto.createPublicKey()`][].
|
|
614
812
|
*/
|
|
615
|
-
function verify(
|
|
813
|
+
function verify(
|
|
814
|
+
algorithm: string | null | undefined,
|
|
815
|
+
data: NodeJS.ArrayBufferView,
|
|
816
|
+
key: KeyLike | VerifyKeyWithOptions,
|
|
817
|
+
signature: NodeJS.ArrayBufferView,
|
|
818
|
+
): boolean;
|
|
616
819
|
}
|
node v13.13/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "13.13.
|
|
3
|
+
"version": "13.13.39",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -241,6 +241,6 @@
|
|
|
241
241
|
},
|
|
242
242
|
"scripts": {},
|
|
243
243
|
"dependencies": {},
|
|
244
|
-
"typesPublisherContentHash": "
|
|
244
|
+
"typesPublisherContentHash": "157c97c0c8cf6e9afa4b150dfd82763637d000c3503595d3e1b60290ea4209ce",
|
|
245
245
|
"typeScriptVersion": "3.3"
|
|
246
246
|
}
|
node v13.13/ts3.4/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
|
}
|
|
@@ -28,6 +29,7 @@ declare module 'assert' {
|
|
|
28
29
|
expected: any,
|
|
29
30
|
message?: string | Error,
|
|
30
31
|
operator?: string,
|
|
32
|
+
// tslint:disable-next-line:ban-types
|
|
31
33
|
stackStartFn?: Function,
|
|
32
34
|
): never;
|
|
33
35
|
function ok(value: any, message?: string | Error): void;
|
|
@@ -47,7 +49,7 @@ declare module 'assert' {
|
|
|
47
49
|
function throws(block: () => any, message?: string | Error): void;
|
|
48
50
|
function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
|
|
49
51
|
function doesNotThrow(block: () => any, message?: string | Error): void;
|
|
50
|
-
function doesNotThrow(block: () => any, error:
|
|
52
|
+
function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
|
|
51
53
|
|
|
52
54
|
function ifError(value: any): void;
|
|
53
55
|
|
|
@@ -60,7 +62,7 @@ declare module 'assert' {
|
|
|
60
62
|
function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
|
|
61
63
|
function doesNotReject(
|
|
62
64
|
block: (() => Promise<any>) | Promise<any>,
|
|
63
|
-
error:
|
|
65
|
+
error: AssertPredicate,
|
|
64
66
|
message?: string | Error,
|
|
65
67
|
): Promise<void>;
|
|
66
68
|
|
node v13.13/url.d.ts
CHANGED
|
@@ -40,13 +40,19 @@ declare module "url" {
|
|
|
40
40
|
query: string | null;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
|
|
43
44
|
function parse(urlStr: string): UrlWithStringQuery;
|
|
45
|
+
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
|
|
44
46
|
function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
|
|
47
|
+
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
|
|
45
48
|
function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
|
|
49
|
+
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
|
|
46
50
|
function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
|
|
47
51
|
|
|
48
52
|
function format(URL: URL, options?: URLFormatOptions): string;
|
|
53
|
+
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
|
|
49
54
|
function format(urlObject: UrlObject | string): string;
|
|
55
|
+
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
|
|
50
56
|
function resolve(from: string, to: string): string;
|
|
51
57
|
|
|
52
58
|
function domainToASCII(domain: string): string;
|
node v13.13/util.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ declare module "util" {
|
|
|
5
5
|
interface InspectOptionsStylized extends InspectOptions {
|
|
6
6
|
stylize(text: string, styleType: Style): string;
|
|
7
7
|
}
|
|
8
|
-
function format(format
|
|
9
|
-
function formatWithOptions(inspectOptions: InspectOptions, format
|
|
8
|
+
function format(format?: any, ...param: any[]): string;
|
|
9
|
+
function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
|
|
10
10
|
/** @deprecated since v0.11.3 - use a third party module instead. */
|
|
11
11
|
function log(string: string): void;
|
|
12
12
|
function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
|