@types/node 16.18.67 → 16.18.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 v16.18/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v16.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Sun, 03 Dec 2023 18:07:12 GMT
11
+ * Last updated: Sat, 30 Dec 2023 00:22:50 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
node v16.18/crypto.d.ts CHANGED
@@ -628,6 +628,12 @@ declare module "crypto" {
628
628
  export(options: KeyExportOptions<"pem">): string | Buffer;
629
629
  export(options?: KeyExportOptions<"der">): Buffer;
630
630
  export(options?: JwkKeyExportOptions): JsonWebKey;
631
+ /**
632
+ * Returns `true` or `false` depending on whether the keys have exactly the same type, value, and parameters.
633
+ * This method is not [constant time](https://en.wikipedia.org/wiki/Timing_attack).
634
+ * @since v16.15.0
635
+ */
636
+ equals(otherKeyObject: KeyObject): boolean;
631
637
  /**
632
638
  * For secret keys, this property represents the size of the key in bytes. This
633
639
  * property is `undefined` for asymmetric keys.
@@ -2454,6 +2460,10 @@ declare module "crypto" {
2454
2460
  * Name of the curve to use
2455
2461
  */
2456
2462
  namedCurve: string;
2463
+ /**
2464
+ * Must be `'named'` or `'explicit'`. Default: `'named'`.
2465
+ */
2466
+ paramEncoding?: "explicit" | "named" | undefined;
2457
2467
  }
2458
2468
  interface RSAKeyPairKeyObjectOptions {
2459
2469
  /**
@@ -2564,11 +2574,7 @@ declare module "crypto" {
2564
2574
  type: "pkcs8";
2565
2575
  };
2566
2576
  }
2567
- interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2568
- /**
2569
- * Name of the curve to use.
2570
- */
2571
- namedCurve: string;
2577
+ interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> extends ECKeyPairKeyObjectOptions {
2572
2578
  publicKeyEncoding: {
2573
2579
  type: "pkcs1" | "spki";
2574
2580
  format: PubF;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "16.18.67",
3
+ "version": "16.18.69",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -222,7 +222,7 @@
222
222
  },
223
223
  "scripts": {},
224
224
  "dependencies": {},
225
- "typesPublisherContentHash": "146ad482e80fc4407fea597ad49b7c1cc7bd84a775d3a7650ef2ce8734b1adc0",
225
+ "typesPublisherContentHash": "d43488d1e26db613a7affae57a81c266e822b91dfb01f33692e883a7113b1371",
226
226
  "typeScriptVersion": "4.6",
227
227
  "nonNpm": true
228
228
  }
node v16.18/stream.d.ts CHANGED
@@ -38,7 +38,7 @@ declare module "stream" {
38
38
  highWaterMark?: number | undefined;
39
39
  objectMode?: boolean | undefined;
40
40
  construct?(this: T, callback: (error?: Error | null) => void): void;
41
- destroy?(this: T, error: Error | null, callback: (error: Error | null) => void): void;
41
+ destroy?(this: T, error: Error | null, callback: (error?: Error | null) => void): void;
42
42
  autoDestroy?: boolean | undefined;
43
43
  }
44
44
  interface ReadableOptions extends StreamOptions<Readable> {
@@ -829,7 +829,7 @@ declare module "stream" {
829
829
  callback: (error?: Error | null) => void,
830
830
  ): void;
831
831
  final?(this: Duplex, callback: (error?: Error | null) => void): void;
832
- destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void;
832
+ destroy?(this: Duplex, error: Error | null, callback: (error?: Error | null) => void): void;
833
833
  }
834
834
  /**
835
835
  * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces.
@@ -901,7 +901,7 @@ declare module "stream" {
901
901
  }>,
902
902
  callback: (error?: Error | null) => void,
903
903
  ): void;
904
- _destroy(error: Error | null, callback: (error: Error | null) => void): void;
904
+ _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
905
905
  _final(callback: (error?: Error | null) => void): void;
906
906
  write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
907
907
  write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
@@ -1030,7 +1030,7 @@ declare module "stream" {
1030
1030
  callback: (error?: Error | null) => void,
1031
1031
  ): void;
1032
1032
  final?(this: Transform, callback: (error?: Error | null) => void): void;
1033
- destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void;
1033
+ destroy?(this: Transform, error: Error | null, callback: (error?: Error | null) => void): void;
1034
1034
  transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
1035
1035
  flush?(this: Transform, callback: TransformCallback): void;
1036
1036
  }
@@ -628,6 +628,12 @@ declare module "crypto" {
628
628
  export(options: KeyExportOptions<"pem">): string | Buffer;
629
629
  export(options?: KeyExportOptions<"der">): Buffer;
630
630
  export(options?: JwkKeyExportOptions): JsonWebKey;
631
+ /**
632
+ * Returns `true` or `false` depending on whether the keys have exactly the same type, value, and parameters.
633
+ * This method is not [constant time](https://en.wikipedia.org/wiki/Timing_attack).
634
+ * @since v16.15.0
635
+ */
636
+ equals(otherKeyObject: KeyObject): boolean;
631
637
  /**
632
638
  * For secret keys, this property represents the size of the key in bytes. This
633
639
  * property is `undefined` for asymmetric keys.
@@ -2452,6 +2458,10 @@ declare module "crypto" {
2452
2458
  * Name of the curve to use
2453
2459
  */
2454
2460
  namedCurve: string;
2461
+ /**
2462
+ * Must be `'named'` or `'explicit'`. Default: `'named'`.
2463
+ */
2464
+ paramEncoding?: "explicit" | "named" | undefined;
2455
2465
  }
