@types/node 18.17.17 → 18.17.19

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 (106) hide show
  1. node v18.17/README.md +1 -1
  2. node v18.17/assert/strict.d.ts +4 -4
  3. node v18.17/assert.d.ts +48 -24
  4. node v18.17/async_hooks.d.ts +10 -7
  5. node v18.17/buffer.d.ts +32 -34
  6. node v18.17/child_process.d.ts +262 -122
  7. node v18.17/cluster.d.ts +107 -89
  8. node v18.17/console.d.ts +7 -7
  9. node v18.17/constants.d.ts +12 -11
  10. node v18.17/crypto.d.ts +746 -268
  11. node v18.17/dgram.d.ts +81 -45
  12. node v18.17/diagnostics_channel.d.ts +3 -3
  13. node v18.17/dns/promises.d.ts +28 -25
  14. node v18.17/dns.d.ts +203 -62
  15. node v18.17/dom-events.d.ts +67 -71
  16. node v18.17/domain.d.ts +4 -4
  17. node v18.17/events.d.ts +15 -7
  18. node v18.17/fs/promises.d.ts +102 -73
  19. node v18.17/fs.d.ts +513 -311
  20. node v18.17/globals.d.ts +16 -18
  21. node v18.17/http.d.ts +185 -185
  22. node v18.17/http2.d.ts +628 -376
  23. node v18.17/https.d.ts +107 -105
  24. node v18.17/inspector.d.ts +3 -3
  25. node v18.17/module.d.ts +11 -8
  26. node v18.17/net.d.ts +112 -93
  27. node v18.17/os.d.ts +7 -7
  28. node v18.17/package.json +2 -2
  29. node v18.17/path.d.ts +13 -13
  30. node v18.17/perf_hooks.d.ts +20 -19
  31. node v18.17/process.d.ts +155 -125
  32. node v18.17/punycode.d.ts +3 -3
  33. node v18.17/querystring.d.ts +14 -4
  34. node v18.17/readline/promises.d.ts +5 -5
  35. node v18.17/readline.d.ts +69 -56
  36. node v18.17/repl.d.ts +67 -61
  37. node v18.17/stream/consumers.d.ts +4 -4
  38. node v18.17/stream/promises.d.ts +56 -15
  39. node v18.17/stream/web.d.ts +26 -20
  40. node v18.17/stream.d.ts +356 -226
  41. node v18.17/string_decoder.d.ts +3 -3
  42. node v18.17/test.d.ts +76 -91
  43. node v18.17/timers/promises.d.ts +4 -4
  44. node v18.17/timers.d.ts +23 -8
  45. node v18.17/tls.d.ts +151 -71
  46. node v18.17/trace_events.d.ts +3 -3
  47. node v18.17/ts4.8/assert/strict.d.ts +4 -4
  48. node v18.17/ts4.8/assert.d.ts +48 -24
  49. node v18.17/ts4.8/async_hooks.d.ts +10 -7
  50. node v18.17/ts4.8/buffer.d.ts +32 -34
  51. node v18.17/ts4.8/child_process.d.ts +262 -122
  52. node v18.17/ts4.8/cluster.d.ts +107 -89
  53. node v18.17/ts4.8/console.d.ts +7 -7
  54. node v18.17/ts4.8/constants.d.ts +12 -11
  55. node v18.17/ts4.8/crypto.d.ts +746 -268
  56. node v18.17/ts4.8/dgram.d.ts +81 -45
  57. node v18.17/ts4.8/diagnostics_channel.d.ts +3 -3
  58. node v18.17/ts4.8/dns/promises.d.ts +28 -25
  59. node v18.17/ts4.8/dns.d.ts +203 -62
  60. node v18.17/ts4.8/dom-events.d.ts +67 -71
  61. node v18.17/ts4.8/domain.d.ts +4 -4
  62. node v18.17/ts4.8/events.d.ts +15 -7
  63. node v18.17/ts4.8/fs/promises.d.ts +102 -73
  64. node v18.17/ts4.8/fs.d.ts +514 -312
  65. node v18.17/ts4.8/globals.d.ts +44 -46
  66. node v18.17/ts4.8/http.d.ts +185 -185
  67. node v18.17/ts4.8/http2.d.ts +628 -376
  68. node v18.17/ts4.8/https.d.ts +107 -105
  69. node v18.17/ts4.8/inspector.d.ts +3 -3
  70. node v18.17/ts4.8/module.d.ts +11 -8
  71. node v18.17/ts4.8/net.d.ts +112 -93
  72. node v18.17/ts4.8/os.d.ts +7 -7
  73. node v18.17/ts4.8/path.d.ts +13 -13
  74. node v18.17/ts4.8/perf_hooks.d.ts +20 -19
  75. node v18.17/ts4.8/process.d.ts +155 -125
  76. node v18.17/ts4.8/punycode.d.ts +3 -3
  77. node v18.17/ts4.8/querystring.d.ts +14 -4
  78. node v18.17/ts4.8/readline/promises.d.ts +5 -5
  79. node v18.17/ts4.8/readline.d.ts +69 -56
  80. node v18.17/ts4.8/repl.d.ts +67 -61
  81. node v18.17/ts4.8/stream/consumers.d.ts +4 -4
  82. node v18.17/ts4.8/stream/promises.d.ts +56 -15
  83. node v18.17/ts4.8/stream/web.d.ts +26 -20
  84. node v18.17/ts4.8/stream.d.ts +321 -217
  85. node v18.17/ts4.8/string_decoder.d.ts +3 -3
  86. node v18.17/ts4.8/test.d.ts +75 -90
  87. node v18.17/ts4.8/timers/promises.d.ts +4 -4
  88. node v18.17/ts4.8/timers.d.ts +23 -8
  89. node v18.17/ts4.8/tls.d.ts +151 -71
  90. node v18.17/ts4.8/trace_events.d.ts +3 -3
  91. node v18.17/ts4.8/tty.d.ts +10 -10
  92. node v18.17/ts4.8/url.d.ts +26 -14
  93. node v18.17/ts4.8/util.d.ts +178 -117
  94. node v18.17/ts4.8/v8.d.ts +4 -4
  95. node v18.17/ts4.8/vm.d.ts +60 -42
  96. node v18.17/ts4.8/wasi.d.ts +3 -3
  97. node v18.17/ts4.8/worker_threads.d.ts +82 -85
  98. node v18.17/ts4.8/zlib.d.ts +9 -9
  99. node v18.17/tty.d.ts +10 -10
  100. node v18.17/url.d.ts +26 -14
  101. node v18.17/util.d.ts +178 -117
  102. node v18.17/v8.d.ts +4 -4
  103. node v18.17/vm.d.ts +60 -42
  104. node v18.17/wasi.d.ts +3 -3
  105. node v18.17/worker_threads.d.ts +82 -85
  106. node v18.17/zlib.d.ts +9 -9
