@types/node 24.10.3 → 25.0.1

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 (99) hide show
  1. node v24.10/README.md → node/README.md +2 -2
  2. node v24.10/assert/strict.d.ts → node/assert/strict.d.ts +5 -11
  3. node v24.10/assert.d.ts → node/assert.d.ts +9 -169
  4. node v24.10/async_hooks.d.ts → node/async_hooks.d.ts +8 -8
  5. node v24.10/buffer.buffer.d.ts → node/buffer.buffer.d.ts +1 -7
  6. node v24.10/buffer.d.ts → node/buffer.d.ts +44 -168
  7. node v24.10/child_process.d.ts → node/child_process.d.ts +16 -64
  8. node/cluster.d.ts +486 -0
  9. node/console.d.ts +151 -0
  10. node v24.10/constants.d.ts → node/constants.d.ts +3 -4
  11. node v24.10/crypto.d.ts → node/crypto.d.ts +279 -1631
  12. node v24.10/dgram.d.ts → node/dgram.d.ts +15 -51
  13. node v24.10/diagnostics_channel.d.ts → node/diagnostics_channel.d.ts +4 -4
  14. node v24.10/dns/promises.d.ts → node/dns/promises.d.ts +3 -3
  15. node v24.10/dns.d.ts → node/dns.d.ts +131 -132
  16. node v24.10/domain.d.ts → node/domain.d.ts +13 -17
  17. node/events.d.ts +1046 -0
  18. node v24.10/fs/promises.d.ts → node/fs/promises.d.ts +7 -8
  19. node v24.10/fs.d.ts → node/fs.d.ts +417 -455
  20. node v24.10/globals.d.ts → node/globals.d.ts +6 -26
  21. node/globals.typedarray.d.ts +101 -0
  22. node v24.10/http.d.ts → node/http.d.ts +263 -254
  23. node v24.10/http2.d.ts → node/http2.d.ts +528 -804
  24. node v24.10/https.d.ts → node/https.d.ts +59 -239
  25. node v24.10/index.d.ts → node/index.d.ts +15 -1
  26. node/inspector/promises.d.ts +41 -0
  27. node v24.10/inspector.d.ts → node/inspector.d.ts +6 -59
  28. node v24.10/inspector.generated.d.ts → node/inspector.generated.d.ts +3 -10
  29. node v24.10/module.d.ts → node/module.d.ts +47 -122
  30. node v24.10/net.d.ts → node/net.d.ts +63 -184
  31. node v24.10/os.d.ts → node/os.d.ts +6 -6
  32. node v24.10/package.json → node/package.json +2 -2
  33. node/path/posix.d.ts +8 -0
  34. node/path/win32.d.ts +8 -0
  35. node/path.d.ts +187 -0
  36. node/perf_hooks.d.ts +621 -0
  37. node v24.10/process.d.ts → node/process.d.ts +151 -128
  38. node v24.10/punycode.d.ts → node/punycode.d.ts +5 -5
  39. node v24.10/querystring.d.ts → node/querystring.d.ts +4 -4
  40. node/quic.d.ts +910 -0
  41. node v24.10/readline/promises.d.ts → node/readline/promises.d.ts +3 -3
  42. node v24.10/readline.d.ts → node/readline.d.ts +67 -120
  43. node v24.10/repl.d.ts → node/repl.d.ts +75 -98
  44. node v24.10/sea.d.ts → node/sea.d.ts +1 -1
  45. node v24.10/sqlite.d.ts → node/sqlite.d.ts +2 -2
  46. node v24.10/stream/consumers.d.ts → node/stream/consumers.d.ts +10 -10
  47. node/stream/promises.d.ts +211 -0
  48. node/stream/web.d.ts +296 -0
  49. node v24.10/stream.d.ts → node/stream.d.ts +555 -478
  50. node v24.10/string_decoder.d.ts → node/string_decoder.d.ts +4 -4
  51. node/test/reporters.d.ts +96 -0
  52. node v24.10/test.d.ts → node/test.d.ts +80 -180
  53. node v24.10/timers/promises.d.ts → node/timers/promises.d.ts +4 -4
  54. node v24.10/timers.d.ts → node/timers.d.ts +4 -130
  55. node v24.10/tls.d.ts → node/tls.d.ts +102 -177
  56. node v24.10/trace_events.d.ts → node/trace_events.d.ts +9 -9
  57. node v24.10/ts5.6/buffer.buffer.d.ts → node/ts5.6/buffer.buffer.d.ts +1 -7
  58. node v24.10/ts5.6/index.d.ts → node/ts5.6/index.d.ts +15 -1
  59. node v24.10/ts5.7/index.d.ts → node/ts5.7/index.d.ts +15 -1
  60. node v24.10/tty.d.ts → node/tty.d.ts +58 -16
  61. node/url.d.ts +519 -0
  62. node/util/types.d.ts +558 -0
  63. node v24.10/util.d.ts → node/util.d.ts +120 -792
  64. node v24.10/v8.d.ts → node/v8.d.ts +32 -5
  65. node v24.10/vm.d.ts → node/vm.d.ts +13 -13
  66. node v24.10/wasi.d.ts → node/wasi.d.ts +4 -4
  67. node v24.10/web-globals/abortcontroller.d.ts → node/web-globals/abortcontroller.d.ts +27 -2
  68. node/web-globals/blob.d.ts +23 -0
  69. node/web-globals/console.d.ts +9 -0
  70. node v24.10/web-globals/crypto.d.ts → node/web-globals/crypto.d.ts +7 -0
  71. node/web-globals/encoding.d.ts +11 -0
  72. node v24.10/web-globals/events.d.ts → node/web-globals/events.d.ts +9 -0
  73. node v24.10/web-globals/fetch.d.ts → node/web-globals/fetch.d.ts +4 -0
  74. node/web-globals/importmeta.d.ts +13 -0
  75. node/web-globals/messaging.d.ts +23 -0
  76. node/web-globals/performance.d.ts +45 -0
  77. node/web-globals/streams.d.ts +115 -0
  78. node/web-globals/timers.d.ts +44 -0
  79. node/web-globals/url.d.ts +24 -0
  80. node v24.10/worker_threads.d.ts → node/worker_threads.d.ts +176 -358
  81. node v24.10/zlib.d.ts → node/zlib.d.ts +8 -71
  82. node v24.10/cluster.d.ts +0 -578
  83. node v24.10/console.d.ts +0 -453
  84. node v24.10/events.d.ts +0 -976
  85. node v24.10/globals.typedarray.d.ts +0 -41
  86. node v24.10/path.d.ts +0 -200
  87. node v24.10/perf_hooks.d.ts +0 -982
  88. node v24.10/stream/promises.d.ts +0 -90
  89. node v24.10/stream/web.d.ts +0 -573
  90. node v24.10/url.d.ts +0 -1057
  91. node v24.10/web-globals/streams.d.ts +0 -22
  92. {node v24.10 → node}/LICENSE +0 -0
  93. {node v24.10 → node}/compatibility/iterators.d.ts +0 -0
  94. {node v24.10 → node}/ts5.6/compatibility/float16array.d.ts +0 -0
  95. {node v24.10 → node}/ts5.6/globals.typedarray.d.ts +0 -0
  96. {node v24.10 → node}/ts5.7/compatibility/float16array.d.ts +0 -0
  97. {node v24.10 → node}/web-globals/domexception.d.ts +0 -0
  98. {node v24.10 → node}/web-globals/navigator.d.ts +0 -0
  99. {node v24.10 → node}/web-globals/storage.d.ts +0 -0
