@types/node 24.9.0 → 24.9.2
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/README.md +1 -1
- node/buffer.buffer.d.ts +9 -0
- node/buffer.d.ts +8 -4
- node/child_process.d.ts +50 -33
- node/crypto.d.ts +180 -158
- node/dgram.d.ts +9 -8
- node/fs/promises.d.ts +39 -21
- node/fs.d.ts +89 -76
- node/globals.typedarray.d.ts +19 -0
- node/http.d.ts +41 -22
- node/http2.d.ts +29 -22
- node/https.d.ts +82 -50
- node/net.d.ts +7 -6
- node/os.d.ts +3 -2
- node/package.json +2 -2
- node/process.d.ts +6 -5
- node/sqlite.d.ts +6 -7
- node/stream/consumers.d.ts +2 -2
- node/string_decoder.d.ts +2 -2
- node/tls.d.ts +88 -64
- node/ts5.6/buffer.buffer.d.ts +10 -2
- node/ts5.6/globals.typedarray.d.ts +16 -0
- node/url.d.ts +2 -2
- node/util.d.ts +1 -1
- node/v8.d.ts +4 -3
- node/vm.d.ts +4 -3
- node/zlib.d.ts +25 -24
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 |
|
|
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:
|
|
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<
|
|
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):
|
|
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<
|
|
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):
|
|
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<
|
|
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):
|
|
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<
|
|
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):
|
|
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<
|
|
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):
|
|
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<
|
|
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):
|
|
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<
|
|
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):
|
|
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<
|
|
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):
|
|
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<
|
|
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):
|
|
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<
|
|
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):
|
|
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<
|
|
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):
|
|
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;
|