@types/node 16.18.53 → 16.18.55

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 (100) hide show
  1. node v16.18/README.md +1 -1
  2. node v16.18/assert/strict.d.ts +4 -4
  3. node v16.18/assert.d.ts +48 -24
  4. node v16.18/async_hooks.d.ts +10 -7
  5. node v16.18/buffer.d.ts +47 -24
  6. node v16.18/child_process.d.ts +262 -122
  7. node v16.18/cluster.d.ts +107 -89
  8. node v16.18/console.d.ts +7 -7
  9. node v16.18/constants.d.ts +12 -11
  10. node v16.18/crypto.d.ts +738 -267
  11. node v16.18/dgram.d.ts +81 -45
  12. node v16.18/diagnostics_channel.d.ts +3 -3
  13. node v16.18/dns/promises.d.ts +28 -25
  14. node v16.18/dns.d.ts +202 -61
  15. node v16.18/domain.d.ts +4 -4
  16. node v16.18/events.d.ts +15 -7
  17. node v16.18/fs/promises.d.ts +93 -64
  18. node v16.18/fs.d.ts +485 -290
  19. node v16.18/globals.d.ts +13 -13
  20. node v16.18/http.d.ts +237 -157
  21. node v16.18/http2.d.ts +628 -376
  22. node v16.18/https.d.ts +107 -105
  23. node v16.18/module.d.ts +11 -8
  24. node v16.18/net.d.ts +106 -87
  25. node v16.18/os.d.ts +7 -7
  26. node v16.18/package.json +2 -2
  27. node v16.18/path.d.ts +13 -13
  28. node v16.18/perf_hooks.d.ts +17 -15
  29. node v16.18/process.d.ts +144 -124
  30. node v16.18/punycode.d.ts +3 -3
  31. node v16.18/querystring.d.ts +14 -4
  32. node v16.18/readline.d.ts +64 -54
  33. node v16.18/repl.d.ts +67 -61
  34. node v16.18/stream/consumers.d.ts +4 -4
  35. node v16.18/stream/promises.d.ts +56 -15
  36. node v16.18/stream/web.d.ts +19 -19
  37. node v16.18/stream.d.ts +314 -216
  38. node v16.18/string_decoder.d.ts +3 -3
  39. node v16.18/test.d.ts +2 -2
  40. node v16.18/timers/promises.d.ts +4 -4
  41. node v16.18/timers.d.ts +23 -8
  42. node v16.18/tls.d.ts +150 -71
  43. node v16.18/trace_events.d.ts +3 -3
  44. node v16.18/ts4.8/assert/strict.d.ts +4 -4
  45. node v16.18/ts4.8/assert.d.ts +48 -24
  46. node v16.18/ts4.8/async_hooks.d.ts +10 -7
  47. node v16.18/ts4.8/buffer.d.ts +47 -24
  48. node v16.18/ts4.8/child_process.d.ts +262 -122
  49. node v16.18/ts4.8/cluster.d.ts +107 -89
  50. node v16.18/ts4.8/console.d.ts +7 -7
  51. node v16.18/ts4.8/constants.d.ts +12 -11
  52. node v16.18/ts4.8/crypto.d.ts +738 -267
  53. node v16.18/ts4.8/dgram.d.ts +81 -45
  54. node v16.18/ts4.8/diagnostics_channel.d.ts +3 -3
  55. node v16.18/ts4.8/dns/promises.d.ts +28 -25
  56. node v16.18/ts4.8/dns.d.ts +202 -61
  57. node v16.18/ts4.8/domain.d.ts +4 -4
  58. node v16.18/ts4.8/events.d.ts +15 -7
  59. node v16.18/ts4.8/fs/promises.d.ts +93 -64
  60. node v16.18/ts4.8/fs.d.ts +485 -290
  61. node v16.18/ts4.8/globals.d.ts +13 -13
  62. node v16.18/ts4.8/http.d.ts +236 -156
  63. node v16.18/ts4.8/http2.d.ts +628 -376
  64. node v16.18/ts4.8/https.d.ts +107 -105
  65. node v16.18/ts4.8/module.d.ts +11 -8
  66. node v16.18/ts4.8/net.d.ts +106 -87
  67. node v16.18/ts4.8/os.d.ts +7 -7
  68. node v16.18/ts4.8/path.d.ts +13 -13
  69. node v16.18/ts4.8/perf_hooks.d.ts +17 -15
  70. node v16.18/ts4.8/process.d.ts +144 -124
  71. node v16.18/ts4.8/punycode.d.ts +3 -3
  72. node v16.18/ts4.8/querystring.d.ts +14 -4
  73. node v16.18/ts4.8/readline.d.ts +64 -54
  74. node v16.18/ts4.8/repl.d.ts +67 -61
  75. node v16.18/ts4.8/stream/consumers.d.ts +4 -4
  76. node v16.18/ts4.8/stream/promises.d.ts +56 -15
  77. node v16.18/ts4.8/stream/web.d.ts +19 -19
  78. node v16.18/ts4.8/stream.d.ts +309 -214
  79. node v16.18/ts4.8/string_decoder.d.ts +3 -3
  80. node v16.18/ts4.8/test.d.ts +2 -2
  81. node v16.18/ts4.8/timers/promises.d.ts +4 -4
  82. node v16.18/ts4.8/timers.d.ts +23 -8
  83. node v16.18/ts4.8/tls.d.ts +150 -71
  84. node v16.18/ts4.8/trace_events.d.ts +3 -3
  85. node v16.18/ts4.8/tty.d.ts +10 -10
  86. node v16.18/ts4.8/url.d.ts +26 -14
  87. node v16.18/ts4.8/util.d.ts +122 -51
  88. node v16.18/ts4.8/v8.d.ts +4 -4
  89. node v16.18/ts4.8/vm.d.ts +18 -18
  90. node v16.18/ts4.8/wasi.d.ts +3 -3
  91. node v16.18/ts4.8/worker_threads.d.ts +77 -77
  92. node v16.18/ts4.8/zlib.d.ts +9 -9
  93. node v16.18/tty.d.ts +10 -10
  94. node v16.18/url.d.ts +26 -14
  95. node v16.18/util.d.ts +122 -51
  96. node v16.18/v8.d.ts +4 -4
  97. node v16.18/vm.d.ts +18 -18
  98. node v16.18/wasi.d.ts +3 -3
  99. node v16.18/worker_threads.d.ts +77 -77
  100. node v16.18/zlib.d.ts +9 -9