@@ -1,7 +1,6 @@
1
1
  declare var global: typeof globalThis;
2
2
 
3
3
  declare var process: NodeJS.Process;
4
- declare var console: Console;
5
4
 
6
5
  interface ErrorConstructor {
7
6
  /**
@@ -105,31 +104,6 @@ declare namespace NodeJS {
105
104
  syscall?: string | undefined;
106
105
  }
107
106
 
108
- interface ReadableStream extends EventEmitter {
109
- readable: boolean;
110
- read(size?: number): string | Buffer;
111
- setEncoding(encoding: BufferEncoding): this;
112
- pause(): this;
113
- resume(): this;
114
- isPaused(): boolean;
115
- pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
116
- unpipe(destination?: WritableStream): this;
117
- unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
118
- wrap(oldStream: ReadableStream): this;
119
- [Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
120
- }
121
-
122
- interface WritableStream extends EventEmitter {
123
- writable: boolean;
124
- write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
125
- write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
126
- end(cb?: () => void): this;
127
- end(data: string | Uint8Array, cb?: () => void): this;
128
- end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
129
- }
130
-
131
- interface ReadWriteStream extends ReadableStream, WritableStream {}
132
-
133
107
  interface RefCounted {
134
108
  ref(): this;
135
109
  unref(): this;
@@ -167,4 +141,10 @@ declare namespace NodeJS {
167
141
  interface AsyncIterator<T, TReturn = undefined, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
168
142
  [Symbol.asyncIterator](): NodeJS.AsyncIterator<T, TReturn, TNext>;
169
143
  }
144
+
145
+ /** The [`BufferSource`](https://webidl.spec.whatwg.org/#BufferSource) type from the Web IDL specification. */
146
+ type BufferSource = NonSharedArrayBufferView | ArrayBuffer;
147
+
148
+ /** The [`AllowSharedBufferSource`](https://webidl.spec.whatwg.org/#AllowSharedBufferSource) type from the Web IDL specification. */
149
+ type AllowSharedBufferSource = ArrayBufferView | ArrayBufferLike;
170
150
  }
