@types/node 22.15.21 → 22.19.7

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 (80) hide show
  1. node v22.19/README.md +15 -0
  2. node v22.19/assert/strict.d.ts +111 -0
  3. node/assert.d.ts → node v22.19/assert.d.ts +119 -95
  4. node/buffer.buffer.d.ts → node v22.19/buffer.buffer.d.ts +9 -0
  5. node/buffer.d.ts → node v22.19/buffer.d.ts +14 -6
  6. node/child_process.d.ts → node v22.19/child_process.d.ts +89 -162
  7. node/cluster.d.ts → node v22.19/cluster.d.ts +4 -5
  8. node/compatibility/disposable.d.ts → node v22.19/compatibility/disposable.d.ts +0 -2
  9. node/compatibility/indexable.d.ts → node v22.19/compatibility/indexable.d.ts +0 -3
  10. node/compatibility/iterators.d.ts → node v22.19/compatibility/iterators.d.ts +0 -1
  11. node/crypto.d.ts → node v22.19/crypto.d.ts +203 -167
  12. node/dgram.d.ts → node v22.19/dgram.d.ts +9 -8
  13. node/diagnostics_channel.d.ts → node v22.19/diagnostics_channel.d.ts +17 -12
  14. node/dns/promises.d.ts → node v22.19/dns/promises.d.ts +36 -9
  15. node/dns.d.ts → node v22.19/dns.d.ts +79 -21
  16. node/events.d.ts → node v22.19/events.d.ts +80 -35
  17. node/fs/promises.d.ts → node v22.19/fs/promises.d.ts +81 -58
  18. node/fs.d.ts → node v22.19/fs.d.ts +154 -130
  19. node v22.19/globals.d.ts +172 -0
  20. node v22.19/globals.typedarray.d.ts +38 -0
  21. node/http.d.ts → node v22.19/http.d.ts +140 -35
  22. node/http2.d.ts → node v22.19/http2.d.ts +114 -27
  23. node/https.d.ts → node v22.19/https.d.ts +96 -62
  24. node/index.d.ts → node v22.19/index.d.ts +7 -2
  25. node v22.19/inspector.d.ts +253 -0
  26. node/inspector.d.ts → node v22.19/inspector.generated.d.ts +880 -830
  27. node/module.d.ts → node v22.19/module.d.ts +136 -17
  28. node/net.d.ts → node v22.19/net.d.ts +33 -11
  29. node/os.d.ts → node v22.19/os.d.ts +14 -3
  30. node/package.json → node v22.19/package.json +3 -83
  31. node/path.d.ts → node v22.19/path.d.ts +1 -1
  32. node/perf_hooks.d.ts → node v22.19/perf_hooks.d.ts +8 -10
  33. node/process.d.ts → node v22.19/process.d.ts +53 -27
  34. node/readline/promises.d.ts → node v22.19/readline/promises.d.ts +1 -2
  35. node/repl.d.ts → node v22.19/repl.d.ts +3 -5
  36. node/sqlite.d.ts → node v22.19/sqlite.d.ts +219 -6
  37. node/stream/consumers.d.ts → node v22.19/stream/consumers.d.ts +2 -2
  38. node/stream/web.d.ts → node v22.19/stream/web.d.ts +8 -0
  39. node/stream.d.ts → node v22.19/stream.d.ts +34 -32
  40. node/string_decoder.d.ts → node v22.19/string_decoder.d.ts +2 -2
  41. node v22.19/test.d.ts +2162 -0
  42. node/tls.d.ts → node v22.19/tls.d.ts +126 -66
  43. node/ts5.6/buffer.buffer.d.ts → node v22.19/ts5.6/buffer.buffer.d.ts +10 -2
  44. node v22.19/ts5.6/globals.typedarray.d.ts +34 -0
  45. node/ts5.6/index.d.ts → node v22.19/ts5.6/index.d.ts +7 -2
  46. node/url.d.ts → node v22.19/url.d.ts +21 -9
  47. node/util.d.ts → node v22.19/util.d.ts +33 -11
  48. node/v8.d.ts → node v22.19/v8.d.ts +66 -35
  49. node/vm.d.ts → node v22.19/vm.d.ts +65 -56
  50. node/wasi.d.ts → node v22.19/wasi.d.ts +1 -1
  51. node v22.19/web-globals/abortcontroller.d.ts +34 -0
  52. node v22.19/web-globals/domexception.d.ts +68 -0
  53. node v22.19/web-globals/events.d.ts +97 -0
  54. node v22.19/web-globals/fetch.d.ts +46 -0
  55. node v22.19/web-globals/navigator.d.ts +22 -0
  56. node v22.19/web-globals/storage.d.ts +24 -0
  57. node/worker_threads.d.ts → node v22.19/worker_threads.d.ts +112 -74
  58. node/zlib.d.ts → node v22.19/zlib.d.ts +39 -26
  59. node/README.md +0 -15
  60. node/assert/strict.d.ts +0 -8
  61. node/dom-events.d.ts +0 -124
  62. node/globals.d.ts +0 -371
  63. node/globals.typedarray.d.ts +0 -21
  64. node/test.d.ts +0 -2280
  65. node/ts5.6/globals.typedarray.d.ts +0 -19
  66. {node → node v22.19}/LICENSE +0 -0
  67. node/async_hooks.d.ts → node v22.19/async_hooks.d.ts +1 -1
  68. {node → node v22.19}/compatibility/index.d.ts +0 -0
  69. {node → node v22.19}/console.d.ts +0 -0
  70. {node → node v22.19}/constants.d.ts +0 -0
  71. {node → node v22.19}/domain.d.ts +0 -0
  72. {node → node v22.19}/punycode.d.ts +0 -0
  73. {node → node v22.19}/querystring.d.ts +0 -0
  74. {node → node v22.19}/readline.d.ts +0 -0
  75. {node → node v22.19}/sea.d.ts +0 -0
  76. {node → node v22.19}/stream/promises.d.ts +0 -0
  77. {node → node v22.19}/timers/promises.d.ts +0 -0
  78. {node → node v22.19}/timers.d.ts +0 -0
  79. {node → node v22.19}/trace_events.d.ts +0 -0
  80. {node → node v22.19}/tty.d.ts +0 -0
