@types/node 16.18.53 → 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 (100) 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/module.d.ts +11 -8
  24. node v16.18/net.d.ts +106 -87
  25. node v16.18/os.d.ts +7 -7
  26. node v16.18/package.json +2 -2
  27. node v16.18/path.d.ts +13 -13
  28. node v16.18/perf_hooks.d.ts +17 -15
  29. node v16.18/process.d.ts +144 -124
  30. node v16.18/punycode.d.ts +3 -3
  31. node v16.18/querystring.d.ts +14 -4
  32. node v16.18/readline.d.ts +64 -54
  33. node v16.18/repl.d.ts +67 -61
  34. node v16.18/stream/consumers.d.ts +4 -4
  35. node v16.18/stream/promises.d.ts +56 -15
  36. node v16.18/stream/web.d.ts +19 -19
  37. node v16.18/stream.d.ts +314 -216
  38. node v16.18/string_decoder.d.ts +3 -3
  39. node v16.18/test.d.ts +2 -2
  40. node v16.18/timers/promises.d.ts +4 -4
  41. node v16.18/timers.d.ts +23 -8
  42. node v16.18/tls.d.ts +150 -71
  43. node v16.18/trace_events.d.ts +3 -3
  44. node v16.18/ts4.8/assert/strict.d.ts +4 -4
  45. node v16.18/ts4.8/assert.d.ts +48 -24
  46. node v16.18/ts4.8/async_hooks.d.ts +10 -7
  47. node v16.18/ts4.8/buffer.d.ts +47 -24
  48. node v16.18/ts4.8/child_process.d.ts +262 -122
  49. node v16.18/ts4.8/cluster.d.ts +107 -89
  50. node v16.18/ts4.8/console.d.ts +7 -7
  51. node v16.18/ts4.8/constants.d.ts +12 -11
  52. node v16.18/ts4.8/crypto.d.ts +738 -267
  53. node v16.18/ts4.8/dgram.d.ts +81 -45
  54. node v16.18/ts4.8/diagnostics_channel.d.ts +3 -3
  55. node v16.18/ts4.8/dns/promises.d.ts +28 -25
  56. node v16.18/ts4.8/dns.d.ts +202 -61
  57. node v16.18/ts4.8/domain.d.ts +4 -4
  58. node v16.18/ts4.8/events.d.ts +15 -7
  59. node v16.18/ts4.8/fs/promises.d.ts +93 -64
  60. node v16.18/ts4.8/fs.d.ts +485 -290
  61. node v16.18/ts4.8/globals.d.ts +13 -13
  62. node v16.18/ts4.8/http.d.ts +176 -176
  63. node v16.18/ts4.8/http2.d.ts +628 -376
  64. node v16.18/ts4.8/https.d.ts +107 -105
  65. node v16.18/ts4.8/module.d.ts +11 -8
  66. node v16.18/ts4.8/net.d.ts +106 -87
  67. node v16.18/ts4.8/os.d.ts +7 -7
  68. node v16.18/ts4.8/path.d.ts +13 -13
  69. node v16.18/ts4.8/perf_hooks.d.ts +17 -15
  70. node v16.18/ts4.8/process.d.ts +144 -124
  71. node v16.18/ts4.8/punycode.d.ts +3 -3
  72. node v16.18/ts4.8/querystring.d.ts +14 -4
  73. node v16.18/ts4.8/readline.d.ts +64 -54
  74. node v16.18/ts4.8/repl.d.ts +67 -61
  75. node v16.18/ts4.8/stream/consumers.d.ts +4 -4
  76. node v16.18/ts4.8/stream/promises.d.ts +56 -15
  77. node v16.18/ts4.8/stream/web.d.ts +19 -19
  78. node v16.18/ts4.8/stream.d.ts +309 -214
  79. node v16.18/ts4.8/string_decoder.d.ts +3 -3
  80. node v16.18/ts4.8/test.d.ts +2 -2
  81. node v16.18/ts4.8/timers/promises.d.ts +4 -4
  82. node v16.18/ts4.8/timers.d.ts +23 -8
  83. node v16.18/ts4.8/tls.d.ts +150 -71
  84. node v16.18/ts4.8/trace_events.d.ts +3 -3
  85. node v16.18/ts4.8/tty.d.ts +10 -10
  86. node v16.18/ts4.8/url.d.ts +26 -14
  87. node v16.18/ts4.8/util.d.ts +122 -51
  88. node v16.18/ts4.8/v8.d.ts +4 -4
  89. node v16.18/ts4.8/vm.d.ts +18 -18
  90. node v16.18/ts4.8/wasi.d.ts +3 -3
  91. node v16.18/ts4.8/worker_threads.d.ts +77 -77
  92. node v16.18/ts4.8/zlib.d.ts +9 -9
  93. node v16.18/tty.d.ts +10 -10
  94. node v16.18/url.d.ts +26 -14
  95. node v16.18/util.d.ts +122 -51
  96. node v16.18/v8.d.ts +4 -4
  97. node v16.18/vm.d.ts +18 -18
  98. node v16.18/wasi.d.ts +3 -3
  99. node v16.18/worker_threads.d.ts +77 -77
  100. node v16.18/zlib.d.ts +9 -9
