@types/node 20.6.2 → 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 (106) 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/inspector.d.ts +3 -3
  25. node/module.d.ts +16 -9
  26. node/net.d.ts +112 -93
  27. node/os.d.ts +7 -7
  28. node/package.json +2 -2
  29. node/path.d.ts +13 -13
  30. node/perf_hooks.d.ts +19 -18
  31. node/process.d.ts +155 -125
  32. node/punycode.d.ts +3 -3
  33. node/querystring.d.ts +14 -4
  34. node/readline/promises.d.ts +12 -7
  35. node/readline.d.ts +69 -56
  36. node/repl.d.ts +67 -61
  37. node/stream/consumers.d.ts +5 -5
  38. node/stream/promises.d.ts +56 -15
  39. node/stream/web.d.ts +26 -20
  40. node/stream.d.ts +361 -228
  41. node/string_decoder.d.ts +3 -3
  42. node/test.d.ts +78 -93
  43. node/timers/promises.d.ts +4 -4
  44. node/timers.d.ts +23 -8
  45. node/tls.d.ts +151 -71
  46. node/trace_events.d.ts +3 -3
  47. node/ts4.8/assert/strict.d.ts +4 -4
  48. node/ts4.8/assert.d.ts +48 -24
  49. node/ts4.8/async_hooks.d.ts +13 -6
  50. node/ts4.8/buffer.d.ts +32 -34
  51. node/ts4.8/child_process.d.ts +262 -122
  52. node/ts4.8/cluster.d.ts +107 -89
  53. node/ts4.8/console.d.ts +7 -7
  54. node/ts4.8/constants.d.ts +12 -11
  55. node/ts4.8/crypto.d.ts +746 -268
  56. node/ts4.8/dgram.d.ts +81 -45
  57. node/ts4.8/diagnostics_channel.d.ts +3 -3
  58. node/ts4.8/dns/promises.d.ts +28 -25
  59. node/ts4.8/dns.d.ts +203 -62
  60. node/ts4.8/dom-events.d.ts +67 -71
  61. node/ts4.8/domain.d.ts +4 -4
  62. node/ts4.8/events.d.ts +15 -7
  63. node/ts4.8/fs/promises.d.ts +102 -73
  64. node/ts4.8/fs.d.ts +513 -311
  65. node/ts4.8/globals.d.ts +18 -20
  66. node/ts4.8/http.d.ts +238 -186
  67. node/ts4.8/http2.d.ts +628 -376
  68. node/ts4.8/https.d.ts +221 -112
  69. node/ts4.8/inspector.d.ts +3 -3
  70. node/ts4.8/module.d.ts +16 -9
  71. node/ts4.8/net.d.ts +112 -93
  72. node/ts4.8/os.d.ts +7 -7
  73. node/ts4.8/path.d.ts +13 -13
  74. node/ts4.8/perf_hooks.d.ts +19 -18
  75. node/ts4.8/process.d.ts +155 -125
  76. node/ts4.8/punycode.d.ts +3 -3
  77. node/ts4.8/querystring.d.ts +14 -4
  78. node/ts4.8/readline/promises.d.ts +12 -7
  79. node/ts4.8/readline.d.ts +69 -56
  80. node/ts4.8/repl.d.ts +67 -61
  81. node/ts4.8/stream/consumers.d.ts +5 -5
  82. node/ts4.8/stream/promises.d.ts +56 -15
  83. node/ts4.8/stream/web.d.ts +26 -20
  84. node/ts4.8/stream.d.ts +326 -219
  85. node/ts4.8/string_decoder.d.ts +3 -3
  86. node/ts4.8/test.d.ts +78 -93
  87. node/ts4.8/timers/promises.d.ts +4 -4
  88. node/ts4.8/timers.d.ts +23 -8
  89. node/ts4.8/tls.d.ts +151 -71
  90. node/ts4.8/trace_events.d.ts +3 -3
  91. node/ts4.8/tty.d.ts +10 -10
  92. node/ts4.8/url.d.ts +26 -14
  93. node/ts4.8/util.d.ts +178 -116
  94. node/ts4.8/v8.d.ts +4 -4
  95. node/ts4.8/vm.d.ts +52 -46
  96. node/ts4.8/wasi.d.ts +3 -3
  97. node/ts4.8/worker_threads.d.ts +81 -84
  98. node/ts4.8/zlib.d.ts +9 -9
  99. node/tty.d.ts +10 -10
  100. node/url.d.ts +26 -14
  101. node/util.d.ts +178 -116
  102. node/v8.d.ts +4 -4
  103. node/vm.d.ts +52 -46
  104. node/wasi.d.ts +3 -3
  105. node/worker_threads.d.ts +81 -84
  106. node/zlib.d.ts +9 -9