2456
2466
  interface RSAKeyPairKeyObjectOptions {
2457
2467
  /**
@@ -2562,11 +2572,7 @@ declare module "crypto" {
2562
2572
  type: "pkcs8";
2563
2573
  };
2564
2574
  }
2565
- interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2566
- /**
2567
- * Name of the curve to use.
2568
- */
2569
- namedCurve: string;
2575
+ interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> extends ECKeyPairKeyObjectOptions {
2570
2576
  publicKeyEncoding: {
2571
2577
  type: "pkcs1" | "spki";
2572
2578
  format: PubF;
@@ -38,7 +38,7 @@ declare module "stream" {
38
38
  highWaterMark?: number | undefined;
39
39
  objectMode?: boolean | undefined;
40
40
  construct?(this: T, callback: (error?: Error | null) => void): void;
41
- destroy?(this: T, error: Error | null, callback: (error: Error | null) => void): void;
41
+ destroy?(this: T, error: Error | null, callback: (error?: Error | null) => void): void;
42
42
  autoDestroy?: boolean | undefined;
43
43
  }
44
44
  interface ReadableOptions extends StreamOptions<Readable> {
@@ -793,7 +793,7 @@ declare module "stream" {
793
793
  callback: (error?: Error | null) => void,
794
794
  ): void;
795
795
  final?(this: Duplex, callback: (error?: Error | null) => void): void;
796
- destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void;
796
+ destroy?(this: Duplex, error: Error | null, callback: (error?: Error | null) => void): void;
797
797
  }
798
798
  /**
799
799
  * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces.
@@ -865,7 +865,7 @@ declare module "stream" {
865
865
  }>,
866
866
  callback: (error?: Error | null) => void,
867
867
  ): void;
868
- _destroy(error: Error | null, callback: (error: Error | null) => void): void;
868
+ _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
869
869
  _final(callback: (error?: Error | null) => void): void;
870
870
  write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
871
871
  write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
@@ -994,7 +994,7 @@ declare module "stream" {
994
994
  callback: (error?: Error | null) => void,
995
995
  ): void;
996
996
  final?(this: Transform, callback: (error?: Error | null) => void): void;
997
- destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void;
997
+ destroy?(this: Transform, error: Error | null, callback: (error?: Error | null) => void): void;
998
998
  transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
999
999
  flush?(this: Transform, callback: TransformCallback): void;
1000
1000
  }