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