@@ -8,8 +8,8 @@
8
8
  * ```
9
9
  * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/util.js)
10
10
  */
11
- declare module 'util' {
12
- import * as types from 'node:util/types';
11
+ declare module "util" {
12
+ import * as types from "node:util/types";
13
13
  export interface InspectOptions {
14
14
  /**
15
15
  * If set to `true`, getters are going to be
@@ -19,7 +19,7 @@ declare module 'util' {
19
19
  * the getter function.
20
20
  * @default `false`
21
21
  */
22
- getters?: 'get' | 'set' | boolean | undefined;
22
+ getters?: "get" | "set" | boolean | undefined;
23
23
  showHidden?: boolean | undefined;
24
24
  /**
25
25
  * @default 2
@@ -50,7 +50,18 @@ declare module 'util' {
50
50
  compact?: boolean | number | undefined;
51
51
  sorted?: boolean | ((a: string, b: string) => number) | undefined;
52
52
  }
53
- export type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
53
+ export type Style =
54
+ | "special"
55
+ | "number"
56
+ | "bigint"
57
+ | "boolean"
58
+ | "undefined"
59
+ | "null"
60
+ | "string"
61
+ | "symbol"
62
+ | "date"
63
+ | "regexp"
64
+ | "module";
54
65
  export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string;
55
66
  export interface InspectOptionsStylized extends InspectOptions {
56
67
  stylize(text: string, styleType: Style): string;
@@ -867,40 +878,83 @@ declare module 'util' {
867
878
  * @return a callback style function
868
879
  */
869
880
  export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
870
- export function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
871
- export function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
872
- export function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
873
- export function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
874
- export function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
875
- export function callbackify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
881
+ export function callbackify<TResult>(
882
+ fn: () => Promise<TResult>,
883
+ ): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
884
+ export function callbackify<T1>(
885
+ fn: (arg1: T1) => Promise<void>,
886
+ ): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
887
+ export function callbackify<T1, TResult>(
888
+ fn: (arg1: T1) => Promise<TResult>,
889
+ ): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
890
+ export function callbackify<T1, T2>(
891
+ fn: (arg1: T1, arg2: T2) => Promise<void>,
892
+ ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
893
+ export function callbackify<T1, T2, TResult>(
894
+ fn: (arg1: T1, arg2: T2) => Promise<TResult>,
895
+ ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
896
+ export function callbackify<T1, T2, T3>(
897
+ fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>,
898
+ ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
876
899
  export function callbackify<T1, T2, T3, TResult>(
877
- fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>
900
+ fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>,
878
901
  ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
879
902
  export function callbackify<T1, T2, T3, T4>(
880
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>
903
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>,
881
904
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
882
905
  export function callbackify<T1, T2, T3, T4, TResult>(
883
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>
884
- ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
906
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>,
907
+ ): (
908
+ arg1: T1,
909
+ arg2: T2,
910
+ arg3: T3,
911
+ arg4: T4,
912
+ callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
913
+ ) => void;
885
914
  export function callbackify<T1, T2, T3, T4, T5>(
886
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>
915
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>,
887
916
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
888
917
  export function callbackify<T1, T2, T3, T4, T5, TResult>(
889
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>
890
- ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
918
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
919
+ ): (
920
+ arg1: T1,
921
+ arg2: T2,
922
+ arg3: T3,
923
+ arg4: T4,
924
+ arg5: T5,
925
+ callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
926
+ ) => void;
891
927
  export function callbackify<T1, T2, T3, T4, T5, T6>(
892
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>
893
- ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
928
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>,
929
+ ): (
930
+ arg1: T1,
931
+ arg2: T2,
932
+ arg3: T3,
933
+ arg4: T4,
934
+ arg5: T5,
935
+ arg6: T6,
936
+ callback: (err: NodeJS.ErrnoException) => void,
937
+ ) => void;
894
938
  export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
895
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
896
- ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
939
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>,
940
+ ): (
941
+ arg1: T1,
942
+ arg2: T2,
943
+ arg3: T3,
944
+ arg4: T4,
945
+ arg5: T5,
946
+ arg6: T6,
947
+ callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
948
+ ) => void;
897
949
  export interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
898
950
  __promisify__: TCustom;
899
951
  }
900
952
  export interface CustomPromisifySymbol<TCustom extends Function> extends Function {
901
953
  [promisify.custom]: TCustom;
902
954
  }
903
- export type CustomPromisify<TCustom extends Function> = CustomPromisifySymbol<TCustom> | CustomPromisifyLegacy<TCustom>;
955
+ export type CustomPromisify<TCustom extends Function> =
956
+ | CustomPromisifySymbol<TCustom>
957
+ | CustomPromisifyLegacy<TCustom>;
904
958
  /**
905
959
  * Takes a function following the common error-first callback style, i.e. taking
906
960
  * an `(err, value) => ...` callback as the last argument, and returns a version
@@ -969,23 +1023,37 @@ declare module 'util' {
969
1023
  * @since v8.0.0
970
1024
  */
971
1025
  export function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
972
- export function promisify<TResult>(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise<TResult>;
1026
+ export function promisify<TResult>(
1027
+ fn: (callback: (err: any, result: TResult) => void) => void,
1028
+ ): () => Promise<TResult>;
973
1029
  export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
974
- export function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
1030
+ export function promisify<T1, TResult>(
1031
+ fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void,
1032
+ ): (arg1: T1) => Promise<TResult>;
975
1033
  export function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
976
- export function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
977
- export function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
978
- export function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
979
- export function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
1034
+ export function promisify<T1, T2, TResult>(
1035
+ fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void,
1036
+ ): (arg1: T1, arg2: T2) => Promise<TResult>;
1037
+ export function promisify<T1, T2>(
1038
+ fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void,
1039
+ ): (arg1: T1, arg2: T2) => Promise<void>;
1040
+ export function promisify<T1, T2, T3, TResult>(
1041
+ fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void,
1042
+ ): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
1043
+ export function promisify<T1, T2, T3>(
1044
+ fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void,
1045
+ ): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
980
1046
  export function promisify<T1, T2, T3, T4, TResult>(
981
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void
1047
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void,
982
1048
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
983
- export function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
1049
+ export function promisify<T1, T2, T3, T4>(
1050
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void,
1051
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
984
1052
  export function promisify<T1, T2, T3, T4, T5, TResult>(
985
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void
1053
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void,
986
1054
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
987
1055
  export function promisify<T1, T2, T3, T4, T5>(
988
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void
1056
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void,
989
1057
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
990
1058
  export function promisify(fn: Function): Function;
991
1059
  export namespace promisify {
@@ -1028,7 +1096,7 @@ declare module 'util' {
1028
1096
  options?: {
1029
1097
  fatal?: boolean | undefined;
1030
1098
  ignoreBOM?: boolean | undefined;
1031
- }
1099
+ },
1032
1100
  );
1033
1101
  /**
1034
1102
  * Decodes the `input` and returns a string. If `options.stream` is `true`, any
@@ -1042,7 +1110,7 @@ declare module 'util' {
1042
1110
  input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
1043
1111
  options?: {
1044
1112
  stream?: boolean | undefined;
1045
- }
1113
+ },
1046
1114
  ): string;
1047
1115
  }
1048
1116
  export interface EncodeIntoResult {
@@ -1095,18 +1163,17 @@ declare module 'util' {
1095
1163
  encodeInto(src: string, dest: Uint8Array): EncodeIntoResult;
1096
1164
  }
1097
1165
 
1098
- import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from 'util';
1166
+ import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from "util";
1099
1167
  global {
1100
1168
  /**
1101
1169
  * `TextDecoder` class is a global reference for `require('util').TextDecoder`
1102
1170
  * https://nodejs.org/api/globals.html#textdecoder
1103
1171
  * @since v11.0.0
1104
1172
  */
1105
- var TextDecoder: typeof globalThis extends {
1173
+ var TextDecoder: typeof globalThis extends {
1106
1174
  onmessage: any;
1107
1175
  TextDecoder: infer TextDecoder;
1108
- }
1109
- ? TextDecoder
1176
+ } ? TextDecoder
1110
1177
  : typeof _TextDecoder;
1111
1178
 
1112
1179
  /**
@@ -1114,19 +1181,18 @@ declare module 'util' {
1114
1181
  * https://nodejs.org/api/globals.html#textencoder
1115
1182
  * @since v11.0.0
1116
1183
  */
1117
- var TextEncoder: typeof globalThis extends {
1184
+ var TextEncoder: typeof globalThis extends {
1118
1185
  onmessage: any;
1119
1186
  TextEncoder: infer TextEncoder;
1120
- }
1121
- ? TextEncoder
1187
+ } ? TextEncoder
1122
1188
  : typeof _TextEncoder;
1123
1189
  }
1124
1190
  }
1125
- declare module 'util/types' {
1126
- export * from 'util/types';
1191
+ declare module "util/types" {
1192
+ export * from "util/types";
1127
1193
  }
1128
- declare module 'util/types' {
1129
- import { KeyObject, webcrypto } from 'node:crypto';
1194
+ declare module "util/types" {
1195
+ import { KeyObject, webcrypto } from "node:crypto";
1130
1196
  /**
1131
1197
  * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or
1132
1198
  * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance.
@@ -1392,7 +1458,10 @@ declare module 'util/types' {
1392
1458
  * ```
