@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
  /**
2
17
  * @since v17.0.0
3
18
  */
@@ -65,7 +80,7 @@ declare module "node:readline/promises" {
65
80
  constructor(
66
81
  stream: NodeJS.WritableStream,
67
82
  options?: {
68
- autoCommit?: boolean;
83
+ autoCommit?: boolean | undefined;
69
84
  },
70
85
  );
71
86
  /**
package/readline.d.ts CHANGED
@@ -1,6 +1,21 @@
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
- * The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream
3
- * (such as [`process.stdin`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdin)) one line at a time.
17
+ * The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream
18
+ * (such as [`process.stdin`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstdin)) one line at a time.
4
19
  *
5
20
  * To use the promise-based APIs:
6
21
  *
@@ -31,28 +46,59 @@
31
46
  *
32
47
  * Once this code is invoked, the Node.js application will not terminate until the `readline.Interface` is closed because the interface waits for data to be
33
48
  * received on the `input` stream.
34
- * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/readline.js)
49
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/readline.js)
35
50
  */
36
51
 
37
52
  declare module "_not-use-node-type_readline" {
38
- import { Abortable, EventEmitter } from 'node:events';
39
- import * as promises from 'node:readline/promises';
40
- export { promises };
41
- export interface Key {
53
+ import { Abortable, EventEmitter, InternalEventEmitter } from 'node:events';
54
+ interface Key {
42
55
  sequence?: string | undefined;
43
56
  name?: string | undefined;
44
57
  ctrl?: boolean | undefined;
45
58
  meta?: boolean | undefined;
46
59
  shift?: boolean | undefined;
47
60
  }
61
+ interface InterfaceEventMap {
62
+ "close": [];
63
+ "history": [history: string[]];
64
+ "line": [input: string];
65
+ "pause": [];
66
+ "resume": [];
67
+ "SIGCONT": [];
68
+ "SIGINT": [];
69
+ "SIGTSTP": [];
70
+ }
48
71
  /**
49
72
  * Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a
50
- * single `input` [Readable](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v24.x/api/stream.html#writable-streams) stream.
73
+ * single `input` [Readable](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v25.x/api/stream.html#writable-streams) stream.
51
74
  * The `output` stream is used to print prompts for user input that arrives on,
52
75
  * and is read from, the `input` stream.
53
76
  * @since v0.1.104
54
77
  */
55
- export class Interface extends EventEmitter implements Disposable {
78
+ class Interface implements EventEmitter, Disposable {
79
+ /**
80
+ * NOTE: According to the documentation:
81
+ *
82
+ * > Instances of the `readline.Interface` class are constructed using the
83
+ * > `readline.createInterface()` method.
84
+ *
85
+ * @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#class-interfaceconstructor
86
+ */
87
+ protected constructor(
88
+ input: NodeJS.ReadableStream,
89
+ output?: NodeJS.WritableStream,
90
+ completer?: Completer | AsyncCompleter,
91
+ terminal?: boolean,
92
+ );
93
+ /**
94
+ * NOTE: According to the documentation:
95
+ *
96
+ * > Instances of the `readline.Interface` class are constructed using the
97
+ * > `readline.createInterface()` method.
98
+ *
99
+ * @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#class-interfaceconstructor
100
+ */
101
+ protected constructor(options: ReadLineOptions);
56
102
  readonly terminal: boolean;
57
103
  /**
58
104
  * The current input data being processed by node.
@@ -95,29 +141,6 @@ declare module "_not-use-node-type_readline" {
95
141
  * @since v0.1.98
96
142
  */
97
143
  readonly cursor: number;
98
- /**
99
- * NOTE: According to the documentation:
100
- *
101
- * > Instances of the `readline.Interface` class are constructed using the
102
- * > `readline.createInterface()` method.
103
- *
104
- * @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#class-interfaceconstructor
105
- */
106
- protected constructor(
107
- input: NodeJS.ReadableStream,
108
- output?: NodeJS.WritableStream,
109
- completer?: Completer | AsyncCompleter,
110
- terminal?: boolean,
111
- );
112
- /**
113
- * NOTE: According to the documentation:
114
- *
115
- * > Instances of the `readline.Interface` class are constructed using the
116
- * > `readline.createInterface()` method.
117
- *
118
- * @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#class-interfaceconstructor
119
- */
120
- protected constructor(options: ReadLineOptions);
121
144
  /**
122
145
  * The `rl.getPrompt()` method returns the current prompt used by `rl.prompt()`.
123
146
  * @since v15.3.0, v14.17.0
@@ -245,87 +268,23 @@ declare module "_not-use-node-type_readline" {
245
268
  * @since v13.5.0, v12.16.0
246
269
  */
247
270
  getCursorPos(): CursorPos;
248
- /**
249
- * events.EventEmitter
250
- * 1. close
251
- * 2. line
252
- * 3. pause
253
- * 4. resume
254
- * 5. SIGCONT
255
- * 6. SIGINT
256
- * 7. SIGTSTP
257
- * 8. history
258
- */
259
- addListener(event: string, listener: (...args: any[]) => void): this;
260
- addListener(event: "close", listener: () => void): this;
261
- addListener(event: "line", listener: (input: string) => void): this;
262
- addListener(event: "pause", listener: () => void): this;
263
- addListener(event: "resume", listener: () => void): this;
264
- addListener(event: "SIGCONT", listener: () => void): this;
265
- addListener(event: "SIGINT", listener: () => void): this;
266
- addListener(event: "SIGTSTP", listener: () => void): this;
267
- addListener(event: "history", listener: (history: string[]) => void): this;
268
- emit(event: string | symbol, ...args: any[]): boolean;
269
- emit(event: "close"): boolean;
270
- emit(event: "line", input: string): boolean;
271
- emit(event: "pause"): boolean;
272
- emit(event: "resume"): boolean;
273
- emit(event: "SIGCONT"): boolean;
274
- emit(event: "SIGINT"): boolean;
275
- emit(event: "SIGTSTP"): boolean;
276
- emit(event: "history", history: string[]): boolean;
277
- on(event: string, listener: (...args: any[]) => void): this;
278
- on(event: "close", listener: () => void): this;
279
- on(event: "line", listener: (input: string) => void): this;
280
- on(event: "pause", listener: () => void): this;
281
- on(event: "resume", listener: () => void): this;
282
- on(event: "SIGCONT", listener: () => void): this;
283
- on(event: "SIGINT", listener: () => void): this;
284
- on(event: "SIGTSTP", listener: () => void): this;
285
- on(event: "history", listener: (history: string[]) => void): this;
286
- once(event: string, listener: (...args: any[]) => void): this;
287
- once(event: "close", listener: () => void): this;
288
- once(event: "line", listener: (input: string) => void): this;
289
- once(event: "pause", listener: () => void): this;
290
- once(event: "resume", listener: () => void): this;
291
- once(event: "SIGCONT", listener: () => void): this;
292
- once(event: "SIGINT", listener: () => void): this;
293
- once(event: "SIGTSTP", listener: () => void): this;
294
- once(event: "history", listener: (history: string[]) => void): this;
295
- prependListener(event: string, listener: (...args: any[]) => void): this;
296
- prependListener(event: "close", listener: () => void): this;
297
- prependListener(event: "line", listener: (input: string) => void): this;
298
- prependListener(event: "pause", listener: () => void): this;
299
- prependListener(event: "resume", listener: () => void): this;
300
- prependListener(event: "SIGCONT", listener: () => void): this;
301
- prependListener(event: "SIGINT", listener: () => void): this;
302
- prependListener(event: "SIGTSTP", listener: () => void): this;
303
- prependListener(event: "history", listener: (history: string[]) => void): this;
304
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
305
- prependOnceListener(event: "close", listener: () => void): this;
306
- prependOnceListener(event: "line", listener: (input: string) => void): this;
307
- prependOnceListener(event: "pause", listener: () => void): this;
308
- prependOnceListener(event: "resume", listener: () => void): this;
309
- prependOnceListener(event: "SIGCONT", listener: () => void): this;
310
- prependOnceListener(event: "SIGINT", listener: () => void): this;
311
- prependOnceListener(event: "SIGTSTP", listener: () => void): this;
312
- prependOnceListener(event: "history", listener: (history: string[]) => void): this;
313
271
  [Symbol.asyncIterator](): NodeJS.AsyncIterator<string>;
314
272
  }
315
- export type ReadLine = Interface; // type forwarded for backwards compatibility
316
- export type Completer = (line: string) => CompleterResult;
317
- export type AsyncCompleter = (
273
+ interface Interface extends InternalEventEmitter<InterfaceEventMap> {}
274
+ type ReadLine = Interface; // type forwarded for backwards compatibility
275
+ type Completer = (line: string) => CompleterResult;
276
+ type AsyncCompleter = (
318
277
  line: string,
319
278
  callback: (err?: null | Error, result?: CompleterResult) => void,
320
279
  ) => void;
321
- export type CompleterResult = [string[], string];
322
- export interface ReadLineOptions {
280
+ type CompleterResult = [string[], string];
281
+ interface ReadLineOptions {
323
282
  /**
324
- * The [`Readable`](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream to listen to
283
+ * The [`Readable`](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream to listen to
325
284
  */
326
285
  input: NodeJS.ReadableStream;
327
286
  /**
328
- * The [`Writable`](https://nodejs.org/docs/latest-v24.x/api/stream.html#writable-streams) stream to write readline data to.
287
+ * The [`Writable`](https://nodejs.org/docs/latest-v25.x/api/stream.html#writable-streams) stream to write readline data to.
329
288
  */
330
289
  output?: NodeJS.WritableStream | undefined;
331
290
  /**
@@ -370,7 +329,7 @@ declare module "_not-use-node-type_readline" {
370
329
  * `crlfDelay` will be coerced to a number no less than `100`.
371
330
  * It can be set to `Infinity`, in which case
372
331
  * `\r` followed by `\n` will always be considered a single newline
373
- * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v24.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter).
332
+ * (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v25.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter).
374
333
  * @default 100
375
334
  */
376
335
  crlfDelay?: number | undefined;
@@ -423,13 +382,13 @@ declare module "_not-use-node-type_readline" {
423
382
  * waiting for user input, call `process.stdin.unref()`.
424
383
  * @since v0.1.98
425
384
  */
426
- export function createInterface(
385
+ function createInterface(
427
386
  input: NodeJS.ReadableStream,
428
387
  output?: NodeJS.WritableStream,
429
388
  completer?: Completer | AsyncCompleter,
430
389
  terminal?: boolean,
431
390
  ): Interface;
432
- export function createInterface(options: ReadLineOptions): Interface;
391
+ function createInterface(options: ReadLineOptions): Interface;
433
392
  /**
434
393
  * The `readline.emitKeypressEvents()` method causes the given `Readable` stream to begin emitting `'keypress'` events corresponding to received input.
435
394
  *
@@ -551,42 +510,45 @@ declare module "_not-use-node-type_readline" {
551
510
  * ```
552
511
  * @since v0.7.7
553
512
  */
554
- export function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
555
- export type Direction = -1 | 0 | 1;
556
- export interface CursorPos {
513
+ function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
514
+ type Direction = -1 | 0 | 1;
515
+ interface CursorPos {
557
516
  rows: number;
558
517
  cols: number;
559
518
  }
560
519
  /**
561
- * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) stream
520
+ * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) stream
562
521
  * in a specified direction identified by `dir`.
563
522
  * @since v0.7.7
564
523
  * @param callback Invoked once the operation completes.
565
524
  * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
566
525
  */
567
- export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
526
+ function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
568
527
  /**
569
- * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) stream from
528
+ * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) stream from
570
529
  * the current position of the cursor down.
571
530
  * @since v0.7.7
572
531
  * @param callback Invoked once the operation completes.
573
532
  * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
574
533
  */
575
- export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
534
+ function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
576
535
  /**
577
536
  * The `readline.cursorTo()` method moves cursor to the specified position in a
578
- * given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) `stream`.
537
+ * given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) `stream`.
579
538
  * @since v0.7.7
580
539
  * @param callback Invoked once the operation completes.
581
540
  * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
582
541
  */
583
- export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
542
+ function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
584
543
  /**
585
544
  * The `readline.moveCursor()` method moves the cursor _relative_ to its current
586
- * position in a given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) `stream`.
545
+ * position in a given [TTY](https://nodejs.org/docs/latest-v25.x/api/tty.html) `stream`.
587
546
  * @since v0.7.7
588
547
  * @param callback Invoked once the operation completes.
589
548
  * @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
590
549
  */
591
- export function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
550
+ function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
551
+ }
552
+ declare module "_not-use-node-type_readline" {
553
+ export * as promises from "node:readline/promises";
592
554
  }
package/repl.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:repl` module provides a Read-Eval-Print-Loop (REPL) implementation
3
18
  * that is available both as a standalone program or includible in other
@@ -6,13 +21,13 @@
6
21
  * ```js
7
22
  * import repl from 'node:repl';
8
23
  * ```
9
- * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/repl.js)
24
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/repl.js)
10
25
  */
11
26
 
12
27
  declare module "node:repl" {
13
- import { AsyncCompleter, Completer, Interface } from '_not-use-node-type_readline';
14
- import { Context } from 'node:vm';
28
+ import { AsyncCompleter, Completer, Interface, InterfaceEventMap } from '_not-use-node-type_readline';
15
29
  import { InspectOptions } from 'node:util';
30
+ import { Context } from 'node:vm';
16
31
  interface ReplOptions {
17
32
  /**
18
33
  * The input prompt to display.
@@ -40,7 +55,7 @@ declare module "node:repl" {
40
55
  * The function to be used when evaluating each given line of input.
41
56
  * **Default:** an async wrapper for the JavaScript `eval()` function. An `eval` function can
42
57
  * error with `repl.Recoverable` to indicate the input was incomplete and prompt for
43
- * additional lines. See the [custom evaluation functions](https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#custom-evaluation-functions)
58
+ * additional lines. See the [custom evaluation functions](https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#custom-evaluation-functions)
44
59
  * section for more details.
45
60
  */
46
61
  eval?: REPLEval | undefined;
@@ -73,13 +88,13 @@ declare module "node:repl" {
73
88
  * The function to invoke to format the output of each command before writing to `output`.
74
89
  * @default a wrapper for `util.inspect`
75
90
  *
76
- * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_customizing_repl_output
91
+ * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_customizing_repl_output
77
92
  */
78
93
  writer?: REPLWriter | undefined;
79
94
  /**
80
95
  * An optional function used for custom Tab auto completion.
81
96
  *
82
- * @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#readline_use_of_the_completer_function
97
+ * @see https://nodejs.org/dist/latest-v25.x/docs/api/readline.html#readline_use_of_the_completer_function
83
98
  */
84
99
  completer?: Completer | AsyncCompleter | undefined;
85
100
  /**
@@ -124,6 +139,16 @@ declare module "node:repl" {
124
139
  */
125
140
  action: REPLCommandAction;
126
141
  }
142
+ interface REPLServerSetupHistoryOptions {
143
+ filePath?: string | undefined;
144
+ size?: number | undefined;
145
+ removeHistoryDuplicates?: boolean | undefined;
146
+ onHistoryFileLoaded?: ((err: Error | null, repl: REPLServer) => void) | undefined;
147
+ }
148
+ interface REPLServerEventMap extends InterfaceEventMap {
149
+ "exit": [];
150
+ "reset": [context: Context];
151
+ }
127
152
  /**
128
153
  * Instances of `repl.REPLServer` are created using the {@link start} method
129
154
  * or directly using the JavaScript `new` keyword.
@@ -139,6 +164,17 @@ declare module "node:repl" {
139
164
  * @since v0.1.91
140
165
  */
141
166
  class REPLServer extends Interface {
167
+ /**
168
+ * NOTE: According to the documentation:
169
+ *
170
+ * > Instances of `repl.REPLServer` are created using the `repl.start()` method and
171
+ * > _should not_ be created directly using the JavaScript `new` keyword.
172
+ *
173
+ * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
174
+ *
175
+ * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_class_replserver
176
+ */
177
+ private constructor();
142
178
  /**
143
179
  * The `vm.Context` provided to the `eval` function to be used for JavaScript
144
180
  * evaluation.
@@ -167,33 +203,33 @@ declare module "node:repl" {
167
203
  /**
168
204
  * A value indicating whether the REPL is currently in "editor mode".
169
205
  *
170
- * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_commands_and_special_keys
206
+ * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_commands_and_special_keys
171
207
  */
172
208
  readonly editorMode: boolean;
173
209
  /**
174
210
  * A value indicating whether the `_` variable has been assigned.
175
211
  *
176
- * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
212
+ * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
177
213
  */
178
214
  readonly underscoreAssigned: boolean;
179
215
  /**
180
216
  * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
181
217
  *
182
- * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
218
+ * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
183
219
  */
184
220
  readonly last: any;
185
221
  /**
186
222
  * A value indicating whether the `_error` variable has been assigned.
187
223
  *
188
224
  * @since v9.8.0
189
- * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
225
+ * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
190
226
  */
191
227
  readonly underscoreErrAssigned: boolean;
192
228
  /**
193
229
  * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
194
230
  *
195
231
  * @since v9.8.0
196
- * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
232
+ * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
197
233
  */
198
234
  readonly lastError: any;
199
235
  /**
@@ -237,17 +273,6 @@ declare module "node:repl" {
237
273
  * prefacing every repl statement with `'use strict'`.
238
274
  */
239
275
  readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
240
- /**
241
- * NOTE: According to the documentation:
242
- *
243
- * > Instances of `repl.REPLServer` are created using the `repl.start()` method and
244
- * > _should not_ be created directly using the JavaScript `new` keyword.
245
- *
246
- * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
247
- *
248
- * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_class_replserver
249
- */
250
- private constructor();
251
276
  /**
252
277
  * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands
253
278
  * to the REPL instance. Such commands are invoked by typing a `.` followed by the `keyword`. The `cmd` is either a `Function` or an `Object` with the following
@@ -317,79 +342,56 @@ declare module "node:repl" {
317
342
  * @param historyPath the path to the history file
318
343
  * @param callback called when history writes are ready or upon error
319
344
  */
320
- setupHistory(path: string, callback: (err: Error | null, repl: this) => void): void;
321
- /**
322
- * events.EventEmitter
323
- * 1. close - inherited from `readline.Interface`
324
- * 2. line - inherited from `readline.Interface`
325
- * 3. pause - inherited from `readline.Interface`
326
- * 4. resume - inherited from `readline.Interface`
327
- * 5. SIGCONT - inherited from `readline.Interface`
328
- * 6. SIGINT - inherited from `readline.Interface`
329
- * 7. SIGTSTP - inherited from `readline.Interface`
330
- * 8. exit
331
- * 9. reset
332
- */
333
- addListener(event: string, listener: (...args: any[]) => void): this;
334
- addListener(event: "close", listener: () => void): this;
335
- addListener(event: "line", listener: (input: string) => void): this;
336
- addListener(event: "pause", listener: () => void): this;
337
- addListener(event: "resume", listener: () => void): this;
338
- addListener(event: "SIGCONT", listener: () => void): this;
339
- addListener(event: "SIGINT", listener: () => void): this;
340
- addListener(event: "SIGTSTP", listener: () => void): this;
341
- addListener(event: "exit", listener: () => void): this;
342
- addListener(event: "reset", listener: (context: Context) => void): this;
343
- emit(event: string | symbol, ...args: any[]): boolean;
344
- emit(event: "close"): boolean;
345
- emit(event: "line", input: string): boolean;
346
- emit(event: "pause"): boolean;
347
- emit(event: "resume"): boolean;
348
- emit(event: "SIGCONT"): boolean;
349
- emit(event: "SIGINT"): boolean;
350
- emit(event: "SIGTSTP"): boolean;
351
- emit(event: "exit"): boolean;
352
- emit(event: "reset", context: Context): boolean;
353
- on(event: string, listener: (...args: any[]) => void): this;
354
- on(event: "close", listener: () => void): this;
355
- on(event: "line", listener: (input: string) => void): this;
356
- on(event: "pause", listener: () => void): this;
357
- on(event: "resume", listener: () => void): this;
358
- on(event: "SIGCONT", listener: () => void): this;
359
- on(event: "SIGINT", listener: () => void): this;
360
- on(event: "SIGTSTP", listener: () => void): this;
361
- on(event: "exit", listener: () => void): this;
362
- on(event: "reset", listener: (context: Context) => void): this;
363
- once(event: string, listener: (...args: any[]) => void): this;
364
- once(event: "close", listener: () => void): this;
365
- once(event: "line", listener: (input: string) => void): this;
366
- once(event: "pause", listener: () => void): this;
367
- once(event: "resume", listener: () => void): this;
368
- once(event: "SIGCONT", listener: () => void): this;
369
- once(event: "SIGINT", listener: () => void): this;
370
- once(event: "SIGTSTP", listener: () => void): this;
371
- once(event: "exit", listener: () => void): this;
372
- once(event: "reset", listener: (context: Context) => void): this;
373
- prependListener(event: string, listener: (...args: any[]) => void): this;
374
- prependListener(event: "close", listener: () => void): this;
375
- prependListener(event: "line", listener: (input: string) => void): this;
376
- prependListener(event: "pause", listener: () => void): this;
377
- prependListener(event: "resume", listener: () => void): this;
378
- prependListener(event: "SIGCONT", listener: () => void): this;
379
- prependListener(event: "SIGINT", listener: () => void): this;
380
- prependListener(event: "SIGTSTP", listener: () => void): this;
381
- prependListener(event: "exit", listener: () => void): this;
382
- prependListener(event: "reset", listener: (context: Context) => void): this;
383
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
384
- prependOnceListener(event: "close", listener: () => void): this;
385
- prependOnceListener(event: "line", listener: (input: string) => void): this;
386
- prependOnceListener(event: "pause", listener: () => void): this;
387
- prependOnceListener(event: "resume", listener: () => void): this;
388
- prependOnceListener(event: "SIGCONT", listener: () => void): this;
389
- prependOnceListener(event: "SIGINT", listener: () => void): this;
390
- prependOnceListener(event: "SIGTSTP", listener: () => void): this;
391
- prependOnceListener(event: "exit", listener: () => void): this;
392
- prependOnceListener(event: "reset", listener: (context: Context) => void): this;
345
+ setupHistory(historyPath: string, callback: (err: Error | null, repl: this) => void): void;
346
+ setupHistory(
347
+ historyConfig?: REPLServerSetupHistoryOptions,
348
+ callback?: (err: Error | null, repl: this) => void,
349
+ ): void;
350
+ // #region InternalEventEmitter
351
+ addListener<E extends keyof REPLServerEventMap>(
352
+ eventName: E,
353
+ listener: (...args: REPLServerEventMap[E]) => void,
354
+ ): this;
355
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
356
+ emit<E extends keyof REPLServerEventMap>(eventName: E, ...args: REPLServerEventMap[E]): boolean;
357
+ emit(eventName: string | symbol, ...args: any[]): boolean;
358
+ listenerCount<E extends keyof REPLServerEventMap>(
359
+ eventName: E,
360
+ listener?: (...args: REPLServerEventMap[E]) => void,
361
+ ): number;
362
+ listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
363
+ listeners<E extends keyof REPLServerEventMap>(eventName: E): ((...args: REPLServerEventMap[E]) => void)[];
364
+ listeners(eventName: string | symbol): ((...args: any[]) => void)[];
365
+ off<E extends keyof REPLServerEventMap>(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this;
366
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
367
+ on<E extends keyof REPLServerEventMap>(eventName: E, listener: (...args: REPLServerEventMap[E]) => void): this;
368
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
369
+ once<E extends keyof REPLServerEventMap>(
370
+ eventName: E,
371
+ listener: (...args: REPLServerEventMap[E]) => void,
372
+ ): this;
373
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
374
+ prependListener<E extends keyof REPLServerEventMap>(
375
+ eventName: E,
376
+ listener: (...args: REPLServerEventMap[E]) => void,
377
+ ): this;
378
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
379
+ prependOnceListener<E extends keyof REPLServerEventMap>(
380
+ eventName: E,
381
+ listener: (...args: REPLServerEventMap[E]) => void,
382
+ ): this;
383
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
384
+ rawListeners<E extends keyof REPLServerEventMap>(eventName: E): ((...args: REPLServerEventMap[E]) => void)[];
385
+ rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
386
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
387
+ removeAllListeners<E extends keyof REPLServerEventMap>(eventName?: E): this;
388
+ removeAllListeners(eventName?: string | symbol): this;
389
+ removeListener<E extends keyof REPLServerEventMap>(
390
+ eventName: E,
391
+ listener: (...args: REPLServerEventMap[E]) => void,
392
+ ): this;
393
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
394
+ // #endregion
393
395
  }
394
396
  /**
395
397
  * A flag passed in the REPL options. Evaluates expressions in sloppy mode.
@@ -417,7 +419,7 @@ declare module "node:repl" {
417
419
  /**
418
420
  * Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
419
421
  *
420
- * @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_recoverable_errors
422
+ * @see https://nodejs.org/dist/latest-v25.x/docs/api/repl.html#repl_recoverable_errors
421
423
  */
422
424
  class Recoverable extends SyntaxError {
423
425
  err: Error;