@types/node 22.15.30 → 24.0.0

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 (60) hide show
  1. node/README.md +1 -1
  2. node/assert.d.ts +5 -5
  3. node/async_hooks.d.ts +26 -6
  4. node/buffer.d.ts +1 -2
  5. node/child_process.d.ts +2 -2
  6. node/cluster.d.ts +15 -15
  7. node/console.d.ts +17 -17
  8. node/crypto.d.ts +35 -28
  9. node/dgram.d.ts +1 -1
  10. node/diagnostics_channel.d.ts +1 -1
  11. node/dns.d.ts +16 -16
  12. node/domain.d.ts +1 -1
  13. node/events.d.ts +1 -2
  14. node/fs/promises.d.ts +16 -9
  15. node/fs.d.ts +28 -19
  16. node/globals.d.ts +7 -6
  17. node/globals.typedarray.d.ts +1 -0
  18. node/http.d.ts +2 -2
  19. node/http2.d.ts +6 -3
  20. node/https.d.ts +1 -1
  21. node/index.d.ts +7 -5
  22. node/inspector.d.ts +3 -7
  23. node/module.d.ts +63 -29
  24. node/net.d.ts +2 -5
  25. node/os.d.ts +8 -7
  26. node/package.json +13 -3
  27. node/path.d.ts +1 -1
  28. node/perf_hooks.d.ts +8 -8
  29. node/process.d.ts +21 -11
  30. node/punycode.d.ts +1 -1
  31. node/querystring.d.ts +1 -1
  32. node/readline/promises.d.ts +0 -1
  33. node/readline.d.ts +13 -13
  34. node/repl.d.ts +14 -16
  35. node/sea.d.ts +1 -1
  36. node/sqlite.d.ts +182 -2
  37. node/stream.d.ts +8 -19
  38. node/string_decoder.d.ts +1 -1
  39. node/test.d.ts +53 -15
  40. node/timers/promises.d.ts +1 -1
  41. node/timers.d.ts +1 -1
  42. node/tls.d.ts +2 -48
  43. node/trace_events.d.ts +6 -6
  44. node/{compatibility → ts5.1/compatibility}/disposable.d.ts +0 -4
  45. node/ts5.1/index.d.ts +98 -0
  46. node/ts5.6/compatibility/float16array.d.ts +71 -0
  47. node/ts5.6/globals.typedarray.d.ts +1 -0
  48. node/ts5.6/index.d.ts +9 -5
  49. node/ts5.7/compatibility/float16array.d.ts +72 -0
  50. node/ts5.7/index.d.ts +96 -0
  51. node/tty.d.ts +1 -1
  52. node/url.d.ts +52 -19
  53. node/util.d.ts +16 -295
  54. node/v8.d.ts +29 -32
  55. node/vm.d.ts +17 -10
  56. node/wasi.d.ts +1 -1
  57. node/worker_threads.d.ts +34 -18
  58. node/zlib.d.ts +5 -7
  59. node/compatibility/index.d.ts +0 -9
  60. node/compatibility/indexable.d.ts +0 -23
node/zlib.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  * ```
10
10
  *
11
11
  * Compression and decompression are built around the Node.js
12
- * [Streams API](https://nodejs.org/docs/latest-v22.x/api/stream.html).
12
+ * [Streams API](https://nodejs.org/docs/latest-v24.x/api/stream.html).
13
13
  *
14
14
  * Compressing or decompressing a stream (such as a file) can be accomplished by
15
15
  * piping the source stream through a `zlib` `Transform` stream into a destination
@@ -89,7 +89,7 @@
89
89
  * });
90
90
  * ```
91
91
  * @since v0.5.8
92
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/zlib.js)
92
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/zlib.js)
93
93
  */
94
94
  declare module "zlib" {
95
95
  import * as stream from "node:stream";
@@ -143,7 +143,7 @@ declare module "zlib" {
143
143
  }
144
144
  | undefined;
145
145
  /**
146
- * Limits output size when using [convenience methods](https://nodejs.org/docs/latest-v22.x/api/zlib.html#convenience-methods).
146
+ * Limits output size when using [convenience methods](https://nodejs.org/docs/latest-v24.x/api/zlib.html#convenience-methods).
147
147
  * @default buffer.kMaxLength
148
148
  */
149
149
  maxOutputLength?: number | undefined;
@@ -163,19 +163,17 @@ declare module "zlib" {
163
163
  chunkSize?: number | undefined;
164
164
  /**
165
165
  * Key-value object containing indexed
166
- * [Zstd parameters](https://nodejs.org/docs/latest-v22.x/api/zlib.html#zstd-constants).
166
+ * [Zstd parameters](https://nodejs.org/docs/latest-v24.x/api/zlib.html#zstd-constants).
167
167
  */
168
168
  params?: { [key: number]: number | boolean } | undefined;
169
169
  /**
170
170
  * Limits output size when using
171
- * [convenience methods](https://nodejs.org/docs/latest-v22.x/api/zlib.html#convenience-methods).
171
+ * [convenience methods](https://nodejs.org/docs/latest-v24.x/api/zlib.html#convenience-methods).
172
172
  * @default buffer.kMaxLength
173
173
  */
174
174
  maxOutputLength?: number | undefined;
175
175
  }
176
176
  interface Zlib {
177
- /** @deprecated Use bytesWritten instead. */
178
- readonly bytesRead: number;
179
177
  readonly bytesWritten: number;
180
178
  shell?: boolean | string | undefined;
181
179
  close(callback?: () => void): void;
@@ -1,9 +0,0 @@
1
- // Declaration files in this directory contain types relating to TypeScript library features
2
- // that are not included in all TypeScript versions supported by DefinitelyTyped, but
3
- // which can be made backwards-compatible without needing `typesVersions`.
4
- // If adding declarations to this directory, please specify which versions of TypeScript require them,
5
- // so that they can be removed when no longer needed.
6
-
7
- /// <reference path="disposable.d.ts" />
8
- /// <reference path="indexable.d.ts" />
9
- /// <reference path="iterators.d.ts" />
@@ -1,23 +0,0 @@
1
- // Polyfill for ES2022's .at() method on string/array prototypes, added to TypeScript in 4.6.
2
- // TODO: these methods are not used within @types/node, and should be removed at the next
3
- // major @types/node version; users should include the es2022 TypeScript libraries
4
- // if they need these features.
5
-
6
- interface RelativeIndexable<T> {
7
- at(index: number): T | undefined;
8
- }
9
-
10
- interface String extends RelativeIndexable<string> {}
11
- interface Array<T> extends RelativeIndexable<T> {}
12
- interface ReadonlyArray<T> extends RelativeIndexable<T> {}
13
- interface Int8Array extends RelativeIndexable<number> {}
14
- interface Uint8Array extends RelativeIndexable<number> {}
15
- interface Uint8ClampedArray extends RelativeIndexable<number> {}
16
- interface Int16Array extends RelativeIndexable<number> {}
17
- interface Uint16Array extends RelativeIndexable<number> {}
18
- interface Int32Array extends RelativeIndexable<number> {}
19
- interface Uint32Array extends RelativeIndexable<number> {}
20
- interface Float32Array extends RelativeIndexable<number> {}
21
- interface Float64Array extends RelativeIndexable<number> {}
22
- interface BigInt64Array extends RelativeIndexable<bigint> {}
23
- interface BigUint64Array extends RelativeIndexable<bigint> {}