1393
1459
  * @since v10.0.0
1394
1460
  */
1395
- function isMap<T>(object: T | {}): object is T extends ReadonlyMap<any, any> ? (unknown extends T ? never : ReadonlyMap<any, any>) : Map<unknown, unknown>;
1461
+ function isMap<T>(
1462
+ object: T | {},
1463
+ ): object is T extends ReadonlyMap<any, any> ? (unknown extends T ? never : ReadonlyMap<any, any>)
1464
+ : Map<unknown, unknown>;
1396
1465
  /**
1397
1466
  * Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance.
1398
1467
  *
@@ -1478,7 +1547,9 @@ declare module 'util/types' {
1478
1547
  * ```
1479
1548
  * @since v10.0.0
1480
1549
  */
1481
- function isSet<T>(object: T | {}): object is T extends ReadonlySet<any> ? (unknown extends T ? never : ReadonlySet<any>) : Set<unknown>;
1550
+ function isSet<T>(
1551
+ object: T | {},
1552
+ ): object is T extends ReadonlySet<any> ? (unknown extends T ? never : ReadonlySet<any>) : Set<unknown>;
1482
1553
  /**
1483
1554
  * Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance.
1484
1555
  *
@@ -1613,9 +1684,9 @@ declare module 'util/types' {
1613
1684
  */
