@idlebox/stripe-node-types 24.0.14-patch.0 → 24.0.15

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 (134) hide show
  1. package/README.md +1 -1
  2. package/assert/strict.d.ts +113 -1
  3. package/assert.d.ts +162 -248
  4. package/async_hooks.d.ts +20 -5
  5. package/buffer.buffer.d.ts +24 -6
  6. package/buffer.d.ts +63 -168
  7. package/child_process.d.ts +117 -223
  8. package/cluster.d.ts +251 -329
  9. package/compatibility/iterators.d.ts +15 -0
  10. package/console.d.ts +60 -346
  11. package/constants.d.ts +15 -1
  12. package/crypto.d.ts +713 -1149
  13. package/dgram.d.ts +30 -50
  14. package/diagnostics_channel.d.ts +16 -3
  15. package/dns/promises.d.ts +15 -0
  16. package/dns.d.ts +150 -131
  17. package/domain.d.ts +25 -14
  18. package/events.d.ts +858 -719
  19. package/fs/promises.d.ts +117 -53
  20. package/fs.d.ts +729 -484
  21. package/globals.d.ts +142 -344
  22. package/globals.typedarray.d.ts +94 -0
  23. package/http.d.ts +358 -246
  24. package/http2.d.ts +578 -711
  25. package/https.d.ts +85 -216
  26. package/index.d.ts +39 -3
  27. package/inspector/promises.d.ts +54 -0
  28. package/inspector.d.ts +180 -3936
  29. package/inspector.generated.d.ts +4242 -0
  30. package/module.d.ts +60 -95
  31. package/my-shim.d.ts +15 -0
  32. package/net.d.ts +102 -186
  33. package/os.d.ts +32 -6
  34. package/package.json +3 -8
  35. package/path/posix.d.ts +20 -0
  36. package/path/win32.d.ts +20 -0
  37. package/path.d.ts +132 -122
  38. package/perf_hooks.d.ts +310 -644
  39. package/process.d.ts +192 -138
  40. package/punycode.d.ts +17 -2
  41. package/querystring.d.ts +16 -1
  42. package/quic.d.ts +926 -0
  43. package/readline/promises.d.ts +16 -1
  44. package/readline.d.ts +80 -118
  45. package/repl.d.ts +98 -96
  46. package/sea.d.ts +25 -1
  47. package/sqlite.d.ts +277 -13
  48. package/stream/consumers.d.ts +22 -7
  49. package/stream/promises.d.ts +148 -12
  50. package/stream/web.d.ts +187 -494
  51. package/stream.d.ts +608 -490
  52. package/string_decoder.d.ts +18 -3
  53. package/test/reporters.d.ts +112 -0
  54. package/test.d.ts +238 -199
  55. package/timers/promises.d.ts +16 -1
  56. package/timers.d.ts +16 -129
  57. package/tls.d.ts +163 -163
  58. package/trace_events.d.ts +21 -6
  59. package/ts5.6/buffer.buffer.d.ts +25 -8
  60. package/ts5.6/compatibility/float16array.d.ts +15 -0
  61. package/ts5.6/globals.typedarray.d.ts +31 -0
  62. package/ts5.6/index.d.ts +39 -3
  63. package/ts5.7/compatibility/float16array.d.ts +15 -0
  64. package/ts5.7/index.d.ts +39 -3
  65. package/tty.d.ts +70 -13
  66. package/undici-types/agent.d.ts +20 -4
  67. package/undici-types/api.d.ts +15 -0
  68. package/undici-types/balanced-pool.d.ts +15 -0
  69. package/undici-types/cache-interceptor.d.ts +15 -0
  70. package/undici-types/cache.d.ts +15 -0
  71. package/undici-types/client-stats.d.ts +31 -0
  72. package/undici-types/client.d.ts +21 -5
  73. package/undici-types/connector.d.ts +15 -0
  74. package/undici-types/content-type.d.ts +15 -0
  75. package/undici-types/cookies.d.ts +15 -0
  76. package/undici-types/diagnostics-channel.d.ts +24 -1
  77. package/undici-types/dispatcher.d.ts +18 -8
  78. package/undici-types/env-http-proxy-agent.d.ts +17 -1
  79. package/undici-types/errors.d.ts +20 -15
  80. package/undici-types/eventsource.d.ts +24 -4
  81. package/undici-types/fetch.d.ts +16 -0
  82. package/undici-types/formdata.d.ts +15 -0
  83. package/undici-types/global-dispatcher.d.ts +15 -0
  84. package/undici-types/global-origin.d.ts +15 -0
  85. package/undici-types/h2c-client.d.ts +15 -2
  86. package/undici-types/handlers.d.ts +16 -1
  87. package/undici-types/header.d.ts +15 -0
  88. package/undici-types/index.d.ts +21 -1
  89. package/undici-types/interceptors.d.ts +20 -0
  90. package/undici-types/mock-agent.d.ts +18 -0
  91. package/undici-types/mock-call-history.d.ts +15 -0
  92. package/undici-types/mock-client.d.ts +17 -0
  93. package/undici-types/mock-errors.d.ts +15 -0
  94. package/undici-types/mock-interceptor.d.ts +17 -1
  95. package/undici-types/mock-pool.d.ts +17 -0
  96. package/undici-types/package.json +1 -1
  97. package/undici-types/patch.d.ts +15 -0
  98. package/undici-types/pool-stats.d.ts +15 -0
  99. package/undici-types/pool.d.ts +17 -0
  100. package/undici-types/proxy-agent.d.ts +16 -0
  101. package/undici-types/readable.d.ts +15 -0
  102. package/undici-types/retry-agent.d.ts +15 -0
  103. package/undici-types/retry-handler.d.ts +24 -0
  104. package/undici-types/snapshot-agent.d.ts +125 -0
  105. package/undici-types/util.d.ts +15 -0
  106. package/undici-types/utility.d.ts +15 -0
  107. package/undici-types/webidl.d.ts +126 -36
  108. package/undici-types/websocket.d.ts +18 -1
  109. package/url.d.ts +107 -587
  110. package/util/types.d.ts +571 -0
  111. package/util.d.ts +158 -792
  112. package/v8.d.ts +82 -7
  113. package/vm.d.ts +267 -108
  114. package/wasi.d.ts +38 -2
  115. package/web-globals/abortcontroller.d.ts +75 -0
  116. package/web-globals/blob.d.ts +39 -0
  117. package/web-globals/console.d.ts +25 -0
  118. package/web-globals/crypto.d.ts +55 -0
  119. package/web-globals/domexception.d.ts +84 -0
  120. package/web-globals/encoding.d.ts +27 -0
  121. package/{dom-events.d.ts → web-globals/events.d.ts} +72 -50
  122. package/web-globals/fetch.d.ts +70 -0
  123. package/web-globals/importmeta.d.ts +29 -0
  124. package/web-globals/messaging.d.ts +39 -0
  125. package/web-globals/navigator.d.ts +41 -0
  126. package/web-globals/performance.d.ts +61 -0
  127. package/web-globals/storage.d.ts +40 -0
  128. package/web-globals/streams.d.ts +131 -0
  129. package/web-globals/timers.d.ts +60 -0
  130. package/web-globals/url.d.ts +40 -0
  131. package/worker_threads.d.ts +306 -349
  132. package/zlib.d.ts +59 -94
  133. package/ts5.1/compatibility/disposable.d.ts +0 -13
  134. package/ts5.1/index.d.ts +0 -100
