@types/node 20.14.10 → 20.14.12

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.
Files changed (4) hide show
  1. node/README.md +1 -1
  2. node/buffer.d.ts +0 -81
  3. node/crypto.d.ts +5 -4
  4. node/package.json +2 -2
node/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.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 05 Jul 2024 19:07:00 GMT
11
+ * Last updated: Tue, 23 Jul 2024 18:09:25 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node/buffer.d.ts CHANGED
@@ -2200,31 +2200,6 @@ declare module "buffer" {
2200
2200
  * @return The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.
2201
2201
  */
2202
2202
  lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
2203
- /**
2204
- * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `[index, byte]` pairs from the contents
2205
- * of `buf`.
2206
- *
2207
- * ```js
2208
- * import { Buffer } from 'node:buffer';
2209
- *
2210
- * // Log the entire contents of a `Buffer`.
2211
- *
2212
- * const buf = Buffer.from('buffer');
2213
- *
2214
- * for (const pair of buf.entries()) {
2215
- * console.log(pair);
2216
- * }
2217
- * // Prints:
2218
- * // [0, 98]
2219
- * // [1, 117]
2220
- * // [2, 102]
2221
- * // [3, 102]
2222
- * // [4, 101]
2223
- * // [5, 114]
2224
- * ```
2225
- * @since v1.1.0
2226
- */
2227
- entries(): IterableIterator<[number, number]>;
2228
2203
  /**
2229
2204
  * Equivalent to `buf.indexOf() !== -1`.
2230
2205
  *
@@ -2255,62 +2230,6 @@ declare module "buffer" {
2255
2230
  * @return `true` if `value` was found in `buf`, `false` otherwise.
2256
2231
  */
2257
2232
  includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
2258
- /**
2259
- * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) of `buf` keys (indices).
2260
- *
2261
- * ```js
2262
- * import { Buffer } from 'node:buffer';
2263
- *
2264
- * const buf = Buffer.from('buffer');
2265
- *
2266
- * for (const key of buf.keys()) {
2267
- * console.log(key);
2268
- * }
2269
- * // Prints:
2270
- * // 0
2271
- * // 1
2272
- * // 2
2273
- * // 3
2274
- * // 4
2275
- * // 5
2276
- * ```
2277
- * @since v1.1.0
2278
- */
2279
- keys(): IterableIterator<number>;
2280
- /**
2281
- * Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) for `buf` values (bytes). This function is
2282
- * called automatically when a `Buffer` is used in a `for..of` statement.
2283
- *
2284
- * ```js
2285
- * import { Buffer } from 'node:buffer';
2286
- *
2287
- * const buf = Buffer.from('buffer');
2288
- *
2289
- * for (const value of buf.values()) {
2290
- * console.log(value);
2291
- * }
2292
- * // Prints:
2293
- * // 98
2294
- * // 117
2295
- * // 102
2296
- * // 102
2297
- * // 101
2298
- * // 114
2299
- *
2300
- * for (const value of buf) {
2301
- * console.log(value);
2302
- * }
2303
- * // Prints:
2304
- * // 98
2305
- * // 117
2306
- * // 102
2307
- * // 102
2308
- * // 101
2309
- * // 114
2310
- * ```
2311
- * @since v1.1.0
2312
- */
2313
- values(): IterableIterator<number>;
2314
2233
  }
2315
2234
  var Buffer: BufferConstructor;
2316
2235
  /**
node/crypto.d.ts CHANGED
@@ -1364,6 +1364,7 @@ declare module "crypto" {
1364
1364
  interface SignKeyObjectInput extends SigningOptions {
1365
1365
  key: KeyObject;
1366
1366
  }
1367
+ interface SignJsonWebKeyInput extends JsonWebKeyInput, SigningOptions {}
1367
1368
  interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {}
1368
1369
  interface VerifyKeyObjectInput extends SigningOptions {
1369
1370
  key: KeyObject;
@@ -1459,9 +1460,9 @@ declare module "crypto" {
1459
1460
  * called. Multiple calls to `sign.sign()` will result in an error being thrown.
1460
1461
  * @since v0.1.92
1461
1462
  */
1462
- sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
1463
+ sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput): Buffer;
1463
1464
  sign(
1464
- privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
1465
+ privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
1465
1466
  outputFormat: BinaryToTextEncoding,
1466
1467
  ): string;
1467
1468
  }
@@ -3336,12 +3337,12 @@ declare module "crypto" {
3336
3337
  function sign(
3337
3338
  algorithm: string | null | undefined,
3338
3339
  data: NodeJS.ArrayBufferView,
3339
- key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
3340
+ key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
3340
3341
  ): Buffer;
3341
3342
  function sign(
3342
3343
  algorithm: string | null | undefined,
3343
3344
  data: NodeJS.ArrayBufferView,
3344
- key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
3345
+ key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
3345
3346
  callback: (error: Error | null, data: Buffer) => void,
3346
3347
  ): void;
3347
3348
  /**
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.14.10",
3
+ "version": "20.14.12",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -212,6 +212,6 @@
212
212
  "dependencies": {
213
213
  "undici-types": "~5.26.4"
214
214
  },
215
- "typesPublisherContentHash": "b17c0002475911f007185cf574aab21231670287a5241042fb3697a72c3d2ce3",
215
+ "typesPublisherContentHash": "9e6a411f225bdb4e807bf8a25271d2fc7c8aa163691598117f118732284e76e0",
216
216
  "typeScriptVersion": "4.8"
217
217
  }