@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
package/net.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
  * > Stability: 2 - Stable
3
18
  *
@@ -10,13 +25,14 @@
10
25
  * ```js
11
26
  * import net from 'node:net';
12
27
  * ```
13
- * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/net.js)
28
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/net.js)
14
29
  */
15
30
 
16
31
  declare module "node:net" {
17
- import * as stream from 'node:stream';
18
- import { Abortable, EventEmitter } from 'node:events';
32
+ import { NonSharedBuffer } from 'node:buffer';
19
33
  import * as dns from '_not-use-node-type_dns';
34
+ import { Abortable, EventEmitter, InternalEventEmitter } from 'node:events';
35
+ import * as stream from 'node:stream';
20
36
  type LookupFunction = (
21
37
  hostname: string,
22
38
  options: dns.LookupOptions,
@@ -33,7 +49,7 @@ declare module "node:net" {
33
49
  onread?: OnReadOpts | undefined;
34
50
  readable?: boolean | undefined;
35
51
  writable?: boolean | undefined;
36
- signal?: AbortSignal;
52
+ signal?: AbortSignal | undefined;
37
53
  }
38
54
  interface OnReadOpts {
39
55
  buffer: Uint8Array | (() => Uint8Array);
@@ -70,6 +86,17 @@ declare module "node:net" {
70
86
  }
71
87
  type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
72
88
  type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed";
89
+ interface SocketEventMap extends Omit<stream.DuplexEventMap, "close"> {
90
+ "close": [hadError: boolean];
91
+ "connect": [];
92
+ "connectionAttempt": [ip: string, port: number, family: number];
93
+ "connectionAttemptFailed": [ip: string, port: number, family: number, error: Error];
94
+ "connectionAttemptTimeout": [ip: string, port: number, family: number];
95
+ "data": [data: string | NonSharedBuffer];
96
+ "lookup": [err: Error | null, address: string, family: number | null, host: string];
97
+ "ready": [];
98
+ "timeout": [];
99
+ }
73
100
  /**
74
101
  * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
75
102
  * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
@@ -322,25 +349,25 @@ declare module "node:net" {
322
349
  * the socket is destroyed (for example, if the client disconnected).
323
350
  * @since v0.5.10
324
351
  */
325
- readonly remoteAddress?: string | undefined;
352
+ readonly remoteAddress: string | undefined;
326
353
  /**
327
354
  * The string representation of the remote IP family. `'IPv4'` or `'IPv6'`. Value may be `undefined` if
328
355
  * the socket is destroyed (for example, if the client disconnected).
329
356
  * @since v0.11.14
330
357
  */
331
- readonly remoteFamily?: string | undefined;
358
+ readonly remoteFamily: string | undefined;
332
359
  /**
333
360
  * The numeric representation of the remote port. For example, `80` or `21`. Value may be `undefined` if
334
361
  * the socket is destroyed (for example, if the client disconnected).
335
362
  * @since v0.5.10
336
363
  */
337
- readonly remotePort?: number | undefined;
364
+ readonly remotePort: number | undefined;
338
365
  /**
339
366
  * The socket timeout in milliseconds as set by `socket.setTimeout()`.
340
367
  * It is `undefined` if a timeout has not been set.
341
368
  * @since v10.7.0
342
369
  */
343
- readonly timeout?: number | undefined;
370
+ readonly timeout?: number;
344
371
  /**
345
372
  * Half-closes the socket. i.e., it sends a FIN packet. It is possible the
346
373
  * server will still send some data.
@@ -354,141 +381,45 @@ declare module "node:net" {
354
381
  end(callback?: () => void): this;
355
382
  end(buffer: Uint8Array | string, callback?: () => void): this;
356
383
  end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
357
- /**
358
- * events.EventEmitter
359
- * 1. close
360
- * 2. connect
361
- * 3. connectionAttempt
362
- * 4. connectionAttemptFailed
363
- * 5. connectionAttemptTimeout
364
- * 6. data
365
- * 7. drain
366
- * 8. end
367
- * 9. error
368
- * 10. lookup
369
- * 11. ready
370
- * 12. timeout
371
- */
372
- addListener(event: string, listener: (...args: any[]) => void): this;
373
- addListener(event: "close", listener: (hadError: boolean) => void): this;
374
- addListener(event: "connect", listener: () => void): this;
375
- addListener(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
376
- addListener(
377
- event: "connectionAttemptFailed",
378
- listener: (ip: string, port: number, family: number, error: Error) => void,
379
- ): this;
380
- addListener(
381
- event: "connectionAttemptTimeout",
382
- listener: (ip: string, port: number, family: number) => void,
383
- ): this;
384
- addListener(event: "data", listener: (data: Buffer) => void): this;
385
- addListener(event: "drain", listener: () => void): this;
386
- addListener(event: "end", listener: () => void): this;
387
- addListener(event: "error", listener: (err: Error) => void): this;
388
- addListener(
389
- event: "lookup",
390
- listener: (err: Error, address: string, family: string | number, host: string) => void,
391
- ): this;
392
- addListener(event: "ready", listener: () => void): this;
393
- addListener(event: "timeout", listener: () => void): this;
394
- emit(event: string | symbol, ...args: any[]): boolean;
395
- emit(event: "close", hadError: boolean): boolean;
396
- emit(event: "connect"): boolean;
397
- emit(event: "connectionAttempt", ip: string, port: number, family: number): boolean;
398
- emit(event: "connectionAttemptFailed", ip: string, port: number, family: number, error: Error): boolean;
399
- emit(event: "connectionAttemptTimeout", ip: string, port: number, family: number): boolean;
400
- emit(event: "data", data: Buffer): boolean;
401
- emit(event: "drain"): boolean;
402
- emit(event: "end"): boolean;
403
- emit(event: "error", err: Error): boolean;
404
- emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean;
405
- emit(event: "ready"): boolean;
406
- emit(event: "timeout"): boolean;
407
- on(event: string, listener: (...args: any[]) => void): this;
408
- on(event: "close", listener: (hadError: boolean) => void): this;
409
- on(event: "connect", listener: () => void): this;
410
- on(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
411
- on(
412
- event: "connectionAttemptFailed",
413
- listener: (ip: string, port: number, family: number, error: Error) => void,
414
- ): this;
415
- on(event: "connectionAttemptTimeout", listener: (ip: string, port: number, family: number) => void): this;
416
- on(event: "data", listener: (data: Buffer) => void): this;
417
- on(event: "drain", listener: () => void): this;
418
- on(event: "end", listener: () => void): this;
419
- on(event: "error", listener: (err: Error) => void): this;
420
- on(
421
- event: "lookup",
422
- listener: (err: Error, address: string, family: string | number, host: string) => void,
423
- ): this;
424
- on(event: "ready", listener: () => void): this;
425
- on(event: "timeout", listener: () => void): this;
426
- once(event: string, listener: (...args: any[]) => void): this;
427
- once(event: "close", listener: (hadError: boolean) => void): this;
428
- once(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
429
- once(
430
- event: "connectionAttemptFailed",
431
- listener: (ip: string, port: number, family: number, error: Error) => void,
432
- ): this;
433
- once(event: "connectionAttemptTimeout", listener: (ip: string, port: number, family: number) => void): this;
434
- once(event: "connect", listener: () => void): this;
435
- once(event: "data", listener: (data: Buffer) => void): this;
436
- once(event: "drain", listener: () => void): this;
437
- once(event: "end", listener: () => void): this;
438
- once(event: "error", listener: (err: Error) => void): this;
439
- once(
440
- event: "lookup",
441
- listener: (err: Error, address: string, family: string | number, host: string) => void,
442
- ): this;
443
- once(event: "ready", listener: () => void): this;
444
- once(event: "timeout", listener: () => void): this;
445
- prependListener(event: string, listener: (...args: any[]) => void): this;
446
- prependListener(event: "close", listener: (hadError: boolean) => void): this;
447
- prependListener(event: "connect", listener: () => void): this;
448
- prependListener(event: "connectionAttempt", listener: (ip: string, port: number, family: number) => void): this;
449
- prependListener(
450
- event: "connectionAttemptFailed",
451
- listener: (ip: string, port: number, family: number, error: Error) => void,
384
+ // #region InternalEventEmitter
385
+ addListener<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
386
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
387
+ emit<E extends keyof SocketEventMap>(eventName: E, ...args: SocketEventMap[E]): boolean;
388
+ emit(eventName: string | symbol, ...args: any[]): boolean;
389
+ listenerCount<E extends keyof SocketEventMap>(
390
+ eventName: E,
391
+ listener?: (...args: SocketEventMap[E]) => void,
392
+ ): number;
393
+ listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
394
+ listeners<E extends keyof SocketEventMap>(eventName: E): ((...args: SocketEventMap[E]) => void)[];
395
+ listeners(eventName: string | symbol): ((...args: any[]) => void)[];
396
+ off<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
397
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
398
+ on<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
399
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
400
+ once<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
401
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
402
+ prependListener<E extends keyof SocketEventMap>(
403
+ eventName: E,
404
+ listener: (...args: SocketEventMap[E]) => void,
452
405
  ): this;
453
- prependListener(
454
- event: "connectionAttemptTimeout",
455
- listener: (ip: string, port: number, family: number) => void,
406
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
407
+ prependOnceListener<E extends keyof SocketEventMap>(
408
+ eventName: E,
409
+ listener: (...args: SocketEventMap[E]) => void,
456
410
  ): this;
457
- prependListener(event: "data", listener: (data: Buffer) => void): this;
458
- prependListener(event: "drain", listener: () => void): this;
459
- prependListener(event: "end", listener: () => void): this;
460
- prependListener(event: "error", listener: (err: Error) => void): this;
461
- prependListener(
462
- event: "lookup",
463
- listener: (err: Error, address: string, family: string | number, host: string) => void,
411
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
412
+ rawListeners<E extends keyof SocketEventMap>(eventName: E): ((...args: SocketEventMap[E]) => void)[];
413
+ rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
414
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
415
+ removeAllListeners<E extends keyof SocketEventMap>(eventName?: E): this;
416
+ removeAllListeners(eventName?: string | symbol): this;
417
+ removeListener<E extends keyof SocketEventMap>(
418
+ eventName: E,
419
+ listener: (...args: SocketEventMap[E]) => void,
464
420
  ): this;
465
- prependListener(event: "ready", listener: () => void): this;
466
- prependListener(event: "timeout", listener: () => void): this;
467
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
468
- prependOnceListener(event: "close", listener: (hadError: boolean) => void): this;
469
- prependOnceListener(event: "connect", listener: () => void): this;
470
- prependOnceListener(
471
- event: "connectionAttempt",
472
- listener: (ip: string, port: number, family: number) => void,
473
- ): this;
474
- prependOnceListener(
475
- event: "connectionAttemptFailed",
476
- listener: (ip: string, port: number, family: number, error: Error) => void,
477
- ): this;
478
- prependOnceListener(
479
- event: "connectionAttemptTimeout",
480
- listener: (ip: string, port: number, family: number) => void,
481
- ): this;
482
- prependOnceListener(event: "data", listener: (data: Buffer) => void): this;
483
- prependOnceListener(event: "drain", listener: () => void): this;
484
- prependOnceListener(event: "end", listener: () => void): this;
485
- prependOnceListener(event: "error", listener: (err: Error) => void): this;
486
- prependOnceListener(
487
- event: "lookup",
488
- listener: (err: Error, address: string, family: string | number, host: string) => void,
489
- ): this;
490
- prependOnceListener(event: "ready", listener: () => void): this;
491
- prependOnceListener(event: "timeout", listener: () => void): this;
421
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
422
+ // #endregion
492
423
  }
493
424
  interface ListenOptions extends Abortable {
494
425
  backlog?: number | undefined;
@@ -536,7 +467,7 @@ declare module "node:net" {
536
467
  keepAliveInitialDelay?: number | undefined;
537
468
  /**
538
469
  * Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
539
- * @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v24.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode).
470
+ * @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode).
540
471
  * @since v18.17.0, v20.1.0
541
472
  */
542
473
  highWaterMark?: number | undefined;
@@ -558,11 +489,18 @@ declare module "node:net" {
558
489
  remotePort?: number;
559
490
  remoteFamily?: string;
560
491
  }
492
+ interface ServerEventMap {
493
+ "close": [];
494
+ "connection": [socket: Socket];
495
+ "error": [err: Error];
496
+ "listening": [];
497
+ "drop": [data?: DropArgument];
498
+ }
561
499
  /**
562
500
  * This class is used to create a TCP or `IPC` server.
563
501
  * @since v0.1.90
564
502
  */
565
- class Server extends EventEmitter {
503
+ class Server implements EventEmitter {
566
504
  constructor(connectionListener?: (socket: Socket) => void);
567
505
  constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
568
506
  /**
@@ -688,56 +626,13 @@ declare module "node:net" {
688
626
  * @since v5.7.0
689
627
  */
690
628
  readonly listening: boolean;
691
- /**
692
- * events.EventEmitter
693
- * 1. close
694
- * 2. connection
695
- * 3. error
696
- * 4. listening
697
- * 5. drop
698
- */
699
- addListener(event: string, listener: (...args: any[]) => void): this;
700
- addListener(event: "close", listener: () => void): this;
701
- addListener(event: "connection", listener: (socket: Socket) => void): this;
702
- addListener(event: "error", listener: (err: Error) => void): this;
703
- addListener(event: "listening", listener: () => void): this;
704
- addListener(event: "drop", listener: (data?: DropArgument) => void): this;
705
- emit(event: string | symbol, ...args: any[]): boolean;
706
- emit(event: "close"): boolean;
707
- emit(event: "connection", socket: Socket): boolean;
708
- emit(event: "error", err: Error): boolean;
709
- emit(event: "listening"): boolean;
710
- emit(event: "drop", data?: DropArgument): boolean;
711
- on(event: string, listener: (...args: any[]) => void): this;
712
- on(event: "close", listener: () => void): this;
713
- on(event: "connection", listener: (socket: Socket) => void): this;
714
- on(event: "error", listener: (err: Error) => void): this;
715
- on(event: "listening", listener: () => void): this;
716
- on(event: "drop", listener: (data?: DropArgument) => void): this;
717
- once(event: string, listener: (...args: any[]) => void): this;
718
- once(event: "close", listener: () => void): this;
719
- once(event: "connection", listener: (socket: Socket) => void): this;
720
- once(event: "error", listener: (err: Error) => void): this;
721
- once(event: "listening", listener: () => void): this;
722
- once(event: "drop", listener: (data?: DropArgument) => void): this;
723
- prependListener(event: string, listener: (...args: any[]) => void): this;
724
- prependListener(event: "close", listener: () => void): this;
725
- prependListener(event: "connection", listener: (socket: Socket) => void): this;
726
- prependListener(event: "error", listener: (err: Error) => void): this;
727
- prependListener(event: "listening", listener: () => void): this;
728
- prependListener(event: "drop", listener: (data?: DropArgument) => void): this;
729
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
730
- prependOnceListener(event: "close", listener: () => void): this;
731
- prependOnceListener(event: "connection", listener: (socket: Socket) => void): this;
732
- prependOnceListener(event: "error", listener: (err: Error) => void): this;
733
- prependOnceListener(event: "listening", listener: () => void): this;
734
- prependOnceListener(event: "drop", listener: (data?: DropArgument) => void): this;
735
629
  /**
736
630
  * Calls {@link Server.close()} and returns a promise that fulfills when the server has closed.
737
631
  * @since v20.5.0
738
632
  */
739
633
  [Symbol.asyncDispose](): Promise<void>;
740
634
  }
635
+ interface Server extends InternalEventEmitter<ServerEventMap> {}
741
636
  type IPVersion = "ipv4" | "ipv6";
742
637
  /**
743
638
  * The `BlockList` object can be used with some network APIs to specify rules for
@@ -806,6 +701,27 @@ declare module "node:net" {
806
701
  * @param value Any JS value
807
702
  */
808
703
  static isBlockList(value: unknown): value is BlockList;
704
+ /**
705
+ * ```js
706
+ * const blockList = new net.BlockList();
707
+ * const data = [
708
+ * 'Subnet: IPv4 192.168.1.0/24',
709
+ * 'Address: IPv4 10.0.0.5',
710
+ * 'Range: IPv4 192.168.2.1-192.168.2.10',
711
+ * 'Range: IPv4 10.0.0.1-10.0.0.10',
712
+ * ];
713
+ * blockList.fromJSON(data);
714
+ * blockList.fromJSON(JSON.stringify(data));
715
+ * ```
716
+ * @since v24.5.0
717
+ * @experimental
718
+ */
719
+ fromJSON(data: string | readonly string[]): void;
720
+ /**
721
+ * @since v24.5.0
722
+ * @experimental
723
+ */
724
+ toJSON(): readonly string[];
809
725
  }
810
726
  interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
811
727
  timeout?: number | undefined;
package/os.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:os` module provides operating system-related utility methods and
3
18
  * properties. It can be accessed using:
@@ -5,10 +20,11 @@
5
20
  * ```js
6
21
  * import os from 'node:os';
7
22
  * ```
8
- * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/os.js)
23
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/os.js)
9
24
  */
10
25
 
11
26
  declare module "node:os" {
27
+ import { NonSharedBuffer } from 'node:buffer';
12
28
  interface CpuInfo {
13
29
  model: string;
14
30
  speed: number;
@@ -31,10 +47,10 @@ declare module "node:os" {
31
47
  mac: string;
32
48
  internal: boolean;
33
49
  cidr: string | null;
50
+ scopeid?: number;
34
51
  }
35
52
  interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
36
53
  family: "IPv4";
37
- scopeid?: undefined;
38
54
  }
39
55
  interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
40
56
  family: "IPv6";
@@ -232,6 +248,15 @@ declare module "node:os" {
232
248
  * @since v2.3.0
233
249
  */
234
250
  function homedir(): string;
251
+ interface UserInfoOptions {
252
+ encoding?: BufferEncoding | "buffer" | undefined;
253
+ }
254
+ interface UserInfoOptionsWithBufferEncoding extends UserInfoOptions {
255
+ encoding: "buffer";
256
+ }
257
+ interface UserInfoOptionsWithStringEncoding extends UserInfoOptions {
258
+ encoding?: BufferEncoding | undefined;
259
+ }
235
260
  /**
236
261
  * Returns information about the currently effective user. On POSIX platforms,
237
262
  * this is typically a subset of the password file. The returned object includes
@@ -242,11 +267,12 @@ declare module "node:os" {
242
267
  * environment variables for the home directory before falling back to the
243
268
  * operating system response.
244
269
  *
245
- * Throws a [`SystemError`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`.
270
+ * Throws a [`SystemError`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`.
246
271
  * @since v6.0.0
247
272
  */
248
- function userInfo(options: { encoding: "buffer" }): UserInfo<Buffer>;
249
- function userInfo(options?: { encoding: BufferEncoding }): UserInfo<string>;
273
+ function userInfo(options?: UserInfoOptionsWithStringEncoding): UserInfo<string>;
274
+ function userInfo(options: UserInfoOptionsWithBufferEncoding): UserInfo<NonSharedBuffer>;
275
+ function userInfo(options: UserInfoOptions): UserInfo<string | NonSharedBuffer>;
250
276
  type SignalConstants = {
251
277
  [key in NodeJS.Signals]: number;
252
278
  };
@@ -421,7 +447,7 @@ declare module "node:os" {
421
447
  * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`,
422
448
  * `'mips'`, `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.
423
449
  *
424
- * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v24.x/api/process.html#processarch).
450
+ * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v25.x/api/process.html#processarch).
425
451
  * @since v0.5.0
426
452
  */
427
453
  function arch(): NodeJS.Architecture;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idlebox/stripe-node-types",
3
- "version": "24.0.14-patch.0",
3
+ "version": "24.0.15",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -129,11 +129,6 @@
129
129
  "main": "",
130
130
  "types": "index.d.ts",
131
131
  "typesVersions": {
132
- "<=5.1": {
133
- "*": [
134
- "ts5.1/*"
135
- ]
136
- },
137
132
  "<=5.6": {
138
133
  "*": [
139
134
  "ts5.6/*"
@@ -152,7 +147,7 @@
152
147
  },
153
148
  "dependencies": {},
154
149
  "peerDependencies": {},
155
- "typesPublisherContentHash": "f2ab6ee3016c1a7d1baf5391d24e04e58c4d932ac8ba8267ea5acc2cf3259dbb",
156
- "typeScriptVersion": "5.1",
150
+ "typesPublisherContentHash": "820c198d7a6ad561df9391e735b701c290d0da9e75d68c4a7e817a6c7ba1dc4f",
151
+ "typeScriptVersion": "5.2",
157
152
  "scripts": {}
158
153
  }
@@ -0,0 +1,20 @@
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
+
16
+
17
+ declare module "node:path/posix" {
18
+ import path = require('node:path');
19
+ export = path.posix;
20
+ }
@@ -0,0 +1,20 @@
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
+
16
+
17
+ declare module "node:path/win32" {
18
+ import path = require('node:path');
19
+ export = path.win32;
20
+ }