@@ -1,3 +1,18 @@
1
+ // biome-ignore-all lint: generated file
2
+ // biome-ignore-all assist: generated file
3
+ /* eslint-disable */
4
+ // @ts-ignore
5
+
6
+ /******************************************************************************
7
+ * GENERATED FILE, DO NOT MODIFY
8
+ * 这是生成的文件,千万不要修改
9
+ *
10
+ * @build-script/codegen - The Simple Code Generater
11
+ * https://github.com/GongT/baobao
12
+ *
13
+ ******************************************************************************/
14
+
15
+
1
16
  // Backwards-compatible iterator interfaces, augmented with iterator helper methods by lib.esnext.iterator in TypeScript 5.6.
2
17
  // The IterableIterator interface does not contain these methods, which creates assignability issues in places where IteratorObjects
3
18
  // are expected (eg. DOM-compatible APIs) if lib.esnext.iterator is loaded.
package/console.d.ts CHANGED
@@ -1,3 +1,18 @@
1
+ // biome-ignore-all lint: generated file
2
+ // biome-ignore-all assist: generated file
3
+ /* eslint-disable */
4
+ // @ts-ignore
5
+
6
+ /******************************************************************************
7
+ * GENERATED FILE, DO NOT MODIFY
8
+ * 这是生成的文件,千万不要修改
9
+ *
10
+ * @build-script/codegen - The Simple Code Generater
11
+ * https://github.com/GongT/baobao
12
+ *
13
+ ******************************************************************************/
14
+
15
+
1
16
  /**
2
17
  * The `node:console` module provides a simple debugging console that is similar to
3
18
  * the JavaScript console mechanism provided by web browsers.
@@ -5,12 +20,12 @@
5
20
  * The module exports two specific components:
6
21
  *
7
22
  * * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream.
8
- * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and
9
- * [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
23
+ * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstdout) and
24
+ * [`process.stderr`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
10
25
  *
11
26
  * _**Warning**_: The global console object's methods are neither consistently
12
27
  * synchronous like the browser APIs they resemble, nor are they consistently
13
- * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for
28
+ * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v25.x/api/process.html#a-note-on-process-io) for
14
29
  * more information.
15
30
  *
16
31
  * Example using the global `console`:
@@ -54,273 +69,64 @@
54
69
  * myConsole.warn(`Danger ${name}! Danger!`);
55
70
  * // Prints: Danger Will Robinson! Danger!, to err
56
71
  * ```
57
- * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
72
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/console.js)
58
73
  */