@@ -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 {
@@ -76,9 +76,9 @@ declare var AbortSignal: {
76
76
  abort(reason?: any): AbortSignal;
77
77
  timeout(milliseconds: number): AbortSignal;
78
78
  };
79
- //#endregion borrowed
79
+ // #endregion borrowed
80
80
 
81
- //#region ArrayLike.at()
81
+ // #region ArrayLike.at()
82
82
  interface RelativeIndexable<T> {
83
83
  /**
84
84
  * Takes an integer value and returns the item at that index,
@@ -101,7 +101,7 @@ interface Float32Array extends RelativeIndexable<number> {}
101
101
  interface Float64Array extends RelativeIndexable<number> {}
102
102
  interface BigInt64Array extends RelativeIndexable<bigint> {}
103
103
  interface BigUint64Array extends RelativeIndexable<bigint> {}
104
- //#endregion ArrayLike.at() end
104
+ // #endregion ArrayLike.at() end
105
105
 
106
106
  /*----------------------------------------------*
107
107
  * *
@@ -197,7 +197,7 @@ declare namespace NodeJS {
197
197
  pause(): this;
198
198
  resume(): this;
199
199
  isPaused(): boolean;
200
- pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined; }): T;
200
+ pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
201
201
  unpipe(destination?: WritableStream): this;
202
202
  unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
203
203
  wrap(oldStream: ReadableStream): this;
@@ -213,7 +213,7 @@ declare namespace NodeJS {
213
213
  end(str: string, encoding?: BufferEncoding, cb?: () => void): void;
214
214
  }
215
215
 
216
- interface ReadWriteStream extends ReadableStream, WritableStream { }
216
+ interface ReadWriteStream extends ReadableStream, WritableStream {}
217
217
 
218
218
  interface RefCounted {
219
219
  ref(): this;
@@ -246,14 +246,14 @@ declare namespace NodeJS {
246
246
  }
247
247
 
248
248
  interface RequireResolve {
249
- (id: string, options?: { paths?: string[] | undefined; }): string;
249
+ (id: string, options?: { paths?: string[] | undefined }): string;
250
250
  paths(request: string): string[] | null;
251
251
  }
252
252
 
253
253
  interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
254
- '.js': (m: Module, filename: string) => any;
255
- '.json': (m: Module, filename: string) => any;
256
- '.node': (m: Module, filename: string) => any;
254
+ ".js": (m: Module, filename: string) => any;
255
+ ".json": (m: Module, filename: string) => any;
256
+ ".node": (m: Module, filename: string) => any;
257
257
  }
258
258
  interface Module {
259
259
  /**
node v16.18/http.d.ts CHANGED
@@ -39,16 +39,84 @@
39
39
  * ```
40
40
  * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/http.js)
41
41
  */
42
- declare module 'http' {
43
- import * as stream from 'node:stream';
44
- import { URL } from 'node:url';
45
- import { EventEmitter } from 'node:events';
46
- import { TcpSocketConnectOpts, Socket, Server as NetServer, LookupFunction } from 'node:net';
42
+ declare module "http" {
43
+ import * as stream from "node:stream";
44
+ import { URL } from "node:url";
45
+ import { EventEmitter } from "node:events";
46
+ import { LookupFunction, Server as NetServer, Socket, TcpSocketConnectOpts } from "node:net";
47
47
  // incoming headers will never contain number
48
48
  interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
49
49
  accept?: string | undefined;
50
- 'accept-language'?: string | undefined;
51
- 'accept-patch'?: string | undefined;
50
+ "accept-language"?: string | undefined;
51
+ "accept-patch"?: string | undefined;
52
+ "accept-ranges"?: string | undefined;
53
+ "access-control-allow-credentials"?: string | undefined;
54
+ "access-control-allow-headers"?: string | undefined;
55
+ "access-control-allow-methods"?: string | undefined;
56
+ "access-control-allow-origin"?: string | undefined;
57
+ "access-control-expose-headers"?: string | undefined;
58
+ "access-control-max-age"?: string | undefined;
59
+ "access-control-request-headers"?: string | undefined;
60
+ "access-control-request-method"?: string | undefined;
61
+ age?: string | undefined;
62
+ allow?: string | undefined;
63
+ "alt-svc"?: string | undefined;
64
+ authorization?: string | undefined;
65
+ "cache-control"?: string | undefined;
66
+ connection?: string | undefined;
67
+ "content-disposition"?: string | undefined;
68
+ "content-encoding"?: string | undefined;
69
+ "content-language"?: string | undefined;
70
+ "content-length"?: string | undefined;
71
+ "content-location"?: string | undefined;
72
+ "content-range"?: string | undefined;
73
+ "content-type"?: string | undefined;
74
+ cookie?: string | undefined;
75
+ date?: string | undefined;
76
+ etag?: string | undefined;
77
+ expect?: string | undefined;
78
+ expires?: string | undefined;
79
+ forwarded?: string | undefined;
80
+ from?: string | undefined;
81
+ host?: string | undefined;
82
+ "if-match"?: string | undefined;
83
+ "if-modified-since"?: string | undefined;
84
+ "if-none-match"?: string | undefined;
85
+ "if-unmodified-since"?: string | undefined;
86
+ "last-modified"?: string | undefined;
87
+ location?: string | undefined;
88
+ origin?: string | undefined;
89
+ pragma?: string | undefined;
90
+ "proxy-authenticate"?: string | undefined;
91
+ "proxy-authorization"?: string | undefined;
92
+ "public-key-pins"?: string | undefined;
93
+ range?: string | undefined;
94
+ referer?: string | undefined;
95
+ "retry-after"?: string | undefined;
96
+ "sec-websocket-accept"?: string | undefined;
97
+ "sec-websocket-extensions"?: string | undefined;
98
+ "sec-websocket-key"?: string | undefined;
99
+ "sec-websocket-protocol"?: string | undefined;
100
+ "sec-websocket-version"?: string | undefined;
101
+ "set-cookie"?: string[] | undefined;
102
+ "strict-transport-security"?: string | undefined;
103
+ tk?: string | undefined;
104
+ trailer?: string | undefined;
105
+ "transfer-encoding"?: string | undefined;
106
+ upgrade?: string | undefined;
107
+ "user-agent"?: string | undefined;
108
+ vary?: string | undefined;
109
+ via?: string | undefined;
110
+ warning?: string | undefined;
111
+ "www-authenticate"?: string | undefined;
112
+ }
113
+ // outgoing headers allows numbers (as they are converted internally to strings)
114
+ type OutgoingHttpHeader = number | string | string[];
115
+ interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {
116
+ accept?: string | string[] | undefined;
117
+ 'accept-charset'?: string | string[] | undefined;
118
+ 'accept-encoding'?: string | string[] | undefined;
119
+ 'accept-language'?: string | string[] | undefined;
52
120
  'accept-ranges'?: string | undefined;
53
121
  'access-control-allow-credentials'?: string | undefined;
54
122
  'access-control-allow-headers'?: string | undefined;
@@ -60,18 +128,21 @@ declare module 'http' {
60
128
  'access-control-request-method'?: string | undefined;
61
129
  age?: string | undefined;
62
130
  allow?: string | undefined;
63
- 'alt-svc'?: string | undefined;
64
131
  authorization?: string | undefined;
65
132
  'cache-control'?: string | undefined;
66
- connection?: string | undefined;
133
+ 'cdn-cache-control'?: string | undefined;
134
+ connection?: string | string[] | undefined;
67
135
  'content-disposition'?: string | undefined;
68
136
  'content-encoding'?: string | undefined;
69
137
  'content-language'?: string | undefined;
70
- 'content-length'?: string | undefined;
138
+ 'content-length'?: string | number | undefined;
71
139
  'content-location'?: string | undefined;
72
140
  'content-range'?: string | undefined;
73
- 'content-type'?: string | undefined;
74
- cookie?: string | undefined;
141
+ 'content-security-policy'?: string | undefined;
142
+ 'content-security-policy-report-only'?: string | undefined;
143
+ cookie?: string | string[] | undefined;
144
+ dav?: string | string[] | undefined;
145
+ dnt?: string | undefined;
75
146
  date?: string | undefined;
76
147
  etag?: string | undefined;
77
148
  expect?: string | undefined;
@@ -82,37 +153,46 @@ declare module 'http' {
82
153
  'if-match'?: string | undefined;
83
154
  'if-modified-since'?: string | undefined;
84
155
  'if-none-match'?: string | undefined;
156
+ 'if-range'?: string | undefined;
85
157
  'if-unmodified-since'?: string | undefined;
86
158
  'last-modified'?: string | undefined;
159
+ link?: string | string[] | undefined;
87
160
  location?: string | undefined;
161
+ 'max-forwards'?: string | undefined;
88
162
  origin?: string | undefined;
89
- pragma?: string | undefined;
90
- 'proxy-authenticate'?: string | undefined;
163
+ prgama?: string | string[] | undefined;
164
+ 'proxy-authenticate'?: string | string[] | undefined;
91
165
  'proxy-authorization'?: string | undefined;
92
166
  'public-key-pins'?: string | undefined;
167
+ 'public-key-pins-report-only'?: string | undefined;
93
168
  range?: string | undefined;
94
169
  referer?: string | undefined;
170
+ 'referrer-policy'?: string | undefined;
171
+ refresh?: string | undefined;
95
172
  'retry-after'?: string | undefined;
96
173
  'sec-websocket-accept'?: string | undefined;
97
- 'sec-websocket-extensions'?: string | undefined;
174
+ 'sec-websocket-extensions'?: string | string[] | undefined;
98
175
  'sec-websocket-key'?: string | undefined;
99
- 'sec-websocket-protocol'?: string | undefined;
176
+ 'sec-websocket-protocol'?: string | string[] | undefined;
100
177
  'sec-websocket-version'?: string | undefined;
101
- 'set-cookie'?: string[] | undefined;
178
+ server?: string | undefined;
179
+ 'set-cookie'?: string | string[] | undefined;
102
180
  'strict-transport-security'?: string | undefined;
103
- tk?: string | undefined;
181
+ te?: string | undefined;
104
182
  trailer?: string | undefined;
105
183
  'transfer-encoding'?: string | undefined;
106
- upgrade?: string | undefined;
107
184
  'user-agent'?: string | undefined;
185
+ upgrade?: string | undefined;
186
+ 'upgrade-insecure-requests'?: string | undefined;
108
187
  vary?: string | undefined;
109
- via?: string | undefined;
188
+ via?: string | string[] | undefined;
110
189
  warning?: string | undefined;
111
- 'www-authenticate'?: string | undefined;
190
+ 'www-authenticate'?: string | string[] | undefined;
191
+ 'x-content-type-options'?: string | undefined;
192
+ 'x-dns-prefetch-control'?: string | undefined;
193
+ 'x-frame-options'?: string | undefined;
194
+ 'x-xss-protection'?: string | undefined;
112
195
  }
113
- // outgoing headers allows numbers (as they are converted internally to strings)
114
- type OutgoingHttpHeader = number | string | string[];
115
- interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {}
116
196
  interface ClientRequestArgs {
117
197
  signal?: AbortSignal | undefined;
118
198
  protocol?: string | null | undefined;
@@ -283,105 +363,105 @@ declare module 'http' {
283
363
  */
284
364
  requestTimeout: number;
285
365
  addListener(event: string, listener: (...args: any[]) => void): this;
286
- addListener(event: 'close', listener: () => void): this;
287
- addListener(event: 'connection', listener: (socket: Socket) => void): this;
288
- addListener(event: 'error', listener: (err: Error) => void): this;
289
- addListener(event: 'listening', listener: () => void): this;
290
- addListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
291
- addListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
292
- addListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
366
+ addListener(event: "close", listener: () => void): this;
367
+ addListener(event: "connection", listener: (socket: Socket) => void): this;
368
+ addListener(event: "error", listener: (err: Error) => void): this;
369
+ addListener(event: "listening", listener: () => void): this;
370
+ addListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
371
+ addListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
372
+ addListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
293
373
  addListener(
294
- event: 'connect',
374
+ event: "connect",
295
375
  listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
296
376
  ): this;
297
- addListener(event: 'request', listener: RequestListener<Request, Response>): this;
377
+ addListener(event: "request", listener: RequestListener<Request, Response>): this;
298
378
  addListener(
299
- event: 'upgrade',
379
+ event: "upgrade",
300
380
  listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
301
381
  ): this;
302
382
  emit(event: string, ...args: any[]): boolean;
303
- emit(event: 'close'): boolean;
304
- emit(event: 'connection', socket: Socket): boolean;
305
- emit(event: 'error', err: Error): boolean;
306
- emit(event: 'listening'): boolean;
383
+ emit(event: "close"): boolean;
384
+ emit(event: "connection", socket: Socket): boolean;
385
+ emit(event: "error", err: Error): boolean;
386
+ emit(event: "listening"): boolean;
307
387
  emit(
308
- event: 'checkContinue',
388
+ event: "checkContinue",
309
389
  req: InstanceType<Request>,
310
390
  res: InstanceType<Response> & { req: InstanceType<Request> },
311
391
  ): boolean;
312
392
  emit(
313
- event: 'checkExpectation',
393
+ event: "checkExpectation",
314
394
  req: InstanceType<Request>,
315
395
  res: InstanceType<Response> & { req: InstanceType<Request> },
316
396
  ): boolean;
317
- emit(event: 'clientError', err: Error, socket: stream.Duplex): boolean;
318
- emit(event: 'connect', req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
397
+ emit(event: "clientError", err: Error, socket: stream.Duplex): boolean;
398
+ emit(event: "connect", req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
319
399
  emit(
320
- event: 'request',
400
+ event: "request",
321
401
  req: InstanceType<Request>,
322
402
  res: InstanceType<Response> & { req: InstanceType<Request> },
323
403
  ): boolean;
324
- emit(event: 'upgrade', req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
404
+ emit(event: "upgrade", req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
325
405
  on(event: string, listener: (...args: any[]) => void): this;
326
- on(event: 'close', listener: () => void): this;
327
- on(event: 'connection', listener: (socket: Socket) => void): this;
328
- on(event: 'error', listener: (err: Error) => void): this;
329
- on(event: 'listening', listener: () => void): this;
330
- on(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
331
- on(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
332
- on(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
333
- on(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
334
- on(event: 'request', listener: RequestListener<Request, Response>): this;
335
- on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
406
+ on(event: "close", listener: () => void): this;
407
+ on(event: "connection", listener: (socket: Socket) => void): this;
408
+ on(event: "error", listener: (err: Error) => void): this;
409
+ on(event: "listening", listener: () => void): this;
410
+ on(event: "checkContinue", listener: RequestListener<Request, Response>): this;
411
+ on(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
412
+ on(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
413
+ on(event: "connect", listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
414
+ on(event: "request", listener: RequestListener<Request, Response>): this;
415
+ on(event: "upgrade", listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
336
416
  once(event: string, listener: (...args: any[]) => void): this;
337
- once(event: 'close', listener: () => void): this;
338
- once(event: 'connection', listener: (socket: Socket) => void): this;
339
- once(event: 'error', listener: (err: Error) => void): this;
340
- once(event: 'listening', listener: () => void): this;
341
- once(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
342
- once(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
343
- once(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
417
+ once(event: "close", listener: () => void): this;
418
+ once(event: "connection", listener: (socket: Socket) => void): this;
419
+ once(event: "error", listener: (err: Error) => void): this;
420
+ once(event: "listening", listener: () => void): this;
421
+ once(event: "checkContinue", listener: RequestListener<Request, Response>): this;
422
+ once(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
423
+ once(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
344
424
  once(
345
- event: 'connect',
425
+ event: "connect",
346
426
  listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
347
427
  ): this;
348
- once(event: 'request', listener: RequestListener<Request, Response>): this;
428
+ once(event: "request", listener: RequestListener<Request, Response>): this;
349
429
  once(
350
- event: 'upgrade',
430
+ event: "upgrade",
351
431
  listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
352
432
  ): this;
353
433
  prependListener(event: string, listener: (...args: any[]) => void): this;
354
- prependListener(event: 'close', listener: () => void): this;
355
- prependListener(event: 'connection', listener: (socket: Socket) => void): this;
356
- prependListener(event: 'error', listener: (err: Error) => void): this;
357
- prependListener(event: 'listening', listener: () => void): this;
358
- prependListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
359
- prependListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
360
- prependListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
434
+ prependListener(event: "close", listener: () => void): this;
435
+ prependListener(event: "connection", listener: (socket: Socket) => void): this;
436
+ prependListener(event: "error", listener: (err: Error) => void): this;
437
+ prependListener(event: "listening", listener: () => void): this;
438
+ prependListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
439
+ prependListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
440
+ prependListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
361
441
  prependListener(
362
- event: 'connect',
442
+ event: "connect",
363
443
  listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
364
444
  ): this;
365
- prependListener(event: 'request', listener: RequestListener<Request, Response>): this;
445
+ prependListener(event: "request", listener: RequestListener<Request, Response>): this;
366
446
  prependListener(
367
- event: 'upgrade',
447
+ event: "upgrade",
368
448
  listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
369
449
  ): this;
370
450
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
371
- prependOnceListener(event: 'close', listener: () => void): this;
372
- prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
373
- prependOnceListener(event: 'error', listener: (err: Error) => void): this;
374
- prependOnceListener(event: 'listening', listener: () => void): this;
375
- prependOnceListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
376
- prependOnceListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
377
- prependOnceListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
451
+ prependOnceListener(event: "close", listener: () => void): this;
452
+ prependOnceListener(event: "connection", listener: (socket: Socket) => void): this;
453
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
454
+ prependOnceListener(event: "listening", listener: () => void): this;
455
+ prependOnceListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
456
+ prependOnceListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
457
+ prependOnceListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
378
458
  prependOnceListener(
379
- event: 'connect',
459
+ event: "connect",
380
460
  listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
381
461
  ): this;
382
- prependOnceListener(event: 'request', listener: RequestListener<Request, Response>): this;
462
+ prependOnceListener(event: "request", listener: RequestListener<Request, Response>): this;
383
463
  prependOnceListener(
384
- event: 'upgrade',
464
+ event: "upgrade",
385
465
  listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
386
466
  ): this;
387
467
  }
@@ -751,98 +831,98 @@ declare module 'http' {
751
831
  * @since v15.13.0
752
832
  */
753
833
  getRawHeaderNames(): string[];
754
- addListener(event: 'abort', listener: () => void): this;
834
+ addListener(event: "abort", listener: () => void): this;
755
835
  addListener(
756
- event: 'connect',
836
+ event: "connect",
757
837
  listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
758
838
  ): this;
759
- addListener(event: 'continue', listener: () => void): this;
760
- addListener(event: 'information', listener: (info: InformationEvent) => void): this;
761
- addListener(event: 'response', listener: (response: IncomingMessage) => void): this;
762
- addListener(event: 'socket', listener: (socket: Socket) => void): this;
763
- addListener(event: 'timeout', listener: () => void): this;
839
+ addListener(event: "continue", listener: () => void): this;
840
+ addListener(event: "information", listener: (info: InformationEvent) => void): this;
841
+ addListener(event: "response", listener: (response: IncomingMessage) => void): this;
842
+ addListener(event: "socket", listener: (socket: Socket) => void): this;
843
+ addListener(event: "timeout", listener: () => void): this;
764
844
  addListener(
765
- event: 'upgrade',
845
+ event: "upgrade",
766
846
  listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
767
847
  ): this;
768
- addListener(event: 'close', listener: () => void): this;
769
- addListener(event: 'drain', listener: () => void): this;
770
- addListener(event: 'error', listener: (err: Error) => void): this;
771
- addListener(event: 'finish', listener: () => void): this;
772
- addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
773
- addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
848
+ addListener(event: "close", listener: () => void): this;
849
+ addListener(event: "drain", listener: () => void): this;
850
+ addListener(event: "error", listener: (err: Error) => void): this;
851
+ addListener(event: "finish", listener: () => void): this;
852
+ addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
853
+ addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
774
854
  addListener(event: string | symbol, listener: (...args: any[]) => void): this;
775
- on(event: 'abort', listener: () => void): this;
776
- on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
777
- on(event: 'continue', listener: () => void): this;
778
- on(event: 'information', listener: (info: InformationEvent) => void): this;
779
- on(event: 'response', listener: (response: IncomingMessage) => void): this;
780
- on(event: 'socket', listener: (socket: Socket) => void): this;
781
- on(event: 'timeout', listener: () => void): this;
782
- on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
783
- on(event: 'close', listener: () => void): this;
784
- on(event: 'drain', listener: () => void): this;
785
- on(event: 'error', listener: (err: Error) => void): this;
786
- on(event: 'finish', listener: () => void): this;
787
- on(event: 'pipe', listener: (src: stream.Readable) => void): this;
788
- on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
855
+ on(event: "abort", listener: () => void): this;
856
+ on(event: "connect", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
857
+ on(event: "continue", listener: () => void): this;
858
+ on(event: "information", listener: (info: InformationEvent) => void): this;
859
+ on(event: "response", listener: (response: IncomingMessage) => void): this;
860
+ on(event: "socket", listener: (socket: Socket) => void): this;
861
+ on(event: "timeout", listener: () => void): this;
862
+ on(event: "upgrade", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
863
+ on(event: "close", listener: () => void): this;
864
+ on(event: "drain", listener: () => void): this;
865
+ on(event: "error", listener: (err: Error) => void): this;
866
+ on(event: "finish", listener: () => void): this;
867
+ on(event: "pipe", listener: (src: stream.Readable) => void): this;
868
+ on(event: "unpipe", listener: (src: stream.Readable) => void): this;
789
869
  on(event: string | symbol, listener: (...args: any[]) => void): this;
790
- once(event: 'abort', listener: () => void): this;
791
- once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
792
- once(event: 'continue', listener: () => void): this;
793
- once(event: 'information', listener: (info: InformationEvent) => void): this;
794
- once(event: 'response', listener: (response: IncomingMessage) => void): this;
795
- once(event: 'socket', listener: (socket: Socket) => void): this;
796
- once(event: 'timeout', listener: () => void): this;
797
- once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
798
- once(event: 'close', listener: () => void): this;
799
- once(event: 'drain', listener: () => void): this;
800
- once(event: 'error', listener: (err: Error) => void): this;
801
- once(event: 'finish', listener: () => void): this;
802
- once(event: 'pipe', listener: (src: stream.Readable) => void): this;
803
- once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
870
+ once(event: "abort", listener: () => void): this;
871
+ once(event: "connect", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
872
+ once(event: "continue", listener: () => void): this;
873
+ once(event: "information", listener: (info: InformationEvent) => void): this;
874
+ once(event: "response", listener: (response: IncomingMessage) => void): this;
875
+ once(event: "socket", listener: (socket: Socket) => void): this;
876
+ once(event: "timeout", listener: () => void): this;
877
+ once(event: "upgrade", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
878
+ once(event: "close", listener: () => void): this;
879
+ once(event: "drain", listener: () => void): this;
880
+ once(event: "error", listener: (err: Error) => void): this;
881
+ once(event: "finish", listener: () => void): this;
882
+ once(event: "pipe", listener: (src: stream.Readable) => void): this;
883
+ once(event: "unpipe", listener: (src: stream.Readable) => void): this;
804
884
  once(event: string | symbol, listener: (...args: any[]) => void): this;
805
- prependListener(event: 'abort', listener: () => void): this;
885
+ prependListener(event: "abort", listener: () => void): this;
806
886
  prependListener(
807
- event: 'connect',
887
+ event: "connect",
808
888
  listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
809
889
  ): this;
810
- prependListener(event: 'continue', listener: () => void): this;
811
- prependListener(event: 'information', listener: (info: InformationEvent) => void): this;
812
- prependListener(event: 'response', listener: (response: IncomingMessage) => void): this;
813
- prependListener(event: 'socket', listener: (socket: Socket) => void): this;
814
- prependListener(event: 'timeout', listener: () => void): this;
890
+ prependListener(event: "continue", listener: () => void): this;
891
+ prependListener(event: "information", listener: (info: InformationEvent) => void): this;
892
+ prependListener(event: "response", listener: (response: IncomingMessage) => void): this;
893
+ prependListener(event: "socket", listener: (socket: Socket) => void): this;
894
+ prependListener(event: "timeout", listener: () => void): this;
815
895
  prependListener(
816
- event: 'upgrade',
896
+ event: "upgrade",
817
897
  listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
818
898
  ): this;
819
- prependListener(event: 'close', listener: () => void): this;
820
- prependListener(event: 'drain', listener: () => void): this;
821
- prependListener(event: 'error', listener: (err: Error) => void): this;
822
- prependListener(event: 'finish', listener: () => void): this;
823
- prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
824
- prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
899
+ prependListener(event: "close", listener: () => void): this;
900
+ prependListener(event: "drain", listener: () => void): this;
901
+ prependListener(event: "error", listener: (err: Error) => void): this;
902
+ prependListener(event: "finish", listener: () => void): this;
903
+ prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
904
+ prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
825
905
  prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
826
- prependOnceListener(event: 'abort', listener: () => void): this;
906
+ prependOnceListener(event: "abort", listener: () => void): this;
827
907
  prependOnceListener(
828
- event: 'connect',
908
+ event: "connect",
829
909
  listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
830
910
  ): this;
831
- prependOnceListener(event: 'continue', listener: () => void): this;
832
- prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this;
833
- prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this;
834
- prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this;
835
- prependOnceListener(event: 'timeout', listener: () => void): this;
911
+ prependOnceListener(event: "continue", listener: () => void): this;
912
+ prependOnceListener(event: "information", listener: (info: InformationEvent) => void): this;
913
+ prependOnceListener(event: "response", listener: (response: IncomingMessage) => void): this;
914
+ prependOnceListener(event: "socket", listener: (socket: Socket) => void): this;
915
+ prependOnceListener(event: "timeout", listener: () => void): this;
836
916
  prependOnceListener(
837
- event: 'upgrade',
917
+ event: "upgrade",
838
918
  listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
839
919
  ): this;
840
- prependOnceListener(event: 'close', listener: () => void): this;
841
- prependOnceListener(event: 'drain', listener: () => void): this;
842
- prependOnceListener(event: 'error', listener: (err: Error) => void): this;
843
- prependOnceListener(event: 'finish', listener: () => void): this;
844
- prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
845
- prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
920
+ prependOnceListener(event: "close", listener: () => void): this;
921
+ prependOnceListener(event: "drain", listener: () => void): this;
922
+ prependOnceListener(event: "error", listener: (err: Error) => void): this;
923
+ prependOnceListener(event: "finish", listener: () => void): this;
924
+ prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
925
+ prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
846
926
  prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
847
927
  }
848
928
  /**
@@ -1080,7 +1160,7 @@ declare module 'http' {
1080
1160
  * Scheduling strategy to apply when picking the next free socket to use.
1081
1161
  * @default `lifo`
1082
1162
  */
1083
- scheduling?: 'fifo' | 'lifo' | undefined;
1163
+ scheduling?: "fifo" | "lifo" | undefined;
1084
1164
  }
1085
1165
  /**
1086
1166
  * An `Agent` is responsible for managing connection persistence
@@ -1499,6 +1579,6 @@ declare module 'http' {
1499
1579
  */
1500
1580
  const maxHeaderSize: number;
1501
1581
  }
1502
- declare module 'node:http' {
1503
- export * from 'http';
1582
+ declare module "node:http" {
1583
+ export * from "http";
1504
1584
  }