@@ -0,0 +1,101 @@
1
+ export {}; // Make this a module
2
+
3
+ declare global {
4
+ namespace NodeJS {
5
+ type TypedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> =
6
+ | Uint8Array<TArrayBuffer>
7
+ | Uint8ClampedArray<TArrayBuffer>
8
+ | Uint16Array<TArrayBuffer>
9
+ | Uint32Array<TArrayBuffer>
10
+ | Int8Array<TArrayBuffer>
11
+ | Int16Array<TArrayBuffer>
12
+ | Int32Array<TArrayBuffer>
13
+ | BigUint64Array<TArrayBuffer>
14
+ | BigInt64Array<TArrayBuffer>
15
+ | Float16Array<TArrayBuffer>
16
+ | Float32Array<TArrayBuffer>
17
+ | Float64Array<TArrayBuffer>;
18
+ type ArrayBufferView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> =
19
+ | TypedArray<TArrayBuffer>
20
+ | DataView<TArrayBuffer>;
21
+
22
+ // The following aliases are required to allow use of non-shared ArrayBufferViews in @types/node
23
+ // while maintaining compatibility with TS <=5.6.
24
+ // TODO: remove once @types/node no longer supports TS 5.6, and replace with native types.
25
+ /**
26
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
27
+ * TypeScript versions earlier than 5.7.
28
+ */
29
+ type NonSharedUint8Array = Uint8Array<ArrayBuffer>;
30
+ /**
31
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
32
+ * TypeScript versions earlier than 5.7.
33
+ */
34
+ type NonSharedUint8ClampedArray = Uint8ClampedArray<ArrayBuffer>;
35
+ /**
36
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
37
+ * TypeScript versions earlier than 5.7.
38
+ */
39
+ type NonSharedUint16Array = Uint16Array<ArrayBuffer>;
40
+ /**
41
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
42
+ * TypeScript versions earlier than 5.7.
43
+ */
44
+ type NonSharedUint32Array = Uint32Array<ArrayBuffer>;
45
+ /**
46
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
47
+ * TypeScript versions earlier than 5.7.
48
+ */
49
+ type NonSharedInt8Array = Int8Array<ArrayBuffer>;
50
+ /**
51
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
52
+ * TypeScript versions earlier than 5.7.
53
+ */
54
+ type NonSharedInt16Array = Int16Array<ArrayBuffer>;
55
+ /**
56
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
57
+ * TypeScript versions earlier than 5.7.
58
+ */
59
+ type NonSharedInt32Array = Int32Array<ArrayBuffer>;
60
+ /**
61
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
62
+ * TypeScript versions earlier than 5.7.
63
+ */
64
+ type NonSharedBigUint64Array = BigUint64Array<ArrayBuffer>;
65
+ /**
66
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
67
+ * TypeScript versions earlier than 5.7.
68
+ */
69
+ type NonSharedBigInt64Array = BigInt64Array<ArrayBuffer>;
70
+ /**
71
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
72
+ * TypeScript versions earlier than 5.7.
73
+ */
74
+ type NonSharedFloat16Array = Float16Array<ArrayBuffer>;
75
+ /**
76
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
77
+ * TypeScript versions earlier than 5.7.
78
+ */
79
+ type NonSharedFloat32Array = Float32Array<ArrayBuffer>;
80
+ /**
81
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
82
+ * TypeScript versions earlier than 5.7.
83
+ */
84
+ type NonSharedFloat64Array = Float64Array<ArrayBuffer>;
85
+ /**
86
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
87
+ * TypeScript versions earlier than 5.7.
88
+ */
89
+ type NonSharedDataView = DataView<ArrayBuffer>;
90
+ /**
91
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
92
+ * TypeScript versions earlier than 5.7.
93
+ */
94
+ type NonSharedTypedArray = TypedArray<ArrayBuffer>;
95
+ /**
96
+ * @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
97
+ * TypeScript versions earlier than 5.7.
98
+ */
99
+ type NonSharedArrayBufferView = ArrayBufferView<ArrayBuffer>;
100
+ }
101
+ }