@types/node 16.18.52 → 16.18.54

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 (102) hide show
  1. node v16.18/README.md +1 -1
  2. node v16.18/assert/strict.d.ts +4 -4
  3. node v16.18/assert.d.ts +48 -24
  4. node v16.18/async_hooks.d.ts +10 -7
  5. node v16.18/buffer.d.ts +47 -24
  6. node v16.18/child_process.d.ts +262 -122
  7. node v16.18/cluster.d.ts +107 -89
  8. node v16.18/console.d.ts +7 -7
  9. node v16.18/constants.d.ts +12 -11
  10. node v16.18/crypto.d.ts +738 -267
  11. node v16.18/dgram.d.ts +81 -45
  12. node v16.18/diagnostics_channel.d.ts +3 -3
  13. node v16.18/dns/promises.d.ts +28 -25
  14. node v16.18/dns.d.ts +202 -61
  15. node v16.18/domain.d.ts +4 -4
  16. node v16.18/events.d.ts +15 -7
  17. node v16.18/fs/promises.d.ts +93 -64
  18. node v16.18/fs.d.ts +485 -290
  19. node v16.18/globals.d.ts +13 -13
  20. node v16.18/http.d.ts +177 -177
  21. node v16.18/http2.d.ts +628 -376
  22. node v16.18/https.d.ts +107 -105
  23. node v16.18/inspector.d.ts +3 -3
  24. node v16.18/module.d.ts +11 -8
  25. node v16.18/net.d.ts +106 -87
  26. node v16.18/os.d.ts +7 -7
  27. node v16.18/package.json +2 -2
  28. node v16.18/path.d.ts +13 -13
  29. node v16.18/perf_hooks.d.ts +17 -15
  30. node v16.18/process.d.ts +144 -124
  31. node v16.18/punycode.d.ts +3 -3
  32. node v16.18/querystring.d.ts +14 -4
  33. node v16.18/readline.d.ts +64 -54
  34. node v16.18/repl.d.ts +67 -61
  35. node v16.18/stream/consumers.d.ts +4 -4
  36. node v16.18/stream/promises.d.ts +56 -15
  37. node v16.18/stream/web.d.ts +19 -19
  38. node v16.18/stream.d.ts +314 -216
  39. node v16.18/string_decoder.d.ts +3 -3
  40. node v16.18/test.d.ts +2 -2
  41. node v16.18/timers/promises.d.ts +4 -4
  42. node v16.18/timers.d.ts +23 -8
  43. node v16.18/tls.d.ts +150 -71
  44. node v16.18/trace_events.d.ts +3 -3
  45. node v16.18/ts4.8/assert/strict.d.ts +4 -4
  46. node v16.18/ts4.8/assert.d.ts +48 -24
  47. node v16.18/ts4.8/async_hooks.d.ts +10 -7
  48. node v16.18/ts4.8/buffer.d.ts +47 -24
  49. node v16.18/ts4.8/child_process.d.ts +262 -122
  50. node v16.18/ts4.8/cluster.d.ts +107 -89
  51. node v16.18/ts4.8/console.d.ts +7 -7
  52. node v16.18/ts4.8/constants.d.ts +12 -11
  53. node v16.18/ts4.8/crypto.d.ts +738 -267
  54. node v16.18/ts4.8/dgram.d.ts +81 -45
  55. node v16.18/ts4.8/diagnostics_channel.d.ts +3 -3
  56. node v16.18/ts4.8/dns/promises.d.ts +28 -25
  57. node v16.18/ts4.8/dns.d.ts +202 -61
  58. node v16.18/ts4.8/domain.d.ts +4 -4
  59. node v16.18/ts4.8/events.d.ts +15 -7
  60. node v16.18/ts4.8/fs/promises.d.ts +93 -64
  61. node v16.18/ts4.8/fs.d.ts +485 -290
  62. node v16.18/ts4.8/globals.d.ts +13 -13
  63. node v16.18/ts4.8/http.d.ts +176 -176
  64. node v16.18/ts4.8/http2.d.ts +628 -376
  65. node v16.18/ts4.8/https.d.ts +107 -105
  66. node v16.18/ts4.8/inspector.d.ts +3 -3
  67. node v16.18/ts4.8/module.d.ts +11 -8
  68. node v16.18/ts4.8/net.d.ts +106 -87
  69. node v16.18/ts4.8/os.d.ts +7 -7
  70. node v16.18/ts4.8/path.d.ts +13 -13
  71. node v16.18/ts4.8/perf_hooks.d.ts +17 -15
  72. node v16.18/ts4.8/process.d.ts +144 -124
  73. node v16.18/ts4.8/punycode.d.ts +3 -3
  74. node v16.18/ts4.8/querystring.d.ts +14 -4
  75. node v16.18/ts4.8/readline.d.ts +64 -54
  76. node v16.18/ts4.8/repl.d.ts +67 -61
  77. node v16.18/ts4.8/stream/consumers.d.ts +4 -4
  78. node v16.18/ts4.8/stream/promises.d.ts +56 -15
  79. node v16.18/ts4.8/stream/web.d.ts +19 -19
  80. node v16.18/ts4.8/stream.d.ts +309 -214
  81. node v16.18/ts4.8/string_decoder.d.ts +3 -3
  82. node v16.18/ts4.8/test.d.ts +2 -2
  83. node v16.18/ts4.8/timers/promises.d.ts +4 -4
  84. node v16.18/ts4.8/timers.d.ts +23 -8
  85. node v16.18/ts4.8/tls.d.ts +150 -71
  86. node v16.18/ts4.8/trace_events.d.ts +3 -3
  87. node v16.18/ts4.8/tty.d.ts +10 -10
  88. node v16.18/ts4.8/url.d.ts +26 -14
  89. node v16.18/ts4.8/util.d.ts +122 -51
  90. node v16.18/ts4.8/v8.d.ts +4 -4
  91. node v16.18/ts4.8/vm.d.ts +18 -18
  92. node v16.18/ts4.8/wasi.d.ts +3 -3
  93. node v16.18/ts4.8/worker_threads.d.ts +77 -77
  94. node v16.18/ts4.8/zlib.d.ts +9 -9
  95. node v16.18/tty.d.ts +10 -10
  96. node v16.18/url.d.ts +26 -14
  97. node v16.18/util.d.ts +122 -51
  98. node v16.18/v8.d.ts +4 -4
  99. node v16.18/vm.d.ts +18 -18
  100. node v16.18/wasi.d.ts +3 -3
  101. node v16.18/worker_threads.d.ts +77 -77
  102. node v16.18/zlib.d.ts +9 -9