@@ -45,22 +45,22 @@ declare module "stream" {
45
45
  emitClose?: boolean | undefined;
46
46
  highWaterMark?: number | undefined;
47
47
  objectMode?: boolean | undefined;
48
- construct?(this: T, callback: (error?: Error | null) => void): void;
49
- destroy?(this: T, error: Error | null, callback: (error?: Error | null) => void): void;
48
+ construct?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined;
49
+ destroy?: ((this: T, error: Error | null, callback: (error?: Error | null) => void) => void) | undefined;
50
50
  autoDestroy?: boolean | undefined;
51
51
  }
52
52
  interface ReadableOptions<T extends Readable = Readable> extends StreamOptions<T> {
53
53
  encoding?: BufferEncoding | undefined;
54
- read?(this: T, size: number): void;
54
+ read?: ((this: T, size: number) => void) | undefined;
55
55
  }
56
56
  interface ArrayOptions {
57
57
  /**
58
58
  * The maximum concurrent invocations of `fn` to call on the stream at once.
59
59
  * @default 1
60
60
  */
61
- concurrency?: number;
61
+ concurrency?: number | undefined;
62
62
  /** Allows destroying the stream if the signal is aborted. */
63
- signal?: AbortSignal;
63
+ signal?: AbortSignal | undefined;
64
64
  }
65
65
  /**
66
66
  * @since v0.9.4
@@ -76,7 +76,6 @@ declare module "stream" {
76
76
  /**
77
77
  * A utility method for creating a `Readable` from a web `ReadableStream`.
78
78
  * @since v17.0.0
79
- * @experimental
80
79
  */