node v18.17/util.d.ts CHANGED
@@ -8,8 +8,8 @@
8
8
  * ```
9
9
  * @see [source](https://github.com/nodejs/node/blob/v18.x/lib/util.js)
10
10
  */
11
- declare module 'node: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 `true`, object's non-enumerable symbols and properties are included in the formatted result.
@@ -85,14 +85,25 @@ declare module 'node:util' {
85
85
  * the getter function.
86
86
  * @default false
87
87
  */
88
- getters?: 'get' | 'set' | boolean | undefined;
88
+ getters?: "get" | "set" | boolean | undefined;
89
89
  /**
90
90
  * If set to `true`, an underscore is used to separate every three digits in all bigints and numbers.
91
91
  * @default false
92
92
  */
93
93
  numericSeparator?: boolean | undefined;
94
94
  }
95
- export type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
95
+ export type Style =
96
+ | "special"
97
+ | "number"
98
+ | "bigint"
99
+ | "boolean"
100
+ | "undefined"
101
+ | "null"
102
+ | "string"
103
+ | "symbol"
104
+ | "date"
105
+ | "regexp"
106
+ | "module";
96
107
  export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => any; // TODO: , inspect: inspect
97
108
  export interface InspectOptionsStylized extends InspectOptions {
98
109
  stylize(text: string, styleType: Style): string;
@@ -951,40 +962,83 @@ declare module 'node:util' {
951
962
  * @return a callback style function
952
963
  */
953
964
  export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
954
- export function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
955
- export function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
956
- export function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
957
- export function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
958
- 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;
959
- 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;
965
+ export function callbackify<TResult>(
966
+ fn: () => Promise<TResult>,
967
+ ): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
968
+ export function callbackify<T1>(
969
+ fn: (arg1: T1) => Promise<void>,
970
+ ): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
971
+ export function callbackify<T1, TResult>(
972
+ fn: (arg1: T1) => Promise<TResult>,
973
+ ): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
974
+ export function callbackify<T1, T2>(
975
+ fn: (arg1: T1, arg2: T2) => Promise<void>,
976
+ ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
977
+ export function callbackify<T1, T2, TResult>(
978
+ fn: (arg1: T1, arg2: T2) => Promise<TResult>,
979
+ ): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
980
+ export function callbackify<T1, T2, T3>(
981
+ fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>,
982
+ ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
960
983
  export function callbackify<T1, T2, T3, TResult>(
961
- fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>
984
+ fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>,
962
985
  ): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
963
986
  export function callbackify<T1, T2, T3, T4>(
964
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>
987
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>,
965
988
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
966
989
  export function callbackify<T1, T2, T3, T4, TResult>(
967
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>
968
- ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
990
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>,
991
+ ): (
992
+ arg1: T1,
993
+ arg2: T2,
994
+ arg3: T3,
995
+ arg4: T4,
996
+ callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
997
+ ) => void;
969
998
  export function callbackify<T1, T2, T3, T4, T5>(
970
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>
999
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>,
971
1000
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
972
1001
  export function callbackify<T1, T2, T3, T4, T5, TResult>(
973
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>
974
- ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
1002
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
1003
+ ): (
1004
+ arg1: T1,
1005
+ arg2: T2,
1006
+ arg3: T3,
1007
+ arg4: T4,
1008
+ arg5: T5,
1009
+ callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
1010
+ ) => void;
975
1011
  export function callbackify<T1, T2, T3, T4, T5, T6>(
976
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>
977
- ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
1012
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>,
1013
+ ): (
1014
+ arg1: T1,
1015
+ arg2: T2,
1016
+ arg3: T3,
1017
+ arg4: T4,
1018
+ arg5: T5,
1019
+ arg6: T6,
1020
+ callback: (err: NodeJS.ErrnoException) => void,
1021
+ ) => void;
978
1022
  export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
979
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
980
- ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
1023
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>,
1024
+ ): (
1025
+ arg1: T1,
1026
+ arg2: T2,
1027
+ arg3: T3,
1028
+ arg4: T4,
1029
+ arg5: T5,
1030
+ arg6: T6,
1031
+ callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
1032
+ ) => void;
981
1033
  export interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
982
1034
  __promisify__: TCustom;
983
1035
  }
984
1036
  export interface CustomPromisifySymbol<TCustom extends Function> extends Function {
985
1037
  [promisify.custom]: TCustom;
986
1038
  }
987
- export type CustomPromisify<TCustom extends Function> = CustomPromisifySymbol<TCustom> | CustomPromisifyLegacy<TCustom>;
1039
+ export type CustomPromisify<TCustom extends Function> =
1040
+ | CustomPromisifySymbol<TCustom>
1041
+ | CustomPromisifyLegacy<TCustom>;
988
1042
  /**
989
1043
  * Takes a function following the common error-first callback style, i.e. taking
990
1044
  * an `(err, value) => ...` callback as the last argument, and returns a version
@@ -1053,23 +1107,37 @@ declare module 'node:util' {
1053
1107
  * @since v8.0.0
1054
1108
  */
1055
1109
  export function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
1056
- export function promisify<TResult>(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise<TResult>;
1110
+ export function promisify<TResult>(
1111
+ fn: (callback: (err: any, result: TResult) => void) => void,
1112
+ ): () => Promise<TResult>;
1057
1113
  export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
1058
- export function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
1114
+ export function promisify<T1, TResult>(
1115
+ fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void,
1116
+ ): (arg1: T1) => Promise<TResult>;
1059
1117
  export function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
1060
- export function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
1061
- export function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
1062
- 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>;
1063
- 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>;
1118
+ export function promisify<T1, T2, TResult>(
1119
+ fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void,
1120
+ ): (arg1: T1, arg2: T2) => Promise<TResult>;
1121
+ export function promisify<T1, T2>(
1122
+ fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void,
1123
+ ): (arg1: T1, arg2: T2) => Promise<void>;
1124
+ export function promisify<T1, T2, T3, TResult>(
1125
+ fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void,
1126
+ ): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
1127
+ export function promisify<T1, T2, T3>(
1128
+ fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void,
1129
+ ): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
1064
1130
  export function promisify<T1, T2, T3, T4, TResult>(
1065
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void
1131
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void,
1066
1132
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
1067
- 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>;
1133
+ export function promisify<T1, T2, T3, T4>(
1134
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void,
1135
+ ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
1068
1136
  export function promisify<T1, T2, T3, T4, T5, TResult>(
1069
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void
1137
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void,
1070
1138
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
1071
1139
  export function promisify<T1, T2, T3, T4, T5>(
1072
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void
1140
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void,
1073
1141
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
1074
1142
  export function promisify(fn: Function): Function;
1075
1143
  export namespace promisify {
@@ -1108,7 +1176,7 @@ declare module 'node:util' {
1108
1176
  options?: {
1109
1177
  fatal?: boolean | undefined;
1110
1178
  ignoreBOM?: boolean | undefined;
1111
- }
1179
+ },
1112
1180
  );
1113
1181
  /**
1114
1182
  * Decodes the `input` and returns a string. If `options.stream` is `true`, any
@@ -1122,7 +1190,7 @@ declare module 'node:util' {
1122
1190
  input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
1123
1191
  options?: {
1124
1192
  stream?: boolean | undefined;
1125
- }
1193
+ },
1126
1194
  ): string;
1127
1195
  }
1128
1196
  export interface EncodeIntoResult {
@@ -1177,18 +1245,17 @@ declare module 'node:util' {
1177
1245
  encodeInto(src: string, dest: Uint8Array): EncodeIntoResult;
1178
1246
  }
1179
1247
 
1180
- import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from 'util';
1248
+ import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from "util";
1181
1249
  global {
1182
1250
  /**
1183
1251
  * `TextDecoder` class is a global reference for `require('util').TextDecoder`
1184
1252
  * https://nodejs.org/api/globals.html#textdecoder
1185
1253
  * @since v11.0.0
1186
1254
  */
1187
- var TextDecoder: typeof globalThis extends {
1255
+ var TextDecoder: typeof globalThis extends {
1188
1256
  onmessage: any;
1189
1257
  TextDecoder: infer TextDecoder;
1190
- }
1191
- ? TextDecoder
1258
+ } ? TextDecoder
1192
1259
  : typeof _TextDecoder;
1193
1260
 
1194
1261
  /**
@@ -1196,11 +1263,10 @@ declare module 'node:util' {
1196
1263
  * https://nodejs.org/api/globals.html#textencoder
1197
1264
  * @since v11.0.0
1198
1265
  */
1199
- var TextEncoder: typeof globalThis extends {
1266
+ var TextEncoder: typeof globalThis extends {
1200
1267
  onmessage: any;
1201
1268
  TextEncoder: infer TextEncoder;
1202
- }
1203
- ? TextEncoder
1269
+ } ? TextEncoder
1204
1270
  : typeof _TextEncoder;
1205
1271
  }
1206
1272
 
@@ -1244,7 +1310,6 @@ declare module 'node:util' {
1244
1310
  * or boolean values.
1245
1311
  * - `positionals` Positional arguments.
1246
1312
  * - `tokens` Detailed parse information (only if `tokens` was specified).
1247
- *
1248
1313
  */
1249
1314
  export function parseArgs<T extends ParseArgsConfig>(config?: T): ParsedResults<T>;
1250
1315
 
@@ -1252,7 +1317,7 @@ declare module 'node:util' {
1252
1317
  /**
1253
1318
  * Type of argument.
1254
1319
  */
1255
- type: 'string' | 'boolean';
1320
+ type: "string" | "boolean";
1256
1321
  /**
1257
1322
  * Whether this option can be provided multiple times.
1258
1323
  * If `true`, all values will be collected in an array.
@@ -1313,89 +1378,81 @@ declare module 'node:util' {
1313
1378
  This is technically incorrect but is a much nicer UX for the common case.
1314
1379
  The IfDefaultsTrue version is for things which default to true; the IfDefaultsFalse version is for things which default to false.
1315
1380
  */
1316
- type IfDefaultsTrue<T, IfTrue, IfFalse> = T extends true
1317
- ? IfTrue
1318
- : T extends false
1319
- ? IfFalse
1381
+ type IfDefaultsTrue<T, IfTrue, IfFalse> = T extends true ? IfTrue
1382
+ : T extends false ? IfFalse
1320
1383
  : IfTrue;
1321
1384
 
1322
1385
  // we put the `extends false` condition first here because `undefined` compares like `any` when `strictNullChecks: false`
1323
- type IfDefaultsFalse<T, IfTrue, IfFalse> = T extends false
1324
- ? IfFalse
1325
- : T extends true
1326
- ? IfTrue
1386
+ type IfDefaultsFalse<T, IfTrue, IfFalse> = T extends false ? IfFalse
1387
+ : T extends true ? IfTrue
1327
1388
  : IfFalse;
1328
1389
 
1329
1390
  type ExtractOptionValue<T extends ParseArgsConfig, O extends ParseArgsOptionConfig> = IfDefaultsTrue<
1330
- T['strict'],
1331
- O['type'] extends 'string' ? string : O['type'] extends 'boolean' ? boolean : string | boolean,
1391
+ T["strict"],
1392
+ O["type"] extends "string" ? string : O["type"] extends "boolean" ? boolean : string | boolean,
1332
1393
  string | boolean
1333
1394
  >;
1334
1395
 
1335
1396
  type ParsedValues<T extends ParseArgsConfig> =
1336
- & IfDefaultsTrue<T['strict'], unknown, { [longOption: string]: undefined | string | boolean }>
1337
- & (T['options'] extends ParseArgsOptionsConfig
1338
- ? {
1339
- -readonly [LongOption in keyof T['options']]: IfDefaultsFalse<
1340
- T['options'][LongOption]['multiple'],
1341
- undefined | Array<ExtractOptionValue<T, T['options'][LongOption]>>,
1342
- undefined | ExtractOptionValue<T, T['options'][LongOption]>
1397
+ & IfDefaultsTrue<T["strict"], unknown, { [longOption: string]: undefined | string | boolean }>
1398
+ & (T["options"] extends ParseArgsOptionsConfig ? {
1399
+ -readonly [LongOption in keyof T["options"]]: IfDefaultsFalse<
1400
+ T["options"][LongOption]["multiple"],
1401
+ undefined | Array<ExtractOptionValue<T, T["options"][LongOption]>>,
1402
+ undefined | ExtractOptionValue<T, T["options"][LongOption]>
1343
1403
  >;
1344
1404
  }
1345
1405
  : {});
1346
1406
 
1347
1407
  type ParsedPositionals<T extends ParseArgsConfig> = IfDefaultsTrue<
1348
- T['strict'],
1349
- IfDefaultsFalse<T['allowPositionals'], string[], []>,
1350
- IfDefaultsTrue<T['allowPositionals'], string[], []>
1408
+ T["strict"],
1409
+ IfDefaultsFalse<T["allowPositionals"], string[], []>,
1410
+ IfDefaultsTrue<T["allowPositionals"], string[], []>
1351
1411
  >;
1352
1412
 
1353
1413
  type PreciseTokenForOptions<
1354
1414
  K extends string,
1355
1415
  O extends ParseArgsOptionConfig,
1356
- > = O['type'] extends 'string'
1357
- ? {
1358
- kind: 'option';
1359
- index: number;
1360
- name: K;
1361
- rawName: string;
1362
- value: string;
1363
- inlineValue: boolean;
1364
- }
1365
- : O['type'] extends 'boolean'
1366
- ? {
1367
- kind: 'option';
1368
- index: number;
1369
- name: K;
1370
- rawName: string;
1371
- value: undefined;
1372
- inlineValue: undefined;
1373
- }
1416
+ > = O["type"] extends "string" ? {
1417
+ kind: "option";
1418
+ index: number;
1419
+ name: K;
1420
+ rawName: string;
1421
+ value: string;
1422
+ inlineValue: boolean;
1423
+ }
1424
+ : O["type"] extends "boolean" ? {
1425
+ kind: "option";
1426
+ index: number;
1427
+ name: K;
1428
+ rawName: string;
1429
+ value: undefined;
1430
+ inlineValue: undefined;
1431
+ }
1374
1432
  : OptionToken & { name: K };
1375
1433
 
1376
1434
  type TokenForOptions<
1377
1435
  T extends ParseArgsConfig,
1378
- K extends keyof T['options'] = keyof T['options'],
1436
+ K extends keyof T["options"] = keyof T["options"],
1379
1437
  > = K extends unknown
1380
- ? T['options'] extends ParseArgsOptionsConfig
1381
- ? PreciseTokenForOptions<K & string, T['options'][K]>
1382
- : OptionToken
1438
+ ? T["options"] extends ParseArgsOptionsConfig ? PreciseTokenForOptions<K & string, T["options"][K]>
1439
+ : OptionToken
1383
1440
  : never;
1384
1441
 
1385
- type ParsedOptionToken<T extends ParseArgsConfig> = IfDefaultsTrue<T['strict'], TokenForOptions<T>, OptionToken>;
1442
+ type ParsedOptionToken<T extends ParseArgsConfig> = IfDefaultsTrue<T["strict"], TokenForOptions<T>, OptionToken>;
1386
1443
 
1387
1444
  type ParsedPositionalToken<T extends ParseArgsConfig> = IfDefaultsTrue<
1388
- T['strict'],
1389
- IfDefaultsFalse<T['allowPositionals'], { kind: 'positional'; index: number; value: string }, never>,
1390
- IfDefaultsTrue<T['allowPositionals'], { kind: 'positional'; index: number; value: string }, never>
1445
+ T["strict"],
1446
+ IfDefaultsFalse<T["allowPositionals"], { kind: "positional"; index: number; value: string }, never>,
1447
+ IfDefaultsTrue<T["allowPositionals"], { kind: "positional"; index: number; value: string }, never>
1391
1448
  >;
1392
1449
 
1393
1450
  type ParsedTokens<T extends ParseArgsConfig> = Array<
1394
- ParsedOptionToken<T> | ParsedPositionalToken<T> | { kind: 'option-terminator'; index: number }
1451
+ ParsedOptionToken<T> | ParsedPositionalToken<T> | { kind: "option-terminator"; index: number }
1395
1452
  >;
1396
1453
 
1397
1454
  type PreciseParsedResults<T extends ParseArgsConfig> = IfDefaultsFalse<
1398
- T['tokens'],
1455
+ T["tokens"],
1399
1456
  {
1400
1457
  values: ParsedValues<T>;
1401
1458
  positionals: ParsedPositionals<T>;
@@ -1408,29 +1465,28 @@ declare module 'node:util' {
1408
1465
  >;
1409
1466
 
1410
1467
  type OptionToken =
1411
- | { kind: 'option'; index: number; name: string; rawName: string; value: string; inlineValue: boolean }
1468
+ | { kind: "option"; index: number; name: string; rawName: string; value: string; inlineValue: boolean }
1412
1469
  | {
1413
- kind: 'option';
1414
- index: number;
1415
- name: string;
1416
- rawName: string;
1417
- value: undefined;
1418
- inlineValue: undefined;
1419
- };
1470
+ kind: "option";
1471
+ index: number;
1472
+ name: string;
1473
+ rawName: string;
1474
+ value: undefined;
1475
+ inlineValue: undefined;
1476
+ };
1420
1477
 
1421
1478
  type Token =
1422
1479
  | OptionToken
1423
- | { kind: 'positional'; index: number; value: string }
1424
- | { kind: 'option-terminator'; index: number };
1480
+ | { kind: "positional"; index: number; value: string }
1481
+ | { kind: "option-terminator"; index: number };
1425
1482
 
1426
1483
  // If ParseArgsConfig extends T, then the user passed config constructed elsewhere.
1427
1484
  // So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above.
1428
- type ParsedResults<T extends ParseArgsConfig> = ParseArgsConfig extends T
1429
- ? {
1430
- values: { [longOption: string]: undefined | string | boolean | Array<string | boolean> };
1431
- positionals: string[];
1432
- tokens?: Token[];
1433
- }
1485
+ type ParsedResults<T extends ParseArgsConfig> = ParseArgsConfig extends T ? {
1486
+ values: { [longOption: string]: undefined | string | boolean | Array<string | boolean> };
1487
+ positionals: string[];
1488
+ tokens?: Token[];
1489
+ }
1434
1490
  : PreciseParsedResults<T>;
1435
1491
 
1436
1492
  /**
@@ -1518,11 +1574,11 @@ declare module 'node:util' {
1518
1574
  [Symbol.iterator]: typeof MIMEParams.prototype.entries;
1519
1575
  }
1520
1576
  }
1521
- declare module 'util/types' {
1522
- export * from 'util/types';
1577
+ declare module "util/types" {
1578
+ export * from "util/types";
1523
1579
  }
1524
- declare module 'util/types' {
1525
- import { KeyObject, webcrypto } from 'node:crypto';
1580
+ declare module "util/types" {
1581
+ import { KeyObject, webcrypto } from "node:crypto";
1526
1582
  /**
1527
1583
  * Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or
1528
1584
  * [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance.
@@ -1788,7 +1844,10 @@ declare module 'util/types' {
1788
1844
  * ```
