@types/node 24.8.1 → 24.9.1

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/zlib.d.ts CHANGED
@@ -92,6 +92,7 @@
92
92
  * @see [source](https://github.com/nodejs/node/blob/v24.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
  /**
@@ -227,7 +228,7 @@ declare module "zlib" {
227
228
  * @returns A 32-bit unsigned integer containing the checksum.
228
229
  * @since v22.2.0
229
230
  */
230
- function crc32(data: string | Buffer | NodeJS.ArrayBufferView, value?: number): number;
231
+ function crc32(data: string | NodeJS.ArrayBufferView, value?: number): number;
231
232
  /**
232
233
  * Creates and returns a new `BrotliCompress` object.
233
234
  * @since v11.7.0, v10.16.0
@@ -291,124 +292,124 @@ declare module "zlib" {
291
292
  */
292
293
  function createZstdDecompress(options?: ZstdOptions): ZstdDecompress;
293
294
  type InputType = string | ArrayBuffer | NodeJS.ArrayBufferView;
294
- type CompressCallback = (error: Error | null, result: Buffer) => void;
295
+ type CompressCallback = (error: Error | null, result: NonSharedBuffer) => void;
295
296
  /**
296
297
  * @since v11.7.0, v10.16.0
297
298
  */
298
299
  function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
299
300
  function brotliCompress(buf: InputType, callback: CompressCallback): void;
300
301
  namespace brotliCompress {
301
- function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
302
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<NonSharedBuffer>;
302
303
  }
303
304
  /**
304
305
  * Compress a chunk of data with `BrotliCompress`.
305
306
  * @since v11.7.0, v10.16.0
306
307
  */
307
- function brotliCompressSync(buf: InputType, options?: BrotliOptions): Buffer;
308
+ function brotliCompressSync(buf: InputType, options?: BrotliOptions): NonSharedBuffer;
308
309
  /**
309
310
  * @since v11.7.0, v10.16.0
310
311
  */
311
312
  function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
312
313
  function brotliDecompress(buf: InputType, callback: CompressCallback): void;
313
314
  namespace brotliDecompress {
314
- function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
315
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<NonSharedBuffer>;
315
316
  }
316
317
  /**
317
318
  * Decompress a chunk of data with `BrotliDecompress`.
318
319
  * @since v11.7.0, v10.16.0
319
320
  */
320
- function brotliDecompressSync(buf: InputType, options?: BrotliOptions): Buffer;
321
+ function brotliDecompressSync(buf: InputType, options?: BrotliOptions): NonSharedBuffer;
321
322
  /**
322
323
  * @since v0.6.0
323
324
  */
324
325
  function deflate(buf: InputType, callback: CompressCallback): void;
325
326
  function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
326
327
  namespace deflate {
327
- function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
328
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
328
329
  }
329
330
  /**
330
331
  * Compress a chunk of data with `Deflate`.
331
332
  * @since v0.11.12
332
333
  */
333
- function deflateSync(buf: InputType, options?: ZlibOptions): Buffer;
334
+ function deflateSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
334
335
  /**
335
336
  * @since v0.6.0
336
337
  */
337
338
  function deflateRaw(buf: InputType, callback: CompressCallback): void;
338
339
  function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
339
340
  namespace deflateRaw {
340
- function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
341
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
341
342
  }
342
343
  /**
343
344
  * Compress a chunk of data with `DeflateRaw`.
344
345
  * @since v0.11.12
345
346
  */
346
- function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
347
+ function deflateRawSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
347
348
  /**
348
349
  * @since v0.6.0
349
350
  */
350
351
  function gzip(buf: InputType, callback: CompressCallback): void;
351
352
  function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
352
353
  namespace gzip {
353
- function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
354
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
354
355
  }
355
356
  /**
356
357
  * Compress a chunk of data with `Gzip`.
357
358
  * @since v0.11.12
358
359
  */
359
- function gzipSync(buf: InputType, options?: ZlibOptions): Buffer;
360
+ function gzipSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
360
361
  /**
361
362
  * @since v0.6.0
362
363
  */
363
364
  function gunzip(buf: InputType, callback: CompressCallback): void;
364
365
  function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
365
366
  namespace gunzip {
366
- function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
367
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
367
368
  }
368
369
  /**
369
370
  * Decompress a chunk of data with `Gunzip`.
370
371
  * @since v0.11.12
371
372
  */
372
- function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer;
373
+ function gunzipSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
373
374
  /**
374
375
  * @since v0.6.0
375
376
  */
376
377
  function inflate(buf: InputType, callback: CompressCallback): void;
377
378
  function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
378
379
  namespace inflate {
379
- function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
380
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
380
381
  }
381
382
  /**
382
383
  * Decompress a chunk of data with `Inflate`.
383
384
  * @since v0.11.12
384
385
  */
385
- function inflateSync(buf: InputType, options?: ZlibOptions): Buffer;
386
+ function inflateSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
386
387
  /**
387
388
  * @since v0.6.0
388
389
  */
389
390
  function inflateRaw(buf: InputType, callback: CompressCallback): void;
390
391
  function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
391
392
  namespace inflateRaw {
392
- function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
393
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
393
394
  }
394
395
  /**
395
396
  * Decompress a chunk of data with `InflateRaw`.
396
397
  * @since v0.11.12
397
398
  */
398
- function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
399
+ function inflateRawSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
399
400
  /**
400
401
  * @since v0.6.0
401
402
  */
402
403
  function unzip(buf: InputType, callback: CompressCallback): void;
403
404
  function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
404
405
  namespace unzip {
405
- function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
406
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<NonSharedBuffer>;
406
407
  }
407
408
  /**
408
409
  * Decompress a chunk of data with `Unzip`.
409
410
  * @since v0.11.12
410
411
  */
411
- function unzipSync(buf: InputType, options?: ZlibOptions): Buffer;
412
+ function unzipSync(buf: InputType, options?: ZlibOptions): NonSharedBuffer;
412
413
  /**
413
414
  * @since v22.15.0
414
415
  * @experimental
@@ -416,14 +417,14 @@ declare module "zlib" {
416
417
  function zstdCompress(buf: InputType, callback: CompressCallback): void;
417
418
  function zstdCompress(buf: InputType, options: ZstdOptions, callback: CompressCallback): void;
418
419
  namespace zstdCompress {
419
- function __promisify__(buffer: InputType, options?: ZstdOptions): Promise<Buffer>;
420
+ function __promisify__(buffer: InputType, options?: ZstdOptions): Promise<NonSharedBuffer>;
420
421
  }
421
422
  /**
422
423
  * Compress a chunk of data with `ZstdCompress`.
423
424
  * @since v22.15.0
424
425
  * @experimental
425
426
  */
426
- function zstdCompressSync(buf: InputType, options?: ZstdOptions): Buffer;
427
+ function zstdCompressSync(buf: InputType, options?: ZstdOptions): NonSharedBuffer;
427
428
  /**
428
429
  * @since v22.15.0
429
430
  * @experimental
@@ -431,14 +432,14 @@ declare module "zlib" {
431
432
  function zstdDecompress(buf: InputType, callback: CompressCallback): void;
432
433
  function zstdDecompress(buf: InputType, options: ZstdOptions, callback: CompressCallback): void;
433
434
  namespace zstdDecompress {
434
- function __promisify__(buffer: InputType, options?: ZstdOptions): Promise<Buffer>;
435
+ function __promisify__(buffer: InputType, options?: ZstdOptions): Promise<NonSharedBuffer>;
435
436
  }
436
437
  /**
437
438
  * Decompress a chunk of data with `ZstdDecompress`.
438
439
  * @since v22.15.0
439
440
  * @experimental
440
441
  */
441
- function zstdDecompressSync(buf: InputType, options?: ZstdOptions): Buffer;
442
+ function zstdDecompressSync(buf: InputType, options?: ZstdOptions): NonSharedBuffer;
442
443
  namespace constants {
443
444
  const BROTLI_DECODE: number;
444
445
  const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;