81
80
  static fromWeb(
82
81
  readableStream: streamWeb.ReadableStream,
@@ -85,7 +84,6 @@ declare module "stream" {
85
84
  /**
86
85
  * A utility method for creating a web `ReadableStream` from a `Readable`.
87
86
  * @since v17.0.0
88
- * @experimental
89
87
  */
90
88
  static toWeb(
91
89
  streamReadable: Readable,
@@ -101,7 +99,6 @@ declare module "stream" {
101
99
  /**
102
100
  * Returns whether the stream was destroyed or errored before emitting `'end'`.
103
101
  * @since v16.8.0
104
- * @experimental
105
102
  */
106
103
  readonly readableAborted: boolean;
107
104
  /**
@@ -113,7 +110,6 @@ declare module "stream" {
113
110
  /**
114
111
  * Returns whether `'data'` has been emitted.
115
112
  * @since v16.7.0, v14.18.0
116
- * @experimental
117
113
  */
118
114
  readonly readableDidRead: boolean;
119
115
  /**
@@ -696,21 +692,25 @@ declare module "stream" {
696
692
  interface WritableOptions<T extends Writable = Writable> extends StreamOptions<T> {
697
693
  decodeStrings?: boolean | undefined;
698
694
  defaultEncoding?: BufferEncoding | undefined;
699
- write?(
700
- this: T,
701
- chunk: any,
702
- encoding: BufferEncoding,
703
- callback: (error?: Error | null) => void,
704
- ): void;
705
- writev?(
706
- this: T,
707
- chunks: Array<{
708
- chunk: any;
709
- encoding: BufferEncoding;
710
- }>,
711
- callback: (error?: Error | null) => void,
712
- ): void;
713
- final?(this: T, callback: (error?: Error | null) => void): void;
695
+ write?:
696
+ | ((
697
+ this: T,
698
+ chunk: any,
699
+ encoding: BufferEncoding,
700
+ callback: (error?: Error | null) => void,
701
+ ) => void)
702
+ | undefined;
703
+ writev?:
704
+ | ((
705
+ this: T,
706
+ chunks: Array<{
707
+ chunk: any;
708
+ encoding: BufferEncoding;
709
+ }>,
710
+ callback: (error?: Error | null) => void,
711
+ ) => void)
712
+ | undefined;
713
+ final?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined;
714
714
  }
715
715
  /**
716
716
  * @since v0.9.4
@@ -719,7 +719,6 @@ declare module "stream" {
719
719
  /**
720
720
  * A utility method for creating a `Writable` from a web `WritableStream`.
721
721
  * @since v17.0.0
722
- * @experimental
723
722
  */
724
723
  static fromWeb(
725
724
  writableStream: streamWeb.WritableStream,
@@ -728,7 +727,6 @@ declare module "stream" {
728
727
  /**
729
728
  * A utility method for creating a web `WritableStream` from a `Writable`.
730
729
  * @since v17.0.0
731
- * @experimental
732
730
  */
733
731
  static toWeb(streamWritable: Writable): streamWeb.WritableStream;
734
732
  /**
@@ -737,6 +735,11 @@ declare module "stream" {
737
735
  * @since v11.4.0
738
736
  */
739
737
  readonly writable: boolean;
738
+ /**
739
+ * Returns whether the stream was destroyed or errored before emitting `'finish'`.
740
+ * @since v18.0.0, v16.17.0
741
+ */
742
+ readonly writableAborted: boolean;
740
743
  /**
741
744
  * Is `true` after `writable.end()` has been called. This property
742
745
  * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead.
@@ -1084,7 +1087,6 @@ declare module "stream" {
1084
1087
  /**
1085
1088
  * A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`.
1086
1089
  * @since v17.0.0
1087
- * @experimental
1088
1090
  */
1089
1091
  static toWeb(streamDuplex: Duplex): {
1090
1092
  readable: streamWeb.ReadableStream;
@@ -1093,7 +1095,6 @@ declare module "stream" {
1093
1095
  /**
1094
1096
  * A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`.
1095
1097
  * @since v17.0.0
1096
- * @experimental
1097
1098
  */
1098
1099
  static fromWeb(
1099
1100
  duplexStream: {
@@ -1227,8 +1228,10 @@ declare module "stream" {
1227
1228
  function duplexPair(options?: DuplexOptions): [Duplex, Duplex];
1228
1229
  type TransformCallback = (error?: Error | null, data?: any) => void;
1229
1230
  interface TransformOptions<T extends Transform = Transform> extends DuplexOptions<T> {
1230
- transform?(this: T, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
1231
- flush?(this: T, callback: TransformCallback): void;
1231
+ transform?:
1232
+ | ((this: T, chunk: any, encoding: BufferEncoding, callback: TransformCallback) => void)
1233
+ | undefined;
1234
+ flush?: ((this: T, callback: TransformCallback) => void) | undefined;
1232
1235
  }
1233
1236
  /**
1234
1237
  * Transform streams are `Duplex` streams where the output is in some way
@@ -1635,6 +1638,7 @@ declare module "stream" {
1635
1638
  ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
1636
1639
  ): Promise<void>;
1637
1640
  }
1641
+ // TODO: this interface never existed; remove in next major
1638
1642
  interface Pipe {
1639
1643
  close(): void;
1640
1644
  hasRef(): boolean;
@@ -1644,13 +1648,11 @@ declare module "stream" {
1644
1648
  /**
1645
1649
  * Returns whether the stream has encountered an error.
1646
1650
  * @since v17.3.0, v16.14.0
1647
- * @experimental
1648
1651
  */
1649
1652
  function isErrored(stream: Readable | Writable | NodeJS.ReadableStream | NodeJS.WritableStream): boolean;
1650
1653
  /**
1651
1654
  * Returns whether the stream is readable.
1652
1655
  * @since v17.4.0, v16.14.0
1653
- * @experimental
1654
1656
  */
1655
1657
  function isReadable(stream: Readable | NodeJS.ReadableStream): boolean;
1656
1658
  }
@@ -48,7 +48,7 @@ declare module "string_decoder" {
48
48
  * @since v0.1.99
49
49
  * @param buffer The bytes to decode.
50
50
  */
51
- write(buffer: string | Buffer | NodeJS.ArrayBufferView): string;
51
+ write(buffer: string | NodeJS.ArrayBufferView): string;
52
52
  /**
53
53
  * Returns any remaining input stored in the internal buffer as a string. Bytes
54
54
  * representing incomplete UTF-8 and UTF-16 characters will be replaced with
@@ -59,7 +59,7 @@ declare module "string_decoder" {
59
59
  * @since v0.9.3
60
60
  * @param buffer The bytes to decode.
61
61
  */
62
- end(buffer?: string | Buffer | NodeJS.ArrayBufferView): string;
62
+ end(buffer?: string | NodeJS.ArrayBufferView): string;
63
63
  }
64
64
  }
65
65
  declare module "node:string_decoder" {