@types/node 20.6.3 → 20.6.4

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 (104) hide show
  1. node/README.md +1 -1
  2. node/assert/strict.d.ts +4 -4
  3. node/assert.d.ts +48 -24
  4. node/async_hooks.d.ts +13 -6
  5. node/buffer.d.ts +32 -34
  6. node/child_process.d.ts +262 -122
  7. node/cluster.d.ts +107 -89
  8. node/console.d.ts +7 -7
  9. node/constants.d.ts +12 -11
  10. node/crypto.d.ts +746 -268
  11. node/dgram.d.ts +81 -45
  12. node/diagnostics_channel.d.ts +3 -3
  13. node/dns/promises.d.ts +28 -25
  14. node/dns.d.ts +203 -62
  15. node/dom-events.d.ts +67 -71
  16. node/domain.d.ts +4 -4
  17. node/events.d.ts +15 -7
  18. node/fs/promises.d.ts +102 -73
  19. node/fs.d.ts +513 -311
  20. node/globals.d.ts +18 -20
  21. node/http.d.ts +238 -186
  22. node/http2.d.ts +628 -376
  23. node/https.d.ts +221 -112
  24. node/module.d.ts +16 -9
  25. node/net.d.ts +112 -93
  26. node/os.d.ts +7 -7
  27. node/package.json +2 -2
  28. node/path.d.ts +13 -13
  29. node/perf_hooks.d.ts +19 -18
  30. node/process.d.ts +155 -125
  31. node/punycode.d.ts +3 -3
  32. node/querystring.d.ts +14 -4
  33. node/readline/promises.d.ts +12 -7
  34. node/readline.d.ts +69 -56
  35. node/repl.d.ts +67 -61
  36. node/stream/consumers.d.ts +5 -5
  37. node/stream/promises.d.ts +56 -15
  38. node/stream/web.d.ts +26 -20
  39. node/stream.d.ts +361 -228
  40. node/string_decoder.d.ts +3 -3
  41. node/test.d.ts +78 -93
  42. node/timers/promises.d.ts +4 -4
  43. node/timers.d.ts +23 -8
  44. node/tls.d.ts +151 -71
  45. node/trace_events.d.ts +3 -3
  46. node/ts4.8/assert/strict.d.ts +4 -4
  47. node/ts4.8/assert.d.ts +48 -24
  48. node/ts4.8/async_hooks.d.ts +13 -6
  49. node/ts4.8/buffer.d.ts +32 -34
  50. node/ts4.8/child_process.d.ts +262 -122
  51. node/ts4.8/cluster.d.ts +107 -89
  52. node/ts4.8/console.d.ts +7 -7
  53. node/ts4.8/constants.d.ts +12 -11
  54. node/ts4.8/crypto.d.ts +746 -268
  55. node/ts4.8/dgram.d.ts +81 -45
  56. node/ts4.8/diagnostics_channel.d.ts +3 -3
  57. node/ts4.8/dns/promises.d.ts +28 -25
  58. node/ts4.8/dns.d.ts +203 -62
  59. node/ts4.8/dom-events.d.ts +67 -71
  60. node/ts4.8/domain.d.ts +4 -4
  61. node/ts4.8/events.d.ts +15 -7
  62. node/ts4.8/fs/promises.d.ts +102 -73
  63. node/ts4.8/fs.d.ts +513 -311
  64. node/ts4.8/globals.d.ts +18 -20
  65. node/ts4.8/http.d.ts +238 -186
  66. node/ts4.8/http2.d.ts +628 -376
  67. node/ts4.8/https.d.ts +221 -112
  68. node/ts4.8/module.d.ts +16 -9
  69. node/ts4.8/net.d.ts +112 -93
  70. node/ts4.8/os.d.ts +7 -7
  71. node/ts4.8/path.d.ts +13 -13
  72. node/ts4.8/perf_hooks.d.ts +19 -18
  73. node/ts4.8/process.d.ts +155 -125
  74. node/ts4.8/punycode.d.ts +3 -3
  75. node/ts4.8/querystring.d.ts +14 -4
  76. node/ts4.8/readline/promises.d.ts +12 -7
  77. node/ts4.8/readline.d.ts +69 -56
  78. node/ts4.8/repl.d.ts +67 -61
  79. node/ts4.8/stream/consumers.d.ts +5 -5
  80. node/ts4.8/stream/promises.d.ts +56 -15
  81. node/ts4.8/stream/web.d.ts +26 -20
  82. node/ts4.8/stream.d.ts +326 -219
  83. node/ts4.8/string_decoder.d.ts +3 -3
  84. node/ts4.8/test.d.ts +78 -93
  85. node/ts4.8/timers/promises.d.ts +4 -4
  86. node/ts4.8/timers.d.ts +23 -8
  87. node/ts4.8/tls.d.ts +151 -71
  88. node/ts4.8/trace_events.d.ts +3 -3
  89. node/ts4.8/tty.d.ts +10 -10
  90. node/ts4.8/url.d.ts +26 -14
  91. node/ts4.8/util.d.ts +178 -116
  92. node/ts4.8/v8.d.ts +4 -4
  93. node/ts4.8/vm.d.ts +52 -46
  94. node/ts4.8/wasi.d.ts +3 -3
  95. node/ts4.8/worker_threads.d.ts +81 -84
  96. node/ts4.8/zlib.d.ts +9 -9
  97. node/tty.d.ts +10 -10
  98. node/url.d.ts +26 -14
  99. node/util.d.ts +178 -116
  100. node/v8.d.ts +4 -4
  101. node/vm.d.ts +52 -46
  102. node/wasi.d.ts +3 -3
  103. node/worker_threads.d.ts +81 -84
  104. node/zlib.d.ts +9 -9