node/globals.d.ts CHANGED
@@ -20,9 +20,9 @@ interface ErrorConstructor {
20
20
  ------------------------------------------------*/
21
21
 
22
22
  // For backwards compability
23
- interface NodeRequire extends NodeJS.Require { }
24
- interface RequireResolve extends NodeJS.RequireResolve { }
25
- interface NodeModule extends NodeJS.Module { }
23
+ interface NodeRequire extends NodeJS.Require {}
24
+ interface RequireResolve extends NodeJS.RequireResolve {}
25
+ interface NodeModule extends NodeJS.Module {}
26
26
 
27
27
  declare var process: NodeJS.Process;
28
28
  declare var console: Console;
@@ -41,7 +41,7 @@ declare var exports: any;
41
41
  */
42
42
  declare var gc: undefined | (() => void);
43
43
 
44
- //#region borrowed
44
+ // #region borrowed
45
45
  // from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
46
46
  /** A controller object that allows you to abort one or more DOM requests as and when desired. */
47
47
  interface AbortController {
@@ -67,24 +67,22 @@ interface AbortSignal extends EventTarget {
67
67
  throwIfAborted(): void;
68
68
  }
69
69
 
70
- declare var AbortController: typeof globalThis extends {onmessage: any; AbortController: infer T}
71
- ? T
70
+ declare var AbortController: typeof globalThis extends { onmessage: any; AbortController: infer T } ? T
72
71
  : {
73
72
  prototype: AbortController;
74
73
  new(): AbortController;
75
74
  };
76
75
 
77
- declare var AbortSignal: typeof globalThis extends {onmessage: any; AbortSignal: infer T}
78
- ? T
76
+ declare var AbortSignal: typeof globalThis extends { onmessage: any; AbortSignal: infer T } ? T
79
77
  : {
80
78
  prototype: AbortSignal;
81
79
  new(): AbortSignal;
82
80
  abort(reason?: any): AbortSignal;
83
81
  timeout(milliseconds: number): AbortSignal;
84
82
  };
85
- //#endregion borrowed
83
+ // #endregion borrowed
86
84
 
87
- //#region Disposable
85
+ // #region Disposable
88
86
  interface SymbolConstructor {
89
87
  /**
90
88
  * A method that is used to release resources held by an object. Called by the semantics of the `using` statement.
@@ -104,9 +102,9 @@ interface Disposable {
104
102
  interface AsyncDisposable {
105
103
  [Symbol.asyncDispose](): PromiseLike<void>;
106
104
  }
107
- //#endregion Disposable
105
+ // #endregion Disposable
108
106
 
109
- //#region ArrayLike.at()
107
+ // #region ArrayLike.at()
110
108
  interface RelativeIndexable<T> {
111
109
  /**
112
110
  * Takes an integer value and returns the item at that index,
@@ -129,7 +127,7 @@ interface Float32Array extends RelativeIndexable<number> {}
129
127
  interface Float64Array extends RelativeIndexable<number> {}
130
128
  interface BigInt64Array extends RelativeIndexable<bigint> {}
131
129
  interface BigUint64Array extends RelativeIndexable<bigint> {}
132
- //#endregion ArrayLike.at() end
130
+ // #endregion ArrayLike.at() end
133
131
 
134
132
  /**
135
133
  * @since v17.0.0
@@ -138,7 +136,7 @@ interface BigUint64Array extends RelativeIndexable<bigint> {}
138
136
  */
139
137
  declare function structuredClone<T>(
140
138
  value: T,
141
- transfer?: { transfer: ReadonlyArray<import('worker_threads').TransferListItem> },
139
+ transfer?: { transfer: ReadonlyArray<import("worker_threads").TransferListItem> },
142
140
  ): T;
143
141
 
144
142
  /*----------------------------------------------*
@@ -235,7 +233,7 @@ declare namespace NodeJS {
235
233
  pause(): this;
236
234
  resume(): this;
237
235
  isPaused(): boolean;
238
- pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined; }): T;
236
+ pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
239
237
  unpipe(destination?: WritableStream): this;
240
238
  unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
241
239
  wrap(oldStream: ReadableStream): this;
@@ -251,7 +249,7 @@ declare namespace NodeJS {
251
249
  end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
252
250
  }
253
251
 
254
- interface ReadWriteStream extends ReadableStream, WritableStream { }
252
+ interface ReadWriteStream extends ReadableStream, WritableStream {}
255
253
 
256
254
  interface RefCounted {
257
255
  ref(): this;
@@ -284,14 +282,14 @@ declare namespace NodeJS {
284
282
  }
285
283
 
286
284
  interface RequireResolve {
287
- (id: string, options?: { paths?: string[] | undefined; }): string;
285
+ (id: string, options?: { paths?: string[] | undefined }): string;
288
286
  paths(request: string): string[] | null;
289
287
  }
290
288
 
291
289
  interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
292
- '.js': (m: Module, filename: string) => any;
293
- '.json': (m: Module, filename: string) => any;
294
- '.node': (m: Module, filename: string) => any;
290
+ ".js": (m: Module, filename: string) => any;
291
+ ".json": (m: Module, filename: string) => any;
292
+ ".node": (m: Module, filename: string) => any;
295
293
  }
296
294
  interface Module {
297
295
  /**