@types/node 22.18.11 → 22.18.13
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 v22.18/README.md +1 -1
- node v22.18/buffer.buffer.d.ts +9 -0
- node v22.18/buffer.d.ts +8 -4
- node v22.18/child_process.d.ts +50 -33
- node v22.18/crypto.d.ts +151 -131
- node v22.18/dgram.d.ts +9 -8
- node v22.18/fs/promises.d.ts +39 -21
- node v22.18/fs.d.ts +89 -76
- node v22.18/globals.typedarray.d.ts +17 -0
- node v22.18/http.d.ts +41 -22
- node v22.18/http2.d.ts +29 -22
- node v22.18/https.d.ts +82 -50
- node v22.18/net.d.ts +7 -6
- node v22.18/os.d.ts +2 -1
- node v22.18/package.json +2 -2
- node v22.18/process.d.ts +6 -5
- node v22.18/sqlite.d.ts +6 -7
- node v22.18/stream/consumers.d.ts +2 -2
- node v22.18/string_decoder.d.ts +2 -2
- node v22.18/tls.d.ts +88 -64
- node v22.18/ts5.6/buffer.buffer.d.ts +10 -2
- node v22.18/ts5.6/globals.typedarray.d.ts +15 -0
- node v22.18/url.d.ts +2 -2
- node v22.18/util.d.ts +1 -1
- node v22.18/v8.d.ts +4 -3
- node v22.18/vm.d.ts +4 -3
- node v22.18/zlib.d.ts +25 -24
node v22.18/zlib.d.ts
CHANGED
|
@@ -92,6 +92,7 @@
|
|
|
92
92
|
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/zlib.js)
|
|
93
93
|
*/
|
|
94
94
|
declare module "zlib" {
|
|
95
|
+
import { NonSharedBuffer } from "node:buffer";
|
|
95
96
|
import * as stream from "node:stream";
|
|
96
97
|
interface ZlibOptions {
|
|
97
98
|
/**
|
|
@@ -223,7 +224,7 @@ declare module "zlib" {
|
|
|
223
224
|
* @returns A 32-bit unsigned integer containing the checksum.
|
|
224
225
|
* @since v22.2.0
|
|
225
226
|
*/
|
|
226
|
-
function crc32(data: string |
|
|
227
|
+
function crc32(data: string | NodeJS.ArrayBufferView, value?: number): number;
|
|
227
228
|
/**
|
|
228
229
|
* Creates and returns a new `BrotliCompress` object.
|
|
229
230
|
* @since v11.7.0, v10.16.0
|
|
@@ -287,124 +288,124 @@ declare module "zlib" {
|
|
|
287
288
|
*/
|
|
288
289
|
function createZstdDecompress(options?: ZstdOptions): ZstdDecompress;
|
|
289
290
|
type InputType = string | ArrayBuffer | NodeJS.ArrayBufferView;
|
|
290
|
-
type CompressCallback = (error: Error | null, result:
|
|
291
|
+
type CompressCallback = (error: Error | null, result: NonSharedBuffer) => void;
|
|
291
292
|
/**
|
|
292
293
|
* @since v11.7.0, v10.16.0
|
|
293
294
|
*/
|
|
294
295
|
function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
|
|
295
296
|
function brotliCompress(buf: InputType, callback: CompressCallback): void;
|
|
296
297
|
namespace brotliCompress {
|
|
297
|
-
function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<
|
|
298
|
+
function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<NonSharedBuffer>;
|
|
298
299
|
}
|
|
299
300
|
/**
|
|
300
301
|
* Compress a chunk of data with `BrotliCompress`.
|
|
301
302
|
* @since v11.7.0, v10.16.0
|
|
302
303
|
*/
|
|
303
|
-
function brotliCompressSync(buf: InputType, options?: BrotliOptions):
|
|
304
|
+
function brotliCompressSync(buf: InputType, options?: BrotliOptions): NonSharedBuffer;
|
|
304
305
|
/**
|
|
305
306
|
* @since v11.7.0, v10.16.0
|
|
306
307
|
*/
|
|
307
308
|
function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
|
|
308
309
|
function brotliDecompress(buf: InputType, callback: CompressCallback): void;
|
|
309
310
|
namespace brotliDecompress {
|
|
310
|
-
function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<
|
|
311
|
+
function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<NonSharedBuffer>;
|
|
311
312
|
}
|
|
312
313
|
/**
|
|
313
314
|
* Decompress a chunk of data with `BrotliDecompress`.
|
|
314
315
|
* @since v11.7.0, v10.16.0
|
|
315
316
|
*/
|
|
316
|
-
function brotliDecompressSync(buf: InputType, options?: BrotliOptions):
|
|
317
|
+
function brotliDecompressSync(buf: InputType, options?: BrotliOptions): NonSharedBuffer;
|
|
317
318
|
/**
|
|
318
319
|
* @since v0.6.0
|
|
319
320
|
*/
|
|
320
321
|
function deflate(buf: InputType, callback: CompressCallback): void;
|
|
321
322
|
function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
322
323
|
namespace deflate {
|
|
323
|
-
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<
|
|
324
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
|
|
324
325
|
}
|
|
325
326
|
/**
|
|
326
327
|
* Compress a chunk of data with `Deflate`.
|
|
327
328
|
* @since v0.11.12
|
|
328
329
|
*/
|
|
329
|
-
function deflateSync(buf: InputType, options?: ZlibOptions):
|
|
330
|
+
function deflateSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
|
|
330
331
|
/**
|
|
331
332
|
* @since v0.6.0
|
|
332
333
|
*/
|
|
333
334
|
function deflateRaw(buf: InputType, callback: CompressCallback): void;
|
|
334
335
|
function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
335
336
|
namespace deflateRaw {
|
|
336
|
-
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<
|
|
337
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
|
|
337
338
|
}
|
|
338
339
|
/**
|
|
339
340
|
* Compress a chunk of data with `DeflateRaw`.
|
|
340
341
|
* @since v0.11.12
|
|
341
342
|
*/
|
|
342
|
-
function deflateRawSync(buf: InputType, options?: ZlibOptions):
|
|
343
|
+
function deflateRawSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
|
|
343
344
|
/**
|
|
344
345
|
* @since v0.6.0
|
|
345
346
|
*/
|
|
346
347
|
function gzip(buf: InputType, callback: CompressCallback): void;
|
|
347
348
|
function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
348
349
|
namespace gzip {
|
|
349
|
-
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<
|
|
350
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
|
|
350
351
|
}
|
|
351
352
|
/**
|
|
352
353
|
* Compress a chunk of data with `Gzip`.
|
|
353
354
|
* @since v0.11.12
|
|
354
355
|
*/
|
|
355
|
-
function gzipSync(buf: InputType, options?: ZlibOptions):
|
|
356
|
+
function gzipSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
|
|
356
357
|
/**
|
|
357
358
|
* @since v0.6.0
|
|
358
359
|
*/
|
|
359
360
|
function gunzip(buf: InputType, callback: CompressCallback): void;
|
|
360
361
|
function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
361
362
|
namespace gunzip {
|
|
362
|
-
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<
|
|
363
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
|
|
363
364
|
}
|
|
364
365
|
/**
|
|
365
366
|
* Decompress a chunk of data with `Gunzip`.
|
|
366
367
|
* @since v0.11.12
|
|
367
368
|
*/
|
|
368
|
-
function gunzipSync(buf: InputType, options?: ZlibOptions):
|
|
369
|
+
function gunzipSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
|
|
369
370
|
/**
|
|
370
371
|
* @since v0.6.0
|
|
371
372
|
*/
|
|
372
373
|
function inflate(buf: InputType, callback: CompressCallback): void;
|
|
373
374
|
function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
374
375
|
namespace inflate {
|
|
375
|
-
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<
|
|
376
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
|
|
376
377
|
}
|
|
377
378
|
/**
|
|
378
379
|
* Decompress a chunk of data with `Inflate`.
|
|
379
380
|
* @since v0.11.12
|
|
380
381
|
*/
|
|
381
|
-
function inflateSync(buf: InputType, options?: ZlibOptions):
|
|
382
|
+
function inflateSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
|
|
382
383
|
/**
|
|
383
384
|
* @since v0.6.0
|
|
384
385
|
*/
|
|
385
386
|
function inflateRaw(buf: InputType, callback: CompressCallback): void;
|
|
386
387
|
function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
387
388
|
namespace inflateRaw {
|
|
388
|
-
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<
|
|
389
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
|
|
389
390
|
}
|
|
390
391
|
/**
|
|
391
392
|
* Decompress a chunk of data with `InflateRaw`.
|
|
392
393
|
* @since v0.11.12
|
|
393
394
|
*/
|
|
394
|
-
function inflateRawSync(buf: InputType, options?: ZlibOptions):
|
|
395
|
+
function inflateRawSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
|
|
395
396
|
/**
|
|
396
397
|
* @since v0.6.0
|
|
397
398
|
*/
|
|
398
399
|
function unzip(buf: InputType, callback: CompressCallback): void;
|
|
399
400
|
function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
400
401
|
namespace unzip {
|
|
401
|
-
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<
|
|
402
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
|
|
402
403
|
}
|
|
403
404
|
/**
|
|
404
405
|
* Decompress a chunk of data with `Unzip`.
|
|
405
406
|
* @since v0.11.12
|
|
406
407
|
*/
|
|
407
|
-
function unzipSync(buf: InputType, options?: ZlibOptions):
|
|
408
|
+
function unzipSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
|
|
408
409
|
/**
|
|
409
410
|
* @since v22.15.0
|
|
410
411
|
* @experimental
|
|
@@ -412,14 +413,14 @@ declare module "zlib" {
|
|
|
412
413
|
function zstdCompress(buf: InputType, callback: CompressCallback): void;
|
|
413
414
|
function zstdCompress(buf: InputType, options: ZstdOptions, callback: CompressCallback): void;
|
|
414
415
|
namespace zstdCompress {
|
|
415
|
-
function __promisify__(buffer: InputType, options?: ZstdOptions): Promise<
|
|
416
|
+
function __promisify__(buffer: InputType, options?: ZstdOptions): Promise<NonSharedBuffer>;
|
|
416
417
|
}
|
|
417
418
|
/**
|
|
418
419
|
* Compress a chunk of data with `ZstdCompress`.
|
|
419
420
|
* @since v22.15.0
|
|
420
421
|
* @experimental
|
|
421
422
|
*/
|
|
422
|
-
function zstdCompressSync(buf: InputType, options?: ZstdOptions):
|
|
423
|
+
function zstdCompressSync(buf: InputType, options?: ZstdOptions): NonSharedBuffer;
|
|
423
424
|
/**
|
|
424
425
|
* @since v22.15.0
|
|
425
426
|
* @experimental
|
|
@@ -427,14 +428,14 @@ declare module "zlib" {
|
|
|
427
428
|
function zstdDecompress(buf: InputType, callback: CompressCallback): void;
|
|
428
429
|
function zstdDecompress(buf: InputType, options: ZstdOptions, callback: CompressCallback): void;
|
|
429
430
|
namespace zstdDecompress {
|
|
430
|
-
function __promisify__(buffer: InputType, options?: ZstdOptions): Promise<
|
|
431
|
+
function __promisify__(buffer: InputType, options?: ZstdOptions): Promise<NonSharedBuffer>;
|
|
431
432
|
}
|
|
432
433
|
/**
|
|
433
434
|
* Decompress a chunk of data with `ZstdDecompress`.
|
|
434
435
|
* @since v22.15.0
|
|
435
436
|
* @experimental
|
|
436
437
|
*/
|
|
437
|
-
function zstdDecompressSync(buf: InputType, options?: ZstdOptions):
|
|
438
|
+
function zstdDecompressSync(buf: InputType, options?: ZstdOptions): NonSharedBuffer;
|
|
438
439
|
namespace constants {
|
|
439
440
|
const BROTLI_DECODE: number;
|
|
440
441
|
const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;
|