59
74
 
60
75
  declare module "node:console" {
61
76
  import { InspectOptions } from 'node:util';
62
- global {
63
- // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
64
- interface Console {
65
- Console: console.ConsoleConstructor;
77
+ namespace console {
78
+ interface ConsoleOptions {
79
+ stdout: NodeJS.WritableStream;
80
+ stderr?: NodeJS.WritableStream | undefined;
66
81
  /**
67
- * `console.assert()` writes a message if `value` is [falsy](https://developer.mozilla.org/en-US/docs/Glossary/Falsy) or omitted. It only
68
- * writes a message and does not otherwise affect execution. The output always
69
- * starts with `"Assertion failed"`. If provided, `message` is formatted using
70
- * [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args).
71
- *
72
- * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens.
73
- *
74
- * ```js
75
- * console.assert(true, 'does nothing');
76
- *
77
- * console.assert(false, 'Whoops %s work', 'didn\'t');
78
- * // Assertion failed: Whoops didn't work
79
- *
80
- * console.assert();
81
- * // Assertion failed
82
- * ```
83
- * @since v0.1.101
84
- * @param value The value tested for being truthy.
85
- * @param message All arguments besides `value` are used as error message.
82
+ * Ignore errors when writing to the underlying streams.
83
+ * @default true
86
84
  */
87
- assert(value: any, message?: string, ...optionalParams: any[]): void;
85
+ ignoreErrors?: boolean | undefined;
88
86
  /**
89
- * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the
90
- * TTY. When `stdout` is not a TTY, this method does nothing.
91
- *
92
- * The specific operation of `console.clear()` can vary across operating systems
93
- * and terminal types. For most Linux operating systems, `console.clear()` operates similarly to the `clear` shell command. On Windows, `console.clear()` will clear only the output in the
94
- * current terminal viewport for the Node.js
95
- * binary.
96
- * @since v8.3.0
87
+ * Set color support for this `Console` instance. Setting to true enables coloring while inspecting
88
+ * values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color
89
+ * support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the
90
+ * respective stream. This option can not be used, if `inspectOptions.colors` is set as well.
91
+ * @default 'auto'
97
92
  */
98
- clear(): void;
93
+ colorMode?: boolean | "auto" | undefined;
99
94
  /**
100
- * Maintains an internal counter specific to `label` and outputs to `stdout` the
101
- * number of times `console.count()` has been called with the given `label`.
102
- *
103
- * ```js
104
- * > console.count()
105
- * default: 1
106
- * undefined
107
- * > console.count('default')
108
- * default: 2
109
- * undefined
110
- * > console.count('abc')
111
- * abc: 1
112
- * undefined
113
- * > console.count('xyz')
114
- * xyz: 1
115
- * undefined
116
- * > console.count('abc')
117
- * abc: 2
118
- * undefined
119
- * > console.count()
120
- * default: 3
121
- * undefined
122
- * >
123
- * ```
124
- * @since v8.3.0
125
- * @param [label='default'] The display label for the counter.
95
+ * Specifies options that are passed along to
96
+ * [`util.inspect()`](https://nodejs.org/docs/latest-v25.x/api/util.html#utilinspectobject-options).
126
97
  */
127
- count(label?: string): void;
98
+ inspectOptions?: InspectOptions | ReadonlyMap<NodeJS.WritableStream, InspectOptions> | undefined;
128
99
  /**
129
- * Resets the internal counter specific to `label`.
130
- *
131
- * ```js
132
- * > console.count('abc');
133
- * abc: 1
134
- * undefined
135
- * > console.countReset('abc');
136
- * undefined
137
- * > console.count('abc');
138
- * abc: 1
139
- * undefined
140
- * >
141
- * ```
142
- * @since v8.3.0
143
- * @param [label='default'] The display label for the counter.
100
+ * Set group indentation.
101
+ * @default 2
144
102
  */
103
+ groupIndentation?: number | undefined;
104
+ }
105
+ interface Console {
106
+ readonly Console: {
107
+ prototype: Console;
108
+ new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
109
+ new(options: ConsoleOptions): Console;
110
+ };
111
+ assert(condition?: unknown, ...data: any[]): void;
112
+ clear(): void;
113
+ count(label?: string): void;
145
114
  countReset(label?: string): void;
146
- /**
147
- * The `console.debug()` function is an alias for {@link log}.
148
- * @since v8.0.0
149
- */
150
- debug(message?: any, ...optionalParams: any[]): void;
151
- /**
152
- * Uses [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`.
153
- * This function bypasses any custom `inspect()` function defined on `obj`.
154
- * @since v0.1.101
155
- */
156
- dir(obj: any, options?: InspectOptions): void;
157
- /**
158
- * This method calls `console.log()` passing it the arguments received.
159
- * This method does not produce any XML formatting.
160
- * @since v8.0.0
161
- */
115
+ debug(...data: any[]): void;
116
+ dir(item?: any, options?: InspectOptions): void;
162
117
  dirxml(...data: any[]): void;
163
- /**
164
- * Prints to `stderr` with newline. Multiple arguments can be passed, with the
165
- * first used as the primary message and all additional used as substitution
166
- * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
167
- * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)).
168
- *
169
- * ```js
170
- * const code = 5;
171
- * console.error('error #%d', code);
172
- * // Prints: error #5, to stderr
173
- * console.error('error', code);
174
- * // Prints: error 5, to stderr
175
- * ```
176
- *
177
- * If formatting elements (e.g. `%d`) are not found in the first string then
178
- * [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options) is called on each argument and the
179
- * resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)
180
- * for more information.
181
- * @since v0.1.100
182
- */
183
- error(message?: any, ...optionalParams: any[]): void;
184
- /**
185
- * Increases indentation of subsequent lines by spaces for `groupIndentation` length.
186
- *
187
- * If one or more `label`s are provided, those are printed first without the
188
- * additional indentation.
189
- * @since v8.5.0
190
- */
191
- group(...label: any[]): void;
192
- /**
193
- * An alias for {@link group}.
194
- * @since v8.5.0
195
- */
196
- groupCollapsed(...label: any[]): void;
197
- /**
198
- * Decreases indentation of subsequent lines by spaces for `groupIndentation` length.
199
- * @since v8.5.0
200
- */
118
+ error(...data: any[]): void;
119
+ group(...data: any[]): void;
120
+ groupCollapsed(...data: any[]): void;
201
121
  groupEnd(): void;
202
- /**
203
- * The `console.info()` function is an alias for {@link log}.
204
- * @since v0.1.100
205
- */
206
- info(message?: any, ...optionalParams: any[]): void;
207
- /**
208
- * Prints to `stdout` with newline. Multiple arguments can be passed, with the
209
- * first used as the primary message and all additional used as substitution
210
- * values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
211
- * (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)).
212
- *
213
- * ```js
214
- * const count = 5;
215
- * console.log('count: %d', count);
216
- * // Prints: count: 5, to stdout
217
- * console.log('count:', count);
218
- * // Prints: count: 5, to stdout
219
- * ```
220
- *
221
- * See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
222
- * @since v0.1.100
223
- */
224
- log(message?: any, ...optionalParams: any[]): void;
225
- /**
226
- * Try to construct a table with the columns of the properties of `tabularData` (or use `properties`) and rows of `tabularData` and log it. Falls back to just
227
- * logging the argument if it can't be parsed as tabular.
228
- *
229
- * ```js
230
- * // These can't be parsed as tabular data
231
- * console.table(Symbol());
232
- * // Symbol()
233
- *
234
- * console.table(undefined);
235
- * // undefined
236
- *
237
- * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }]);
238
- * // ┌─────────┬─────┬─────┐
239
- * // │ (index) │ a │ b │
240
- * // ├─────────┼─────┼─────┤
241
- * // │ 0 │ 1 │ 'Y' │
242
- * // │ 1 │ 'Z' │ 2 │
243
- * // └─────────┴─────┴─────┘
244
- *
245
- * console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
246
- * // ┌─────────┬─────┐
247
- * // │ (index) │ a │
248
- * // ├─────────┼─────┤
249
- * // │ 0 │ 1 │
250
- * // │ 1 │ 'Z' │
251
- * // └─────────┴─────┘
252
- * ```
253
- * @since v10.0.0
254
- * @param properties Alternate properties for constructing the table.
255
- */
256
- table(tabularData: any, properties?: readonly string[]): void;
257
- /**
258
- * Starts a timer that can be used to compute the duration of an operation. Timers
259
- * are identified by a unique `label`. Use the same `label` when calling {@link timeEnd} to stop the timer and output the elapsed time in
260
- * suitable time units to `stdout`. For example, if the elapsed
261
- * time is 3869ms, `console.timeEnd()` displays "3.869s".
262
- * @since v0.1.104
263
- * @param [label='default']
264
- */
122
+ info(...data: any[]): void;
123
+ log(...data: any[]): void;
124
+ table(tabularData?: any, properties?: string[]): void;
265
125
  time(label?: string): void;
266
- /**
267
- * Stops a timer that was previously started by calling {@link time} and
268
- * prints the result to `stdout`:
269
- *
270
- * ```js
271
- * console.time('bunch-of-stuff');
272
- * // Do a bunch of stuff.
273
- * console.timeEnd('bunch-of-stuff');
274
- * // Prints: bunch-of-stuff: 225.438ms
275
- * ```
276
- * @since v0.1.104
277
- * @param [label='default']
278
- */
279
126
  timeEnd(label?: string): void;
280
- /**
281
- * For a timer that was previously started by calling {@link time}, prints
282
- * the elapsed time and other `data` arguments to `stdout`:
283
- *
284
- * ```js
285
- * console.time('process');
286
- * const value = expensiveProcess1(); // Returns 42
287
- * console.timeLog('process', value);
288
- * // Prints "process: 365.227ms 42".
289
- * doExpensiveProcess2(value);
290
- * console.timeEnd('process');
291
- * ```
292
- * @since v10.7.0
293
- * @param [label='default']
294
- */
295
127
  timeLog(label?: string, ...data: any[]): void;
296
- /**
297
- * Prints to `stderr` the string `'Trace: '`, followed by the [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)
298
- * formatted message and stack trace to the current position in the code.
299
- *
300
- * ```js
301
- * console.trace('Show me');
302
- * // Prints: (stack trace will vary based on where trace is called)
303
- * // Trace: Show me
304
- * // at repl:2:9
305
- * // at REPLServer.defaultEval (repl.js:248:27)
306
- * // at bound (domain.js:287:14)
307
- * // at REPLServer.runBound [as eval] (domain.js:300:12)
308
- * // at REPLServer.<anonymous> (repl.js:412:12)
309
- * // at emitOne (events.js:82:20)
310
- * // at REPLServer.emit (events.js:169:7)
311
- * // at REPLServer.Interface._onLine (readline.js:210:10)
312
- * // at REPLServer.Interface._line (readline.js:549:8)
313
- * // at REPLServer.Interface._ttyWrite (readline.js:826:14)
314
- * ```
315
- * @since v0.1.104
316
- */
317
- trace(message?: any, ...optionalParams: any[]): void;
318
- /**
319
- * The `console.warn()` function is an alias for {@link error}.
320
- * @since v0.1.100
321
- */
322
- warn(message?: any, ...optionalParams: any[]): void;
323
- // --- Inspector mode only ---
128
+ trace(...data: any[]): void;
129
+ warn(...data: any[]): void;
324
130
  /**
325
131
  * This method does not display anything unless used in the inspector. The `console.profile()`
326
132
  * method starts a JavaScript CPU profile with an optional label until {@link profileEnd}
@@ -351,99 +157,7 @@ declare module "node:console" {
351
157
  */
352
158
  timeStamp(label?: string): void;
353
159
  }
354
- /**
355
- * The `console` module provides a simple debugging console that is similar to the
356
- * JavaScript console mechanism provided by web browsers.
357
- *
358
- * The module exports two specific components:
359
- *
360
- * * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream.
361
- * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and
362
- * [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
363
- *
364
- * _**Warning**_: The global console object's methods are neither consistently
365
- * synchronous like the browser APIs they resemble, nor are they consistently
366
- * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for
367
- * more information.
368
- *
369
- * Example using the global `console`:
370
- *
371
- * ```js
372
- * console.log('hello world');
373
- * // Prints: hello world, to stdout
374
- * console.log('hello %s', 'world');
375
- * // Prints: hello world, to stdout
376
- * console.error(new Error('Whoops, something bad happened'));
377
- * // Prints error message and stack trace to stderr:
378
- * // Error: Whoops, something bad happened
379
- * // at [eval]:5:15
380
- * // at Script.runInThisContext (node:vm:132:18)
381
- * // at Object.runInThisContext (node:vm:309:38)
382
- * // at node:internal/process/execution:77:19
383
- * // at [eval]-wrapper:6:22
384
- * // at evalScript (node:internal/process/execution:76:60)
385
- * // at node:internal/main/eval_string:23:3
386
- *
387
- * const name = 'Will Robinson';
388
- * console.warn(`Danger ${name}! Danger!`);
389
- * // Prints: Danger Will Robinson! Danger!, to stderr
390
- * ```
391
- *
392
- * Example using the `Console` class:
393
- *
394
- * ```js
395
- * const out = getStreamSomehow();
396
- * const err = getStreamSomehow();
397
- * const myConsole = new console.Console(out, err);
398
- *
399
- * myConsole.log('hello world');
400
- * // Prints: hello world, to out
401
- * myConsole.log('hello %s', 'world');
402
- * // Prints: hello world, to out
403
- * myConsole.error(new Error('Whoops, something bad happened'));
404
- * // Prints: [Error: Whoops, something bad happened], to err
405
- *
406
- * const name = 'Will Robinson';
407
- * myConsole.warn(`Danger ${name}! Danger!`);
408
- * // Prints: Danger Will Robinson! Danger!, to err
409
- * ```
410
- * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
411
- */
412
- namespace console {
413
- interface ConsoleConstructorOptions {
414
- stdout: NodeJS.WritableStream;
415
- stderr?: NodeJS.WritableStream | undefined;
416
- /**
417
- * Ignore errors when writing to the underlying streams.
418
- * @default true
419
- */
420
- ignoreErrors?: boolean | undefined;
421
- /**
422
- * Set color support for this `Console` instance. Setting to true enables coloring while inspecting
423
- * values. Setting to `false` disables coloring while inspecting values. Setting to `'auto'` makes color
424
- * support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the
425
- * respective stream. This option can not be used, if `inspectOptions.colors` is set as well.
426
- * @default auto
427
- */
428
- colorMode?: boolean | "auto" | undefined;
429
- /**
430
- * Specifies options that are passed along to
431
- * [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options).
432
- */
433
- inspectOptions?: InspectOptions | undefined;
434
- /**
435
- * Set group indentation.
436
- * @default 2
437
- */
438
- groupIndentation?: number | undefined;
439
- }
440
- interface ConsoleConstructor {
441
- prototype: Console;
442
- new(stdout: NodeJS.WritableStream, stderr?: NodeJS.WritableStream, ignoreErrors?: boolean): Console;
443
- new(options: ConsoleConstructorOptions): Console;
444
- }
445
- }
446
- var console: Console;
447
160
  }
448
- export = globalThis.console;
161
+ var console: console.Console;
162
+ export = console;
449
163
  }
package/constants.d.ts CHANGED
@@ -1,3 +1,18 @@
1
+ // biome-ignore-all lint: generated file
2
+ // biome-ignore-all assist: generated file
3
+ /* eslint-disable */
4
+ // @ts-ignore
5
+
6
+ /******************************************************************************
7
+ * GENERATED FILE, DO NOT MODIFY
8
+ * 这是生成的文件,千万不要修改
9
+ *
10
+ * @build-script/codegen - The Simple Code Generater
11
+ * https://github.com/GongT/baobao
12
+ *
13
+ ******************************************************************************/
14
+
15
+
1
16
  /**
2
17
  * @deprecated The `node:constants` module is deprecated. When requiring access to constants
3
18
  * relevant to specific Node.js builtin modules, developers should instead refer
@@ -5,7 +20,6 @@
5
20
  * `require('node:fs').constants` and `require('node:os').constants`.
6
21
  */
7
22
 
8
-
9
23
  declare module "node:constants" {
10
24
  const constants:
11
25
  & typeof import('node:os').constants.dlopen