@types/node 12.12.65 → 12.12.69

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.12/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: Thu, 08 Oct 2020 19:27:21 GMT
11
+ * Last updated: Tue, 20 Oct 2020 12:09:03 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
 
@@ -384,19 +384,23 @@ declare module "child_process" {
384
384
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
385
385
  namespace execFile {
386
386
  function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>;
387
- function __promisify__(file: string, args: string[] | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>;
387
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>;
388
388
  function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
389
- function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
389
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
390
390
  function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
391
- function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
391
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
392
392
  function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
393
- function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
393
+ function __promisify__(
394
+ file: string,
395
+ args: ReadonlyArray<string> | undefined | null,
396
+ options: ExecFileOptionsWithOtherEncoding,
397
+ ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
394
398
  function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
395
- function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
399
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
396
400
  function __promisify__(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
397
401
  function __promisify__(
398
402
  file: string,
399
- args: string[] | undefined | null,
403
+ args: ReadonlyArray<string> | undefined | null,
400
404
  options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
401
405
  ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
402
406
  }
node v12.12/crypto.d.ts CHANGED
@@ -277,7 +277,7 @@ declare module "crypto" {
277
277
 
278
278
  function createPrivateKey(key: PrivateKeyInput | string | Buffer): KeyObject;
279
279
  function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject): KeyObject;
280
- function createSecretKey(key: Buffer): KeyObject;
280
+ function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject;
281
281
 
282
282
  function createSign(algorithm: string, options?: stream.WritableOptions): Signer;
283
283
 
@@ -442,7 +442,7 @@ declare module "crypto" {
442
442
  /** @deprecated since v10.0.0 */
443
443
  const DEFAULT_ENCODING: string;
444
444
 
445
- type KeyType = 'rsa' | 'dsa' | 'ec';
445
+ type KeyType = 'rsa' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
446
446
  type KeyFormat = 'pem' | 'der';
447
447
 
448
448
  interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
@@ -456,6 +456,30 @@ declare module "crypto" {
456
456
  privateKey: KeyObject;
457
457
  }
458
458
 
459
+ interface ED25519KeyPairKeyObjectOptions {
460
+ /**
461
+ * No options.
462
+ */
463
+ }
464
+
465
+ interface ED448KeyPairKeyObjectOptions {
466
+ /**
467
+ * No options.
468
+ */
469
+ }
470
+
471
+ interface X25519KeyPairKeyObjectOptions {
472
+ /**
473
+ * No options.
474
+ */
475
+ }
476
+
477
+ interface X448KeyPairKeyObjectOptions {
478
+ /**
479
+ * No options.
480
+ */
481
+ }
482
+
459
483
  interface ECKeyPairKeyObjectOptions {
460
484
  /**
461
485
  * Name of the curve to use.
@@ -540,6 +564,46 @@ declare module "crypto" {
540
564
  };
541
565
  }
542
566
 
567
+ interface ED25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
568
+ publicKeyEncoding: {
569
+ type: 'spki';
570
+ format: PubF;
571
+ };
572
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
573
+ type: 'pkcs8';
574
+ };
575
+ }
576
+
577
+ interface ED448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
578
+ publicKeyEncoding: {
579
+ type: 'spki';
580
+ format: PubF;
581
+ };
582
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
583
+ type: 'pkcs8';
584
+ };
585
+ }
586
+
587
+ interface X25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
588
+ publicKeyEncoding: {
589
+ type: 'spki';
590
+ format: PubF;
591
+ };
592
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
593
+ type: 'pkcs8';
594
+ };
595
+ }
596
+
597
+ interface X448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
598
+ publicKeyEncoding: {
599
+ type: 'spki';
600
+ format: PubF;
601
+ };
602
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
603
+ type: 'pkcs8';
604
+ };
605
+ }
606
+
543
607
  interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
544
608
  publicKey: T1;
545
609
  privateKey: T2;
@@ -563,6 +627,30 @@ declare module "crypto" {
563
627
  function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
564
628
  function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
565
629
 
630
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
631
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
632
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
633
+ function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
634
+ function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
635
+
636
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
637
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
638
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
639
+ function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
640
+ function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
641
+
642
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
643
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
644
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
645
+ function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
646
+ function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
647
+
648
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
649
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
650
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
651
+ function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
652
+ function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
653
+
566
654
  function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
567
655
  function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
568
656
  function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
@@ -581,6 +669,30 @@ declare module "crypto" {
581
669
  function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
582
670
  function generateKeyPair(type: 'ec', options: ECKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
583
671
 
672
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
673
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
674
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
675
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
676
+ function generateKeyPair(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
677
+
678
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
679
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
680
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
681
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
682
+ function generateKeyPair(type: 'ed448', options: ED448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
683
+
684
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
685
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
686
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
687
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
688
+ function generateKeyPair(type: 'x25519', options: X25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
689
+
690
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
691
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
692
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
693
+ function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
694
+ function generateKeyPair(type: 'x448', options: X448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
695
+
584
696
  namespace generateKeyPair {
585
697
  function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
586
698
  function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
@@ -599,6 +711,30 @@ declare module "crypto" {
599
711
  function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
600
712
  function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
601
713
  function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
714
+
715
+ function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
716
+ function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
717
+ function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
718
+ function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
719
+ function __promisify__(type: "ed25519", options?: ED25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
720
+
721
+ function __promisify__(type: "ed448", options: ED448KeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
722
+ function __promisify__(type: "ed448", options: ED448KeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
723
+ function __promisify__(type: "ed448", options: ED448KeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
724
+ function __promisify__(type: "ed448", options: ED448KeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
725
+ function __promisify__(type: "ed448", options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
726
+
727
+ function __promisify__(type: "x25519", options: X25519KeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
728
+ function __promisify__(type: "x25519", options: X25519KeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
729
+ function __promisify__(type: "x25519", options: X25519KeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
730
+ function __promisify__(type: "x25519", options: X25519KeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
731
+ function __promisify__(type: "x25519", options?: X25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
732
+
733
+ function __promisify__(type: "x448", options: X448KeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
734
+ function __promisify__(type: "x448", options: X448KeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
735
+ function __promisify__(type: "x448", options: X448KeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
736
+ function __promisify__(type: "x448", options: X448KeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
737
+ function __promisify__(type: "x448", options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
602
738
  }
603
739
 
604
740
  /**
node v12.12/dgram.d.ts CHANGED
@@ -50,9 +50,9 @@ declare module "dgram" {
50
50
  getSendBufferSize(): number;
51
51
  ref(): this;
52
52
  remoteAddress(): AddressInfo;
53
- send(msg: string | Uint8Array | any[], port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
54
- send(msg: string | Uint8Array | any[], port?: number, callback?: (error: Error | null, bytes: number) => void): void;
55
- send(msg: string | Uint8Array | any[], callback?: (error: Error | null, bytes: number) => void): void;
53
+ send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
54
+ send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
55
+ send(msg: string | Uint8Array | ReadonlyArray<any>, callback?: (error: Error | null, bytes: number) => void): void;
56
56
  send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
57
57
  send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
58
58
  send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
node v12.12/fs.d.ts CHANGED
@@ -739,6 +739,14 @@ declare module "fs" {
739
739
  function unlinkSync(path: PathLike): void;
740
740
 
741
741
  interface RmDirOptions {
742
+ /**
743
+ * If an `EBUSY`, `ENOTEMPTY`, or `EPERM` error is
744
+ * encountered, Node.js will retry the operation with a linear backoff wait of
745
+ * 100ms longer on each try. This option represents the number of retries. This
746
+ * option is ignored if the `recursive` option is not `true`.
747
+ * @default 3
748
+ */
749
+ maxRetries?: number;
742
750
  /**
743
751
  * If `true`, perform a recursive directory removal. In
744
752
  * recursive mode, errors are not reported if `path` does not exist, and
@@ -747,9 +755,6 @@ declare module "fs" {
747
755
  * @default false
748
756
  */
749
757
  recursive?: boolean;
750
- }
751
-
752
- interface RmDirAsyncOptions extends RmDirOptions {
753
758
  /**
754
759
  * If an `EMFILE` error is encountered, Node.js will
755
760
  * retry the operation with a linear backoff of 1ms longer on each try until the
@@ -758,14 +763,6 @@ declare module "fs" {
758
763
  * @default 1000
759
764
  */
760
765
  emfileWait?: number;
761
- /**
762
- * If an `EBUSY`, `ENOTEMPTY`, or `EPERM` error is
763
- * encountered, Node.js will retry the operation with a linear backoff wait of
764
- * 100ms longer on each try. This option represents the number of retries. This
765
- * option is ignored if the `recursive` option is not `true`.
766
- * @default 3
767
- */
768
- maxBusyTries?: number;
769
766
  }
770
767
 
771
768
  /**
@@ -773,7 +770,7 @@ declare module "fs" {
773
770
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
774
771
  */
775
772
  function rmdir(path: PathLike, callback: NoParamCallback): void;
776
- function rmdir(path: PathLike, options: RmDirAsyncOptions, callback: NoParamCallback): void;
773
+ function rmdir(path: PathLike, options: RmDirOptions, callback: NoParamCallback): void;
777
774
 
778
775
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
779
776
  namespace rmdir {
@@ -781,7 +778,7 @@ declare module "fs" {
781
778
  * Asynchronous rmdir(2) - delete a directory.
782
779
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
783
780
  */
784
- function __promisify__(path: PathLike, options?: RmDirAsyncOptions): Promise<void>;
781
+ function __promisify__(path: PathLike, options?: RmDirOptions): Promise<void>;
785
782
  }
786
783
 
787
784
  /**
@@ -1916,12 +1913,12 @@ declare module "fs" {
1916
1913
  */
1917
1914
  function writev(
1918
1915
  fd: number,
1919
- buffers: NodeJS.ArrayBufferView[],
1916
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
1920
1917
  cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
1921
1918
  ): void;
1922
1919
  function writev(
1923
1920
  fd: number,
1924
- buffers: NodeJS.ArrayBufferView[],
1921
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
1925
1922
  position: number,
1926
1923
  cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
1927
1924
  ): void;
@@ -1932,13 +1929,13 @@ declare module "fs" {
1932
1929
  }
1933
1930
 
1934
1931
  namespace writev {
1935
- function __promisify__(fd: number, buffers: NodeJS.ArrayBufferView[], position?: number): Promise<WriteVResult>;
1932
+ function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
1936
1933
  }
1937
1934
 
1938
1935
  /**
1939
1936
  * See `writev`.
1940
1937
  */
1941
- function writevSync(fd: number, buffers: NodeJS.ArrayBufferView[], position?: number): number;
1938
+ function writevSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
1942
1939
 
1943
1940
  interface OpenDirOptions {
1944
1941
  encoding?: BufferEncoding;
@@ -2082,7 +2079,7 @@ declare module "fs" {
2082
2079
  /**
2083
2080
  * See `fs.writev` promisified version.
2084
2081
  */
2085
- writev(buffers: NodeJS.ArrayBufferView[], position?: number): Promise<WriteVResult>;
2082
+ writev(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
2086
2083
 
2087
2084
  /**
2088
2085
  * Asynchronous close(2) - close a `FileHandle`.
@@ -2189,7 +2186,7 @@ declare module "fs" {
2189
2186
  * Asynchronous rmdir(2) - delete a directory.
2190
2187
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
2191
2188
  */
2192
- function rmdir(path: PathLike, options?: RmDirAsyncOptions): Promise<void>;
2189
+ function rmdir(path: PathLike, options?: RmDirOptions): Promise<void>;
2193
2190
 
2194
2191
  /**
2195
2192
  * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
@@ -62,7 +62,7 @@ interface Console {
62
62
  * This method does not display anything unless used in the inspector.
63
63
  * Prints to `stdout` the array `array` formatted as a table.
64
64
  */
65
- table(tabularData: any, properties?: string[]): void;
65
+ table(tabularData: any, properties?: ReadonlyArray<string>): void;
66
66
  /**
67
67
  * Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`.
68
68
  */
@@ -305,7 +305,7 @@ declare class Buffer extends Uint8Array {
305
305
  * @param array The octets to store.
306
306
  * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
307
307
  */
308
- constructor(array: any[]);
308
+ constructor(array: ReadonlyArray<any>);
309
309
  /**
310
310
  * Copies the passed {buffer} data onto a new {Buffer} instance.
311
311
  *
@@ -326,7 +326,7 @@ declare class Buffer extends Uint8Array {
326
326
  * Creates a new Buffer using the passed {data}
327
327
  * @param data data to create a new Buffer
328
328
  */
329
- static from(data: number[]): Buffer;
329
+ static from(data: ReadonlyArray<number>): Buffer;
330
330
  static from(data: Uint8Array): Buffer;
331
331
  /**
332
332
  * Creates a new buffer containing the coerced value of an object
@@ -380,7 +380,7 @@ declare class Buffer extends Uint8Array {
380
380
  * @param totalLength Total length of the buffers when concatenated.
381
381
  * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
382
382
  */
383
- static concat(list: Uint8Array[], totalLength?: number): Buffer;
383
+ static concat(list: ReadonlyArray<Uint8Array>, totalLength?: number): Buffer;
384
384
  /**
385
385
  * The same as buf1.compare(buf2).
386
386
  */
@@ -882,7 +882,7 @@ declare namespace NodeJS {
882
882
  getegid(): number;
883
883
  setegid(id: number | string): void;
884
884
  getgroups(): number[];
885
- setgroups(groups: Array<string | number>): void;
885
+ setgroups(groups: ReadonlyArray<string | number>): void;
886
886
  setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
887
887
  hasUncaughtExceptionCaptureCallback(): boolean;
888
888
  version: string;
node v12.12/http.d.ts CHANGED
@@ -135,13 +135,13 @@ declare module "http" {
135
135
  constructor();
136
136
 
137
137
  setTimeout(msecs: number, callback?: () => void): this;
138
- setHeader(name: string, value: number | string | string[]): void;
138
+ setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
139
139
  getHeader(name: string): number | string | string[] | undefined;
140
140
  getHeaders(): OutgoingHttpHeaders;
141
141
  getHeaderNames(): string[];
142
142
  hasHeader(name: string): boolean;
143
143
  removeHeader(name: string): void;
144
- addTrailers(headers: OutgoingHttpHeaders | Array<[string, string]>): void;
144
+ addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
145
145
  flushHeaders(): void;
146
146
  }
147
147
 
node v12.12/http2.d.ts CHANGED
@@ -356,7 +356,7 @@ declare module "http2" {
356
356
  addListener(event: string | symbol, listener: (...args: any[]) => void): this;
357
357
 
358
358
  emit(event: "altsvc", alt: string, origin: string, stream: number): boolean;
359
- emit(event: "origin", origins: string[]): boolean;
359
+ emit(event: "origin", origins: ReadonlyArray<string>): boolean;
360
360
  emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
361
361
  emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
362
362
  emit(event: string | symbol, ...args: any[]): boolean;
@@ -570,7 +570,7 @@ declare module "http2" {
570
570
  }
571
571
 
572
572
  export class Http2ServerRequest extends stream.Readable {
573
- constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: string[]);
573
+ constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: ReadonlyArray<string>);
574
574
 
575
575
  readonly aborted: boolean;
576
576
  readonly authority: string;
@@ -657,7 +657,7 @@ declare module "http2" {
657
657
  getHeaders(): OutgoingHttpHeaders;
658
658
  hasHeader(name: string): boolean;
659
659
  removeHeader(name: string): void;
660
- setHeader(name: string, value: number | string | string[]): void;
660
+ setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
661
661
  setTimeout(msecs: number, callback?: () => void): void;
662
662
  write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean;
663
663
  write(chunk: string | Uint8Array, encoding: string, callback?: (err: Error) => void): boolean;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "12.12.65",
3
+ "version": "12.12.69",
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": "14629b93e5fabd3bf73026aa37fbe605f97cafa72cf07607a96adc2bdc52ada4",
234
+ "typesPublisherContentHash": "61f7351a46af6aef73c34b6ed0d1789f50c9388d0eba62b56b8261433f176b58",
235
235
  "typeScriptVersion": "3.2"
236
236
  }
@@ -161,7 +161,7 @@ declare module "perf_hooks" {
161
161
  * Property buffered defaults to false.
162
162
  * @param options
163
163
  */
164
- observe(options: { entryTypes: string[], buffered?: boolean }): void;
164
+ observe(options: { entryTypes: ReadonlyArray<string>, buffered?: boolean }): void;
165
165
  }
166
166
 
167
167
  namespace constants {
@@ -1,12 +1,68 @@
1
1
  declare module "punycode" {
2
+ /**
3
+ * @deprecated since v7.0.0
4
+ * The version of the punycode module bundled in Node.js is being deprecated.
5
+ * In a future major version of Node.js this module will be removed.
6
+ * Users currently depending on the punycode module should switch to using
7
+ * the userland-provided Punycode.js module instead.
8
+ */
2
9
  function decode(string: string): string;
10
+ /**
11
+ * @deprecated since v7.0.0
12
+ * The version of the punycode module bundled in Node.js is being deprecated.
13
+ * In a future major version of Node.js this module will be removed.
14
+ * Users currently depending on the punycode module should switch to using
15
+ * the userland-provided Punycode.js module instead.
16
+ */
3
17
  function encode(string: string): string;
18
+ /**
19
+ * @deprecated since v7.0.0
20
+ * The version of the punycode module bundled in Node.js is being deprecated.
21
+ * In a future major version of Node.js this module will be removed.
22
+ * Users currently depending on the punycode module should switch to using
23
+ * the userland-provided Punycode.js module instead.
24
+ */
4
25
  function toUnicode(domain: string): string;
26
+ /**
27
+ * @deprecated since v7.0.0
28
+ * The version of the punycode module bundled in Node.js is being deprecated.
29
+ * In a future major version of Node.js this module will be removed.
30
+ * Users currently depending on the punycode module should switch to using
31
+ * the userland-provided Punycode.js module instead.
32
+ */
5
33
  function toASCII(domain: string): string;
34
+ /**
35
+ * @deprecated since v7.0.0
36
+ * The version of the punycode module bundled in Node.js is being deprecated.
37
+ * In a future major version of Node.js this module will be removed.
38
+ * Users currently depending on the punycode module should switch to using
39
+ * the userland-provided Punycode.js module instead.
40
+ */
6
41
  const ucs2: ucs2;
7
42
  interface ucs2 {
43
+ /**
44
+ * @deprecated since v7.0.0
45
+ * The version of the punycode module bundled in Node.js is being deprecated.
46
+ * In a future major version of Node.js this module will be removed.
47
+ * Users currently depending on the punycode module should switch to using
48
+ * the userland-provided Punycode.js module instead.
49
+ */
8
50
  decode(string: string): number[];
9
- encode(codePoints: number[]): string;
51
+ /**
52
+ * @deprecated since v7.0.0
53
+ * The version of the punycode module bundled in Node.js is being deprecated.
54
+ * In a future major version of Node.js this module will be removed.
55
+ * Users currently depending on the punycode module should switch to using
56
+ * the userland-provided Punycode.js module instead.
57
+ */
58
+ encode(codePoints: ReadonlyArray<number>): string;
10
59
  }
60
+ /**
61
+ * @deprecated since v7.0.0
62
+ * The version of the punycode module bundled in Node.js is being deprecated.
63
+ * In a future major version of Node.js this module will be removed.
64
+ * Users currently depending on the punycode module should switch to using
65
+ * the userland-provided Punycode.js module instead.
66
+ */
11
67
  const version: string;
12
68
  }
node v12.12/stream.d.ts CHANGED
@@ -293,7 +293,10 @@ declare module "stream" {
293
293
  stream5: T,
294
294
  callback?: (err: NodeJS.ErrnoException | null) => void,
295
295
  ): T;
296
- function pipeline(streams: Array<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>, callback?: (err: NodeJS.ErrnoException | null) => void): NodeJS.WritableStream;
296
+ function pipeline(
297
+ streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
298
+ callback?: (err: NodeJS.ErrnoException | null) => void,
299
+ ): NodeJS.WritableStream;
297
300
  function pipeline(
298
301
  stream1: NodeJS.ReadableStream,
299
302
  stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
@@ -310,7 +313,7 @@ declare module "stream" {
310
313
  stream4: NodeJS.ReadWriteStream,
311
314
  stream5: NodeJS.WritableStream,
312
315
  ): Promise<void>;
313
- function __promisify__(streams: Array<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>): Promise<void>;
316
+ function __promisify__(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>): Promise<void>;
314
317
  function __promisify__(
315
318
  stream1: NodeJS.ReadableStream,
316
319
  stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
node v12.12/url.d.ts CHANGED
@@ -93,7 +93,7 @@ declare module "url" {
93
93
  }
94
94
 
95
95
  class URLSearchParams implements Iterable<[string, string]> {
96
- constructor(init?: URLSearchParams | string | { [key: string]: string | string[] | undefined } | Iterable<[string, string]> | Array<[string, string]>);
96
+ constructor(init?: URLSearchParams | string | { [key: string]: string | ReadonlyArray<string> | undefined } | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
97
97
  append(name: string, value: string): void;
98
98
  delete(name: string): void;
99
99
  entries(): IterableIterator<[string, string]>;
node v12.12/vm.d.ts CHANGED
@@ -106,5 +106,5 @@ declare module "vm" {
106
106
  function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any;
107
107
  function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any;
108
108
  function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
109
- function compileFunction(code: string, params?: string[], options?: CompileFunctionOptions): Function;
109
+ function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
110
110
  }
@@ -5,6 +5,7 @@ declare module "worker_threads" {
5
5
 
6
6
  const isMainThread: boolean;
7
7
  const parentPort: null | MessagePort;
8
+ const resourceLimits: ResourceLimits;
8
9
  const SHARE_ENV: unique symbol;
9
10
  const threadId: number;
10
11
  const workerData: any;
@@ -14,9 +15,11 @@ declare module "worker_threads" {
14
15
  readonly port2: MessagePort;
15
16
  }
16
17
 
18
+ type TransferListItem = ArrayBuffer | MessagePort;
19
+
17
20
  class MessagePort extends EventEmitter {
18
21
  close(): void;
19
- postMessage(value: any, transferList?: Array<ArrayBuffer | MessagePort>): void;
22
+ postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
20
23
  ref(): void;
21
24
  unref(): void;
22
25
  start(): void;
@@ -62,6 +65,26 @@ declare module "worker_threads" {
62
65
  stdout?: boolean;
63
66
  stderr?: boolean;
64
67
  execArgv?: string[];
68
+ resourceLimits?: ResourceLimits;
69
+ /**
70
+ * Additional data to send in the first worker message.
71
+ */
72
+ transferList?: TransferListItem[];
73
+ }
74
+
75
+ interface ResourceLimits {
76
+ /**
77
+ * The maximum size of a heap space for recently created objects.
78
+ */
79
+ maxYoungGenerationSizeMb?: number;
80
+ /**
81
+ * The maximum size of the main heap in MB.
82
+ */
83
+ maxOldGenerationSizeMb?: number;
84
+ /**
85
+ * The size of a pre-allocated memory range used for generated code.
86
+ */
87
+ codeRangeSizeMb?: number;
65
88
  }
66
89
 
67
90
  class Worker extends EventEmitter {
@@ -72,7 +95,7 @@ declare module "worker_threads" {
72
95
 
73
96
  constructor(filename: string, options?: WorkerOptions);
74
97
 
75
- postMessage(value: any, transferList?: Array<ArrayBuffer | MessagePort>): void;
98
+ postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
76
99
  ref(): void;
77
100
  unref(): void;
78
101
  /**
node v12.12/zlib.d.ts CHANGED
@@ -112,6 +112,43 @@ declare module "zlib" {
112
112
  function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
113
113
  function unzipSync(buf: InputType, options?: ZlibOptions): Buffer;
114
114
 
115
+ namespace brotliCompress {
116
+ function __promisify__(buffer: InputType, options: BrotliOptions): Promise<Buffer>;
117
+ function __promisify__(buffer: InputType): Promise<Buffer>;
118
+ }
119
+ namespace brotliDecompress {
120
+ function __promisify__(buffer: InputType, options: BrotliOptions): Promise<Buffer>;
121
+ function __promisify__(buffer: InputType): Promise<Buffer>;
122
+ }
123
+ namespace deflate {
124
+ function __promisify__(buffer: InputType): Promise<Buffer>;
125
+ function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
126
+ }
127
+ namespace deflateRaw {
128
+ function __promisify__(buffer: InputType): Promise<Buffer>;
129
+ function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
130
+ }
131
+ namespace gzip {
132
+ function __promisify__(buffer: InputType): Promise<Buffer>;
133
+ function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
134
+ }
135
+ namespace gunzip {
136
+ function __promisify__(buffer: InputType): Promise<Buffer>;
137
+ function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
138
+ }
139
+ namespace inflate {
140
+ function __promisify__(buffer: InputType): Promise<Buffer>;
141
+ function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
142
+ }
143
+ namespace inflateRaw {
144
+ function __promisify__(buffer: InputType): Promise<Buffer>;
145
+ function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
146
+ }
147
+ namespace unzip {
148
+ function __promisify__(buffer: InputType): Promise<Buffer>;
149
+ function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
150
+ }
151
+
115
152
  namespace constants {
116
153
  const BROTLI_DECODE: number;
117
154
  const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;