1789
1845
  * @since v10.0.0
1790
1846
  */
1791
- function isMap<T>(object: T | {}): object is T extends ReadonlyMap<any, any> ? (unknown extends T ? never : ReadonlyMap<any, any>) : Map<unknown, unknown>;
1847
+ function isMap<T>(
1848
+ object: T | {},
1849
+ ): object is T extends ReadonlyMap<any, any> ? (unknown extends T ? never : ReadonlyMap<any, any>)
1850
+ : Map<unknown, unknown>;
1792
1851
  /**
1793
1852
  * 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.
1794
1853
  *
@@ -1874,7 +1933,9 @@ declare module 'util/types' {
1874
1933
  * ```
1875
1934
  * @since v10.0.0
1876
1935
  */
1877
- function isSet<T>(object: T | {}): object is T extends ReadonlySet<any> ? (unknown extends T ? never : ReadonlySet<any>) : Set<unknown>;
1936
+ function isSet<T>(
1937
+ object: T | {},
1938
+ ): object is T extends ReadonlySet<any> ? (unknown extends T ? never : ReadonlySet<any>) : Set<unknown>;
1878
1939
  /**
1879
1940
  * 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.
1880
1941
  *
@@ -2009,9 +2070,9 @@ declare module 'util/types' {
2009
2070
  */
2010
2071
  function isCryptoKey(object: unknown): object is webcrypto.CryptoKey;
2011
2072
  }
2012
- declare module 'util' {
2013
- export * from 'node:util';
2073
+ declare module "node:util" {
2074
+ export * from "util";
2014
2075
  }
2015
- declare module 'node:util/types' {
2016
- export * from 'util/types';
2076
+ declare module "node:util/types" {
2077
+ export * from "util/types";
2017
2078
  }
node v18.17/v8.d.ts CHANGED
@@ -6,8 +6,8 @@
6
6
  * ```
7
7
  * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/v8.js)
8
8
  */
9
- declare module 'node: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;
@@ -536,6 +536,6 @@ declare module 'node:v8' {
536
536
  */
537
537
  const promiseHooks: PromiseHooks;
538
538
  }
539
- declare module 'v8' {
540
- export * from 'node:v8';
539
+ declare module "node:v8" {
540
+ export * from "v8";
541
541
  }