node/ts4.8/buffer.d.ts CHANGED
@@ -43,9 +43,9 @@
43
43
  * ```
44
44
  * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/buffer.js)
45
45
  */
46
- declare module 'buffer' {
47
- import { BinaryLike } from 'node:crypto';
48
- import { ReadableStream as WebReadableStream } from 'node:stream/web';
46
+ declare module "buffer" {
47
+ import { BinaryLike } from "node:crypto";
48
+ import { ReadableStream as WebReadableStream } from "node:stream/web";
49
49
  /**
50
50
  * This function returns `true` if `input` contains only valid UTF-8-encoded data,
51
51
  * including the case in which `input` is empty.
@@ -71,7 +71,7 @@ declare module 'buffer' {
71
71
  MAX_LENGTH: number;
72
72
  MAX_STRING_LENGTH: number;
73
73
  };
74
- export type TranscodeEncoding = 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'latin1' | 'binary';
74
+ export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
75
75
  /**
76
76
  * Re-encodes the given `Buffer` or `Uint8Array` instance from one character
77
77
  * encoding to another. Returns a new `Buffer` instance.
@@ -102,7 +102,7 @@ declare module 'buffer' {
102
102
  export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
103
103
  export const SlowBuffer: {
104
104
  /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
105
- new (size: number): Buffer;
105
+ new(size: number): Buffer;
106
106
  prototype: Buffer;
107
107
  };
108
108
  /**
@@ -186,7 +186,7 @@ declare module 'buffer' {
186
186
  * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be
187
187
  * converted to the platform native line-ending as specified by `require('node:os').EOL`.
188
188
  */
189
- endings?: 'native' | 'transparent';
189
+ endings?: "native" | "transparent";
190
190
  /** The File content-type. */
191
191
  type?: string;
192
192
  /** The last modified date of the file. `Default`: Date.now(). */
@@ -211,7 +211,7 @@ declare module 'buffer' {
211
211
  }
212
212
  export import atob = globalThis.atob;
213
213
  export import btoa = globalThis.btoa;
214
- import { Blob as NodeBlob } from 'buffer';
214
+ import { Blob as NodeBlob } from "buffer";
215
215
  // This conditional type will be the existing global Blob in a browser, or
216
216
  // the copy below in a Node environment.
217
217
  type __Blob = typeof globalThis extends { onmessage: any; Blob: infer T } ? T : NodeBlob;
@@ -221,22 +221,22 @@ declare module 'buffer' {
221
221
  }
222
222
  // Buffer class
223
223
  type BufferEncoding =
224
- | 'ascii'
225
- | 'utf8'
226
- | 'utf-8'
227
- | 'utf16le'
228
- | 'ucs2'
229
- | 'ucs-2'
230
- | 'base64'
231
- | 'base64url'
232
- | 'latin1'
233
- | 'binary'
234
- | 'hex';
224
+ | "ascii"
225
+ | "utf8"
226
+ | "utf-8"
227
+ | "utf16le"
228
+ | "ucs2"
229
+ | "ucs-2"
230
+ | "base64"
231
+ | "base64url"
232
+ | "latin1"
233
+ | "binary"
234
+ | "hex";
235
235
  type WithImplicitCoercion<T> =
236
236
  | T
237
237
  | {
238
- valueOf(): T;
239
- };
238
+ valueOf(): T;
239
+ };
240
240
  /**
241
241
  * Raw data is stored in instances of the Buffer class.
242
242
  * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
@@ -250,44 +250,43 @@ declare module 'buffer' {
250
250
  * @param encoding encoding to use, optional. Default is 'utf8'
251
251
  * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
252
252
  */
253
- new (str: string, encoding?: BufferEncoding): Buffer;
253
+ new(str: string, encoding?: BufferEncoding): Buffer;
254
254
  /**
255
255
  * Allocates a new buffer of {size} octets.
256
256
  *
257
257
  * @param size count of octets to allocate.
258
258
  * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
259
259
  */
260
- new (size: number): Buffer;
260
+ new(size: number): Buffer;
261
261
  /**
262
262
  * Allocates a new buffer containing the given {array} of octets.
263
263
  *
264
264
  * @param array The octets to store.
265
265
  * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
266
266
  */
267
- new (array: Uint8Array): Buffer;
267
+ new(array: Uint8Array): Buffer;
268
268
  /**
269
269
  * Produces a Buffer backed by the same allocated memory as
270
270
  * the given {ArrayBuffer}/{SharedArrayBuffer}.
271
271
  *
272
- *
273
272
  * @param arrayBuffer The ArrayBuffer with which to share memory.
274
273
  * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
275
274
  */
276
- new (arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
275
+ new(arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
277
276
  /**
278
277
  * Allocates a new buffer containing the given {array} of octets.
279
278
  *
280
279
  * @param array The octets to store.
281
280
  * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
282
281
  */
283
- new (array: ReadonlyArray<any>): Buffer;
282
+ new(array: ReadonlyArray<any>): Buffer;
284
283
  /**
285
284
  * Copies the passed {buffer} data onto a new {Buffer} instance.
286
285
  *
287
286
  * @param buffer The buffer to copy.
288
287
  * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
289
288
  */
290
- new (buffer: Buffer): Buffer;
289
+ new(buffer: Buffer): Buffer;
291
290
  /**
292
291
  * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
293
292
  * Array entries outside that range will be truncated to fit into it.
@@ -329,8 +328,8 @@ declare module 'buffer' {
329
328
  str:
330
329
  | WithImplicitCoercion<string>
331
330
  | {
332
- [Symbol.toPrimitive](hint: 'string'): string;
333
- },
331
+ [Symbol.toPrimitive](hint: "string"): string;
332
+ },
334
333
  encoding?: BufferEncoding,
335
334
  ): Buffer;
336
335
  /**
@@ -719,7 +718,7 @@ declare module 'buffer' {
719
718
  * @since v0.9.2
720
719
  */
721
720
  toJSON(): {
722
- type: 'Buffer';
721
+ type: "Buffer";
723
722
  data: number[];
724
723
  };
725
724
  /**
@@ -2344,11 +2343,10 @@ declare module 'buffer' {
2344
2343
  var Blob: typeof globalThis extends {
2345
2344
  onmessage: any;
2346
2345
  Blob: infer T;
2347
- }
2348
- ? T
2346
+ } ? T
2349
2347
  : typeof NodeBlob;
2350
2348
  }
2351
2349
  }
2352
- declare module 'node:buffer' {
2353
- export * from 'buffer';
2350
+ declare module "node:buffer" {
2351
+ export * from "buffer";
2354
2352
  }