1614
1685
  function isCryptoKey(object: unknown): object is webcrypto.CryptoKey;
1615
1686
  }
1616
- declare module 'node:util' {
1617
- export * from 'util';
1687
+ declare module "node:util" {
1688
+ export * from "util";
1618
1689
  }
1619
- declare module 'node:util/types' {
1620
- export * from 'util/types';
1690
+ declare module "node:util/types" {
1691
+ export * from "util/types";
1621
1692
  }
@@ -6,8 +6,8 @@
6
6
  * ```
7
7
  * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/v8.js)
8
8
  */
9
- declare module 'v8' {
10
- import { Readable } from 'node:stream';
9
+ declare module "v8" {
10
+ import { Readable } from "node:stream";
11
11
  interface HeapSpaceInfo {
12
12
  space_name: string;
13
13
  space_size: number;
@@ -467,6 +467,6 @@ declare module 'v8' {
467
467
  */
468
468
  const promiseHooks: PromiseHooks;
469
469
  }
470
- declare module 'node:v8' {
471
- export * from 'v8';
470
+ declare module "node:v8" {
471
+ export * from "v8";
472
472
  }
@@ -34,7 +34,7 @@
34
34
  * ```
35
35
  * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/vm.js)
36
36
  */
37
- declare module 'vm' {
37
+ declare module "vm" {
38
38
  interface Context extends NodeJS.Dict<any> {}
39
39
  interface BaseOptions {
40
40
  /**
@@ -81,7 +81,7 @@ declare module 'vm' {
81
81
  /**
82
82
  * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
83
83
  */
84
- microtaskMode?: 'afterEvaluate' | undefined;
84
+ microtaskMode?: "afterEvaluate" | undefined;
85
85
  }
86
86
  interface CompileFunctionOptions extends BaseOptions {
87
87
  /**
@@ -118,25 +118,25 @@ declare module 'vm' {
118
118
  origin?: string | undefined;
119
119
  codeGeneration?:
120
120
  | {
121
- /**
122
- * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
123
- * will throw an EvalError.
124
- * @default true
125
- */
126
- strings?: boolean | undefined;
127
- /**
128
- * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
129
- * @default true
130
- */
131
- wasm?: boolean | undefined;
132
- }
121
+ /**
122
+ * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
123
+ * will throw an EvalError.
124
+ * @default true
125
+ */
126
+ strings?: boolean | undefined;
127
+ /**
128
+ * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
129
+ * @default true
130
+ */
131
+ wasm?: boolean | undefined;
132
+ }
133
133
  | undefined;
134
134
  /**
135
135
  * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
136
136
  */
137
- microtaskMode?: 'afterEvaluate' | undefined;
137
+ microtaskMode?: "afterEvaluate" | undefined;
138
138
  }
139
- type MeasureMemoryMode = 'summary' | 'detailed';
139
+ type MeasureMemoryMode = "summary" | "detailed";
140
140
  interface MeasureMemoryOptions {
141
141
  /**
142
142
  * @default 'summary'
@@ -502,6 +502,6 @@ declare module 'vm' {
502
502
  */
503
503
  function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
504
504
  }
505
- declare module 'node:vm' {
506
- export * from 'vm';
505
+ declare module "node:vm" {
506
+ export * from "vm";
507
507
  }
@@ -70,7 +70,7 @@
70
70
  * @experimental
71
71
  * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/wasi.js)
72
72
  */
73
- declare module 'wasi' {
73
+ declare module "wasi" {
74
74
  interface WASIOptions {
75
75
  /**
76
76
  * An array of strings that the WebAssembly application will
@@ -153,6 +153,6 @@ declare module 'wasi' {
153
153
  readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
154
154
  }
155
155
  }
156
- declare module 'node:wasi' {
157
- export * from 'wasi';
156
+ declare module "node:wasi" {
157
+ export * from "wasi";
158
158
  }
@@ -51,15 +51,15 @@
51
51
  * specifically `argv` and `execArgv` options.
52
52
  * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/worker_threads.js)
53
53
  */
54
- declare module 'worker_threads' {
55
- import { Blob } from 'node:buffer';
56
- import { Context } from 'node:vm';
57
- import { EventEmitter } from 'node:events';
58
- import { EventLoopUtilityFunction } from 'node:perf_hooks';
59
- import { FileHandle } from 'node:fs/promises';
60
- import { Readable, Writable } from 'node:stream';
61
- import { URL } from 'node:url';
62
- import { X509Certificate } from 'node:crypto';
54
+ declare module "worker_threads" {
55
+ import { Blob } from "node:buffer";
56
+ import { Context } from "node:vm";
57
+ import { EventEmitter } from "node:events";
58
+ import { EventLoopUtilityFunction } from "node:perf_hooks";
59
+ import { FileHandle } from "node:fs/promises";
60
+ import { Readable, Writable } from "node:stream";
61
+ import { URL } from "node:url";
62
+ import { X509Certificate } from "node:crypto";
63
63
  const isMainThread: boolean;
64
64
  const parentPort: null | MessagePort;
65
65
  const resourceLimits: ResourceLimits;
@@ -205,37 +205,37 @@ declare module 'worker_threads' {
205
205
  * @since v10.5.0
206
206
  */
207
207
  start(): void;
208
- addListener(event: 'close', listener: () => void): this;
209
- addListener(event: 'message', listener: (value: any) => void): this;
210
- addListener(event: 'messageerror', listener: (error: Error) => void): this;
208
+ addListener(event: "close", listener: () => void): this;
209
+ addListener(event: "message", listener: (value: any) => void): this;
210
+ addListener(event: "messageerror", listener: (error: Error) => void): this;
211
211
  addListener(event: string | symbol, listener: (...args: any[]) => void): this;
212
- emit(event: 'close'): boolean;
213
- emit(event: 'message', value: any): boolean;
214
- emit(event: 'messageerror', error: Error): boolean;
212
+ emit(event: "close"): boolean;
213
+ emit(event: "message", value: any): boolean;
214
+ emit(event: "messageerror", error: Error): boolean;
215
215
  emit(event: string | symbol, ...args: any[]): boolean;
216
- on(event: 'close', listener: () => void): this;
217
- on(event: 'message', listener: (value: any) => void): this;
218
- on(event: 'messageerror', listener: (error: Error) => void): this;
216
+ on(event: "close", listener: () => void): this;
217
+ on(event: "message", listener: (value: any) => void): this;
218
+ on(event: "messageerror", listener: (error: Error) => void): this;
219
219
  on(event: string | symbol, listener: (...args: any[]) => void): this;
220
- once(event: 'close', listener: () => void): this;
221
- once(event: 'message', listener: (value: any) => void): this;
222
- once(event: 'messageerror', listener: (error: Error) => void): this;
220
+ once(event: "close", listener: () => void): this;
221
+ once(event: "message", listener: (value: any) => void): this;
222
+ once(event: "messageerror", listener: (error: Error) => void): this;
223
223
  once(event: string | symbol, listener: (...args: any[]) => void): this;
224
- prependListener(event: 'close', listener: () => void): this;
225
- prependListener(event: 'message', listener: (value: any) => void): this;
226
- prependListener(event: 'messageerror', listener: (error: Error) => void): this;
224
+ prependListener(event: "close", listener: () => void): this;
225
+ prependListener(event: "message", listener: (value: any) => void): this;
226
+ prependListener(event: "messageerror", listener: (error: Error) => void): this;
227
227
  prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
228
- prependOnceListener(event: 'close', listener: () => void): this;
229
- prependOnceListener(event: 'message', listener: (value: any) => void): this;
230
- prependOnceListener(event: 'messageerror', listener: (error: Error) => void): this;
228
+ prependOnceListener(event: "close", listener: () => void): this;
229
+ prependOnceListener(event: "message", listener: (value: any) => void): this;
230
+ prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
231
231
  prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
232
- removeListener(event: 'close', listener: () => void): this;
233
- removeListener(event: 'message', listener: (value: any) => void): this;
234
- removeListener(event: 'messageerror', listener: (error: Error) => void): this;
232
+ removeListener(event: "close", listener: () => void): this;
233
+ removeListener(event: "message", listener: (value: any) => void): this;
234
+ removeListener(event: "messageerror", listener: (error: Error) => void): this;
235
235
  removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
236
- off(event: 'close', listener: () => void): this;
237
- off(event: 'message', listener: (value: any) => void): this;
238
- off(event: 'messageerror', listener: (error: Error) => void): this;
236
+ off(event: "close", listener: () => void): this;
237
+ off(event: "message", listener: (value: any) => void): this;
238
+ off(event: "messageerror", listener: (error: Error) => void): this;
239
239
  off(event: string | symbol, listener: (...args: any[]) => void): this;
240
240
  }
241
241
  interface WorkerOptions {
@@ -428,53 +428,53 @@ declare module 'worker_threads' {
428
428
  * @return A promise for a Readable Stream containing a V8 heap snapshot
429
429
  */
430
430
  getHeapSnapshot(): Promise<Readable>;
431
- addListener(event: 'error', listener: (err: Error) => void): this;
432
- addListener(event: 'exit', listener: (exitCode: number) => void): this;
433
- addListener(event: 'message', listener: (value: any) => void): this;
434
- addListener(event: 'messageerror', listener: (error: Error) => void): this;
435
- addListener(event: 'online', listener: () => void): this;
431
+ addListener(event: "error", listener: (err: Error) => void): this;
432
+ addListener(event: "exit", listener: (exitCode: number) => void): this;
433
+ addListener(event: "message", listener: (value: any) => void): this;
434
+ addListener(event: "messageerror", listener: (error: Error) => void): this;
435
+ addListener(event: "online", listener: () => void): this;
436
436
  addListener(event: string | symbol, listener: (...args: any[]) => void): this;
437
- emit(event: 'error', err: Error): boolean;
438
- emit(event: 'exit', exitCode: number): boolean;
439
- emit(event: 'message', value: any): boolean;
440
- emit(event: 'messageerror', error: Error): boolean;
441
- emit(event: 'online'): boolean;
437
+ emit(event: "error", err: Error): boolean;
438
+ emit(event: "exit", exitCode: number): boolean;
439
+ emit(event: "message", value: any): boolean;
440
+ emit(event: "messageerror", error: Error): boolean;
441
+ emit(event: "online"): boolean;
442
442
  emit(event: string | symbol, ...args: any[]): boolean;
443
- on(event: 'error', listener: (err: Error) => void): this;
444
- on(event: 'exit', listener: (exitCode: number) => void): this;
445
- on(event: 'message', listener: (value: any) => void): this;
446
- on(event: 'messageerror', listener: (error: Error) => void): this;
447
- on(event: 'online', listener: () => void): this;
443
+ on(event: "error", listener: (err: Error) => void): this;
444
+ on(event: "exit", listener: (exitCode: number) => void): this;
445
+ on(event: "message", listener: (value: any) => void): this;
446
+ on(event: "messageerror", listener: (error: Error) => void): this;
447
+ on(event: "online", listener: () => void): this;
448
448
  on(event: string | symbol, listener: (...args: any[]) => void): this;
449
- once(event: 'error', listener: (err: Error) => void): this;
450
- once(event: 'exit', listener: (exitCode: number) => void): this;
451
- once(event: 'message', listener: (value: any) => void): this;
452
- once(event: 'messageerror', listener: (error: Error) => void): this;
453
- once(event: 'online', listener: () => void): this;
449
+ once(event: "error", listener: (err: Error) => void): this;
450
+ once(event: "exit", listener: (exitCode: number) => void): this;
451
+ once(event: "message", listener: (value: any) => void): this;
452
+ once(event: "messageerror", listener: (error: Error) => void): this;
453
+ once(event: "online", listener: () => void): this;
454
454
  once(event: string | symbol, listener: (...args: any[]) => void): this;
455
- prependListener(event: 'error', listener: (err: Error) => void): this;
456
- prependListener(event: 'exit', listener: (exitCode: number) => void): this;
457
- prependListener(event: 'message', listener: (value: any) => void): this;
458
- prependListener(event: 'messageerror', listener: (error: Error) => void): this;
459
- prependListener(event: 'online', listener: () => void): this;
455
+ prependListener(event: "error", listener: (err: Error) => void): this;
456
+ prependListener(event: "exit", listener: (exitCode: number) => void): this;
457
+ prependListener(event: "message", listener: (value: any) => void): this;
458
+ prependListener(event: "messageerror", listener: (error: Error) => void): this;
459
+ prependListener(event: "online", listener: () => void): this;
460
460
  prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
461
- prependOnceListener(event: 'error', listener: (err: Error) => void): this;
462
- prependOnceListener(event: 'exit', listener: (exitCode: number) => void): this;
463
- prependOnceListener(event: 'message', listener: (value: any) => void): this;
464
- prependOnceListener(event: 'messageerror', listener: (error: Error) => void): this;
465
- prependOnceListener(event: 'online', listener: () => void): this;
461
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
462
+ prependOnceListener(event: "exit", listener: (exitCode: number) => void): this;
463
+ prependOnceListener(event: "message", listener: (value: any) => void): this;
464
+ prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
465
+ prependOnceListener(event: "online", listener: () => void): this;
466
466
  prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
467
- removeListener(event: 'error', listener: (err: Error) => void): this;
468
- removeListener(event: 'exit', listener: (exitCode: number) => void): this;
469
- removeListener(event: 'message', listener: (value: any) => void): this;
470
- removeListener(event: 'messageerror', listener: (error: Error) => void): this;
471
- removeListener(event: 'online', listener: () => void): this;
467
+ removeListener(event: "error", listener: (err: Error) => void): this;
468
+ removeListener(event: "exit", listener: (exitCode: number) => void): this;
469
+ removeListener(event: "message", listener: (value: any) => void): this;
470
+ removeListener(event: "messageerror", listener: (error: Error) => void): this;
471
+ removeListener(event: "online", listener: () => void): this;
472
472
  removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
473
- off(event: 'error', listener: (err: Error) => void): this;
474
- off(event: 'exit', listener: (exitCode: number) => void): this;
475
- off(event: 'message', listener: (value: any) => void): this;
476
- off(event: 'messageerror', listener: (error: Error) => void): this;
477
- off(event: 'online', listener: () => void): this;
473
+ off(event: "error", listener: (err: Error) => void): this;
474
+ off(event: "exit", listener: (exitCode: number) => void): this;
475
+ off(event: "message", listener: (value: any) => void): this;
476
+ off(event: "messageerror", listener: (error: Error) => void): this;
477
+ off(event: "online", listener: () => void): this;
478
478
  off(event: string | symbol, listener: (...args: any[]) => void): this;
479
479
  }
480
480
  interface BroadcastChannel extends NodeJS.RefCounted {}
@@ -604,8 +604,8 @@ declare module 'worker_threads' {
604
604
  */
605
605
  function receiveMessageOnPort(port: MessagePort):
606
606
  | {
607
- message: any;
608
- }
607
+ message: any;
608
+ }
609
609
  | undefined;
610
610
  type Serializable = string | object | number | boolean | bigint;
611
611
  /**
@@ -644,6 +644,6 @@ declare module 'worker_threads' {
644
644
  */
645
645
  function setEnvironmentData(key: Serializable, value: Serializable): void;
646
646
  }
647
- declare module 'node:worker_threads' {
648
- export * from 'worker_threads';
647
+ declare module "node:worker_threads" {
648
+ export * from "worker_threads";
649
649
  }
@@ -90,8 +90,8 @@
90
90
  * @since v0.5.8
91
91
  * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/zlib.js)
92
92
  */
93
- declare module 'zlib' {
94
- import * as stream from 'node:stream';
93
+ declare module "zlib" {
94
+ import * as stream from "node:stream";
95
95
  interface ZlibOptions {
96
96
  /**
97
97
  * @default constants.Z_NO_FLUSH
@@ -128,11 +128,11 @@ declare module 'zlib' {
128
128
  chunkSize?: number | undefined;
129
129
  params?:
130
130
  | {
131
- /**
132
- * Each key is a `constants.BROTLI_*` constant.
133
- */
134
- [key: number]: boolean | number;
135
- }
131
+ /**
132
+ * Each key is a `constants.BROTLI_*` constant.
133
+ */
134
+ [key: number]: boolean | number;
135
+ }
136
136
  | undefined;
137
137
  maxOutputLength?: number | undefined;
138
138
  }
@@ -512,6 +512,6 @@ declare module 'zlib' {
512
512
  /** @deprecated */
513
513
  const Z_DEFLATED: number;
514
514
  }
515
- declare module 'node:zlib' {
516
- export * from 'zlib';
515
+ declare module "node:zlib" {
516
+ export * from "zlib";
517
517
  }