@@ -8,9 +8,9 @@
8
8
  * concurrent modifications on the same file or data corruption may occur.
9
9
  * @since v10.0.0
10
10
  */
11
- declare module 'node:fs/promises' {
12
- import { Abortable } from 'node:events';
13
- import { Stream } from 'node:stream';
11
+ declare module "fs/promises" {
12
+ import { Abortable } from "node:events";
13
+ import { Stream } from "node:stream";
14
14
  import {
15
15
  BigIntStats,
16
16
  BufferEncodingOption,
@@ -34,7 +34,7 @@ declare module 'node:fs/promises' {
34
34
  WatchOptions,
35
35
  WriteStream,
36
36
  WriteVResult,
37
- } from 'node:fs';
37
+ } from "node:fs";
38
38
  interface FileChangeInfo<T extends string | Buffer> {
39
39
  eventType: WatchEventType;
40
40
  filename: T | null;
@@ -92,7 +92,10 @@ declare module 'node:fs/promises' {
92
92
  * @since v10.0.0
93
93
  * @return Fulfills with `undefined` upon success.
94
94
  */
95
- appendFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise<void>;
95
+ appendFile(
96
+ data: string | Uint8Array,
97
+ options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null,
98
+ ): Promise<void>;
96
99
  /**
97
100
  * Changes the ownership of the file. A wrapper for [`chown(2)`](http://man7.org/linux/man-pages/man2/chown.2.html).
98
101
  * @since v10.0.0
@@ -209,7 +212,12 @@ declare module 'node:fs/promises' {
209
212
  * integer, the current file position will remain unchanged.
210
213
  * @return Fulfills upon success with an object with two properties:
211
214
  */
212
- read<T extends ArrayBufferView>(buffer: T, offset?: number | null, length?: number | null, position?: number | null): Promise<FileReadResult<T>>;
215
+ read<T extends ArrayBufferView>(
216
+ buffer: T,
217
+ offset?: number | null,
218
+ length?: number | null,
219
+ position?: number | null,
220
+ ): Promise<FileReadResult<T>>;
213
221
  read<T extends ArrayBufferView = Buffer>(options?: FileReadOptions<T>): Promise<FileReadResult<T>>;
214
222
  /**
215
223
  * Asynchronously reads the entire contents of a file.
@@ -229,7 +237,7 @@ declare module 'node:fs/promises' {
229
237
  options?: {
230
238
  encoding?: null | undefined;
231
239
  flag?: OpenMode | undefined;
232
- } | null
240
+ } | null,
233
241
  ): Promise<Buffer>;
234
242
  /**
235
243
  * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
@@ -240,10 +248,10 @@ declare module 'node:fs/promises' {
240
248
  readFile(
241
249
  options:
242
250
  | {
243
- encoding: BufferEncoding;
244
- flag?: OpenMode | undefined;
245
- }
246
- | BufferEncoding
251
+ encoding: BufferEncoding;
252
+ flag?: OpenMode | undefined;
253
+ }
254
+ | BufferEncoding,
247
255
  ): Promise<string>;
248
256
  /**
249
257
  * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
@@ -254,10 +262,10 @@ declare module 'node:fs/promises' {
254
262
  readFile(
255
263
  options?:
256
264
  | (ObjectEncodingOptions & {
257
- flag?: OpenMode | undefined;
258
- })
265
+ flag?: OpenMode | undefined;
266
+ })
259
267
  | BufferEncoding
260
- | null
268
+ | null,
261
269
  ): Promise<string | Buffer>;
262
270
  /**
263
271
  * @since v10.0.0
@@ -266,12 +274,12 @@ declare module 'node:fs/promises' {
266
274
  stat(
267
275
  opts?: StatOptions & {
268
276
  bigint?: false | undefined;
269
- }
277
+ },
270
278
  ): Promise<Stats>;
271
279
  stat(
272
280
  opts: StatOptions & {
273
281
  bigint: true;
274
- }
282
+ },
275
283
  ): Promise<BigIntStats>;
276
284
  stat(opts?: StatOptions): Promise<Stats | BigIntStats>;
277
285
  /**
@@ -327,7 +335,10 @@ declare module 'node:fs/promises' {
327
335
  * beginning of the file.
328
336
  * @since v10.0.0
329
337
  */
330
- writeFile(data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode & Abortable) | BufferEncoding | null): Promise<void>;
338
+ writeFile(
339
+ data: string | Uint8Array,
340
+ options?: (ObjectEncodingOptions & FlagAndOpenMode & Abortable) | BufferEncoding | null,
341
+ ): Promise<void>;
331
342
  /**
332
343
  * Write `buffer` to the file.
333
344
  *
@@ -352,7 +363,7 @@ declare module 'node:fs/promises' {
352
363
  buffer: TBuffer,
353
364
  offset?: number | null,
354
365
  length?: number | null,
355
- position?: number | null
366
+ position?: number | null,
356
367
  ): Promise<{
357
368
  bytesWritten: number;
358
369
  buffer: TBuffer;
@@ -360,7 +371,7 @@ declare module 'node:fs/promises' {
360
371
  write(
361
372
  data: string,
362
373
  position?: number | null,
363
- encoding?: BufferEncoding | null
374
+ encoding?: BufferEncoding | null,
364
375
  ): Promise<{
365
376
  bytesWritten: number;
366
377
  buffer: string;
@@ -536,7 +547,7 @@ declare module 'node:fs/promises' {
536
547
  path: PathLike,
537
548
  options: MakeDirectoryOptions & {
538
549
  recursive: true;
539
- }
550
+ },
540
551
  ): Promise<string | undefined>;
541
552
  /**
542
553
  * Asynchronous mkdir(2) - create a directory.
@@ -549,9 +560,9 @@ declare module 'node:fs/promises' {
549
560
  options?:
550
561
  | Mode
551
562
  | (MakeDirectoryOptions & {
552
- recursive?: false | undefined;
553
- })
554
- | null
563
+ recursive?: false | undefined;
564
+ })
565
+ | null,
555
566
  ): Promise<void>;
556
567
  /**
557
568
  * Asynchronous mkdir(2) - create a directory.
@@ -588,10 +599,10 @@ declare module 'node:fs/promises' {
588
599
  path: PathLike,
589
600
  options?:
590
601
  | (ObjectEncodingOptions & {
591
- withFileTypes?: false | undefined;
592
- })
602
+ withFileTypes?: false | undefined;
603
+ })
593
604
  | BufferEncoding
594
- | null
605
+ | null,
595
606
  ): Promise<string[]>;
596
607
  /**
597
608
  * Asynchronous readdir(3) - read a directory.
@@ -602,10 +613,10 @@ declare module 'node:fs/promises' {
602
613
  path: PathLike,
603
614
  options:
604
615
  | {
605
- encoding: 'buffer';
606
- withFileTypes?: false | undefined;
607
- }
608
- | 'buffer'
616
+ encoding: "buffer";
617
+ withFileTypes?: false | undefined;
618
+ }
619
+ | "buffer",
609
620
  ): Promise<Buffer[]>;
610
621
  /**
611
622
  * Asynchronous readdir(3) - read a directory.
@@ -616,10 +627,10 @@ declare module 'node:fs/promises' {
616
627
  path: PathLike,
617
628
  options?:
618
629
  | (ObjectEncodingOptions & {
619
- withFileTypes?: false | undefined;
620
- })
630
+ withFileTypes?: false | undefined;
631
+ })
621
632
  | BufferEncoding
622
- | null
633
+ | null,
623
634
  ): Promise<string[] | Buffer[]>;
624
635
  /**
625
636
  * Asynchronous readdir(3) - read a directory.
@@ -630,7 +641,7 @@ declare module 'node:fs/promises' {
630
641
  path: PathLike,
631
642
  options: ObjectEncodingOptions & {
632
643
  withFileTypes: true;
633
- }
644
+ },
634
645
  ): Promise<Dirent[]>;
635
646
  /**
636
647
  * Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is
@@ -678,13 +689,13 @@ declare module 'node:fs/promises' {
678
689
  path: PathLike,
679
690
  opts?: StatOptions & {
680
691
  bigint?: false | undefined;
681
- }
692
+ },
682
693
  ): Promise<Stats>;
683
694
  function lstat(
684
695
  path: PathLike,
685
696
  opts: StatOptions & {
686
697
  bigint: true;
687
- }
698
+ },
688
699
  ): Promise<BigIntStats>;
689
700
  function lstat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
690
701
  /**
@@ -695,13 +706,13 @@ declare module 'node:fs/promises' {
695
706
  path: PathLike,
696
707
  opts?: StatOptions & {
697
708
  bigint?: false | undefined;
698
- }
709
+ },
699
710
  ): Promise<Stats>;
700
711
  function stat(
701
712
  path: PathLike,
702
713
  opts: StatOptions & {
703
714
  bigint: true;
704
- }
715
+ },
705
716
  ): Promise<BigIntStats>;
706
717
  function stat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
707
718
  /**
@@ -792,7 +803,10 @@ declare module 'node:fs/promises' {
792
803
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
793
804
  * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
794
805
  */
795
- function realpath(path: PathLike, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
806
+ function realpath(
807
+ path: PathLike,
808
+ options?: ObjectEncodingOptions | BufferEncoding | null,
809
+ ): Promise<string | Buffer>;
796
810
  /**
797
811
  * Creates a unique temporary directory. A unique directory name is generated by
798
812
  * appending six random characters to the end of the provided `prefix`. Due to
@@ -883,14 +897,19 @@ declare module 'node:fs/promises' {
883
897
  */
884
898
  function writeFile(
885
899
  file: PathLike | FileHandle,
886
- data: string | NodeJS.ArrayBufferView | Iterable<string | NodeJS.ArrayBufferView> | AsyncIterable<string | NodeJS.ArrayBufferView> | Stream,
900
+ data:
901
+ | string
902
+ | NodeJS.ArrayBufferView
903
+ | Iterable<string | NodeJS.ArrayBufferView>
904
+ | AsyncIterable<string | NodeJS.ArrayBufferView>
905
+ | Stream,
887
906
  options?:
888
907
  | (ObjectEncodingOptions & {
889
- mode?: Mode | undefined;
890
- flag?: OpenMode | undefined;
891
- } & Abortable)
908
+ mode?: Mode | undefined;
909
+ flag?: OpenMode | undefined;
910
+ } & Abortable)
892
911
  | BufferEncoding
893
- | null
912
+ | null,
894
913
  ): Promise<void>;
895
914
  /**
896
915
  * Asynchronously append data to a file, creating the file if it does not yet
@@ -906,7 +925,11 @@ declare module 'node:fs/promises' {
906
925
  * @param path filename or {FileHandle}
907
926
  * @return Fulfills with `undefined` upon success.
908
927
  */
909
- function appendFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null): Promise<void>;
928
+ function appendFile(
929
+ path: PathLike | FileHandle,
930
+ data: string | Uint8Array,
931
+ options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null,
932
+ ): Promise<void>;
910
933
  /**
911
934
  * Asynchronously reads the entire contents of a file.
912
935
  *
@@ -953,10 +976,10 @@ declare module 'node:fs/promises' {
953
976
  path: PathLike | FileHandle,
954
977
  options?:
955
978
  | ({
956
- encoding?: null | undefined;
957
- flag?: OpenMode | undefined;
958
- } & Abortable)
959
- | null
979
+ encoding?: null | undefined;
980
+ flag?: OpenMode | undefined;
981
+ } & Abortable)
982
+ | null,
960
983
  ): Promise<Buffer>;
961
984
  /**
962
985
  * Asynchronously reads the entire contents of a file.
@@ -969,10 +992,10 @@ declare module 'node:fs/promises' {
969
992
  path: PathLike | FileHandle,
970
993
  options:
971
994
  | ({
972
- encoding: BufferEncoding;
973
- flag?: OpenMode | undefined;
974
- } & Abortable)
975
- | BufferEncoding
995
+ encoding: BufferEncoding;
996
+ flag?: OpenMode | undefined;
997
+ } & Abortable)
998
+ | BufferEncoding,
976
999
  ): Promise<string>;
977
1000
  /**
978
1001
  * Asynchronously reads the entire contents of a file.
@@ -984,12 +1007,15 @@ declare module 'node:fs/promises' {
984
1007
  function readFile(
985
1008
  path: PathLike | FileHandle,
986
1009
  options?:
987
- | (ObjectEncodingOptions &
988
- Abortable & {
989
- flag?: OpenMode | undefined;
990
- })
1010
+ | (
1011
+ & ObjectEncodingOptions
1012
+ & Abortable
1013
+ & {
1014
+ flag?: OpenMode | undefined;
1015
+ }
1016
+ )
991
1017
  | BufferEncoding
992
- | null
1018
+ | null,
993
1019
  ): Promise<string | Buffer>;
994
1020
  /**
995
1021
  * Asynchronously open a directory for iterative scanning. See the POSIX [`opendir(3)`](http://man7.org/linux/man-pages/man3/opendir.3.html) documentation for more detail.
@@ -1054,9 +1080,9 @@ declare module 'node:fs/promises' {
1054
1080
  filename: PathLike,
1055
1081
  options:
1056
1082
  | (WatchOptions & {
1057
- encoding: 'buffer';
1058
- })
1059
- | 'buffer'
1083
+ encoding: "buffer";
1084
+ })
1085
+ | "buffer",
1060
1086
  ): AsyncIterable<FileChangeInfo<Buffer>>;
1061
1087
  /**
1062
1088
  * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
@@ -1075,7 +1101,10 @@ declare module 'node:fs/promises' {
1075
1101
  * If `persistent` is not supplied, the default of `true` is used.
1076
1102
  * If `recursive` is not supplied, the default of `false` is used.
1077
1103
  */
1078
- function watch(filename: PathLike, options: WatchOptions | string): AsyncIterable<FileChangeInfo<string>> | AsyncIterable<FileChangeInfo<Buffer>>;
1104
+ function watch(
1105
+ filename: PathLike,
1106
+ options: WatchOptions | string,
1107
+ ): AsyncIterable<FileChangeInfo<string>> | AsyncIterable<FileChangeInfo<Buffer>>;
1079
1108
  /**
1080
1109
  * Asynchronously copies the entire directory structure from `src` to `dest`,
1081
1110
  * including subdirectories and files.
@@ -1090,6 +1119,6 @@ declare module 'node:fs/promises' {
1090
1119
  */
1091
1120
  function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise<void>;
1092
1121
  }
1093
- declare module 'fs/promises' {
1094
- export * from 'node:fs/promises';
1122
+ declare module "node:fs/promises" {
1123
+ export * from "fs/promises";
1095
1124
  }