@types/node 14.18.8 → 15.0.2

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 (59) hide show
  1. {node v14.18 → node}/LICENSE +0 -0
  2. node/README.md +16 -0
  3. node/assert/strict.d.ts +4 -0
  4. node v14.18/assert.d.ts → node/assert.d.ts +3 -7
  5. node v14.18/async_hooks.d.ts → node/async_hooks.d.ts +4 -7
  6. node/base.d.ts +19 -0
  7. node/buffer.d.ts +22 -0
  8. node v14.18/child_process.d.ts → node/child_process.d.ts +63 -67
  9. node v14.18/cluster.d.ts → node/cluster.d.ts +10 -13
  10. node v14.18/console.d.ts → node/console.d.ts +13 -22
  11. node v14.18/constants.d.ts → node/constants.d.ts +0 -5
  12. node v14.18/crypto.d.ts → node/crypto.d.ts +134 -53
  13. node v14.18/dgram.d.ts → node/dgram.d.ts +17 -20
  14. node/dns/promises.d.ts +97 -0
  15. node/dns.d.ts +322 -0
  16. node v14.18/domain.d.ts → node/domain.d.ts +0 -3
  17. node v14.18/events.d.ts → node/events.d.ts +8 -8
  18. node v14.18/fs/promises.d.ts → node/fs/promises.d.ts +18 -29
  19. node v14.18/fs.d.ts → node/fs.d.ts +77 -93
  20. node v14.18/globals.d.ts → node/globals.d.ts +60 -24
  21. {node v14.18 → node}/globals.global.d.ts +0 -0
  22. node v14.18/http.d.ts → node/http.d.ts +108 -176
  23. node v14.18/http2.d.ts → node/http2.d.ts +74 -71
  24. node/https.d.ts +36 -0
  25. node v14.18/index.d.ts → node/index.d.ts +15 -55
  26. node v14.18/inspector.d.ts → node/inspector.d.ts +151 -161
  27. node v14.18/module.d.ts → node/module.d.ts +0 -4
  28. node v14.18/net.d.ts → node/net.d.ts +70 -42
  29. node v14.18/os.d.ts → node/os.d.ts +0 -3
  30. node v14.18/package.json → node/package.json +25 -19
  31. node v14.18/path.d.ts → node/path.d.ts +5 -9
  32. node v14.18/perf_hooks.d.ts → node/perf_hooks.d.ts +5 -8
  33. node v14.18/process.d.ts → node/process.d.ts +53 -17
  34. node v14.18/punycode.d.ts → node/punycode.d.ts +0 -3
  35. node v14.18/querystring.d.ts → node/querystring.d.ts +3 -6
  36. node v14.18/readline.d.ts → node/readline.d.ts +14 -18
  37. node v14.18/repl.d.ts → node/repl.d.ts +17 -20
  38. node/stream/promises.d.ts +67 -0
  39. node v14.18/stream.d.ts → node/stream.d.ts +164 -60
  40. node v14.18/string_decoder.d.ts → node/string_decoder.d.ts +0 -3
  41. node/timers/promises.d.ts +13 -0
  42. node v14.18/timers.d.ts → node/timers.d.ts +16 -5
  43. node v14.18/tls.d.ts → node/tls.d.ts +51 -56
  44. node v14.18/trace_events.d.ts → node/trace_events.d.ts +0 -3
  45. node/ts3.6/assert.d.ts +98 -0
  46. node/ts3.6/base.d.ts +66 -0
  47. node/ts3.6/index.d.ts +7 -0
  48. node v14.18/tty.d.ts → node/tty.d.ts +0 -3
  49. node v14.18/url.d.ts → node/url.d.ts +16 -19
  50. node v14.18/util.d.ts → node/util.d.ts +3 -12
  51. node v14.18/v8.d.ts → node/v8.d.ts +0 -3
  52. node v14.18/vm.d.ts → node/vm.d.ts +25 -28
  53. node v14.18/wasi.d.ts → node/wasi.d.ts +7 -10
  54. node v14.18/worker_threads.d.ts → node/worker_threads.d.ts +18 -18
  55. node v14.18/zlib.d.ts → node/zlib.d.ts +16 -19
  56. node v14.18/README.md +0 -16
  57. node v14.18/buffer.d.ts +0 -89
  58. node v14.18/dns.d.ts +0 -387
  59. node v14.18/https.d.ts +0 -142
node v14.18/dns.d.ts DELETED
@@ -1,387 +0,0 @@
1
- declare module 'dns' {
2
- // Supported getaddrinfo flags.
3
- const ADDRCONFIG: number;
4
- const V4MAPPED: number;
5
- /**
6
- * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
7
- * well as IPv4 mapped IPv6 addresses.
8
- */
9
- const ALL: number;
10
-
11
- interface LookupOptions {
12
- family?: number | undefined;
13
- hints?: number | undefined;
14
- all?: boolean | undefined;
15
- verbatim?: boolean | undefined;
16
- }
17
-
18
- interface LookupOneOptions extends LookupOptions {
19
- all?: false | undefined;
20
- }
21
-
22
- interface LookupAllOptions extends LookupOptions {
23
- all: true;
24
- }
25
-
26
- interface LookupAddress {
27
- address: string;
28
- family: number;
29
- }
30
-
31
- function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
32
- function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
33
- function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
34
- function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
35
- function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
36
-
37
- // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
38
- namespace lookup {
39
- function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
40
- function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
41
- function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
42
- }
43
-
44
- function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
45
-
46
- namespace lookupService {
47
- function __promisify__(address: string, port: number): Promise<{ hostname: string, service: string }>;
48
- }
49
-
50
- interface ResolveOptions {
51
- ttl: boolean;
52
- }
53
-
54
- interface ResolveWithTtlOptions extends ResolveOptions {
55
- ttl: true;
56
- }
57
-
58
- interface RecordWithTtl {
59
- address: string;
60
- ttl: number;
61
- }
62
-
63
- /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
64
- type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
65
-
66
- interface AnyARecord extends RecordWithTtl {
67
- type: "A";
68
- }
69
-
70
- interface AnyAaaaRecord extends RecordWithTtl {
71
- type: "AAAA";
72
- }
73
-
74
- interface MxRecord {
75
- priority: number;
76
- exchange: string;
77
- }
78
-
79
- interface AnyMxRecord extends MxRecord {
80
- type: "MX";
81
- }
82
-
83
- interface NaptrRecord {
84
- flags: string;
85
- service: string;
86
- regexp: string;
87
- replacement: string;
88
- order: number;
89
- preference: number;
90
- }
91
-
92
- interface AnyNaptrRecord extends NaptrRecord {
93
- type: "NAPTR";
94
- }
95
-
96
- interface SoaRecord {
97
- nsname: string;
98
- hostmaster: string;
99
- serial: number;
100
- refresh: number;
101
- retry: number;
102
- expire: number;
103
- minttl: number;
104
- }
105
-
106
- interface AnySoaRecord extends SoaRecord {
107
- type: "SOA";
108
- }
109
-
110
- interface SrvRecord {
111
- priority: number;
112
- weight: number;
113
- port: number;
114
- name: string;
115
- }
116
-
117
- interface AnySrvRecord extends SrvRecord {
118
- type: "SRV";
119
- }
120
-
121
- interface AnyTxtRecord {
122
- type: "TXT";
123
- entries: string[];
124
- }
125
-
126
- interface AnyNsRecord {
127
- type: "NS";
128
- value: string;
129
- }
130
-
131
- interface AnyPtrRecord {
132
- type: "PTR";
133
- value: string;
134
- }
135
-
136
- interface AnyCnameRecord {
137
- type: "CNAME";
138
- value: string;
139
- }
140
-
141
- type AnyRecord = AnyARecord |
142
- AnyAaaaRecord |
143
- AnyCnameRecord |
144
- AnyMxRecord |
145
- AnyNaptrRecord |
146
- AnyNsRecord |
147
- AnyPtrRecord |
148
- AnySoaRecord |
149
- AnySrvRecord |
150
- AnyTxtRecord;
151
-
152
- function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
153
- function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
154
- function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
155
- function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
156
- function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
157
- function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
158
- function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
159
- function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
160
- function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
161
- function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
162
- function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
163
- function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
164
- function resolve(
165
- hostname: string,
166
- rrtype: string,
167
- callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void,
168
- ): void;
169
-
170
- // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
171
- namespace resolve {
172
- function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
173
- function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
174
- function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
175
- function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
176
- function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
177
- function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
178
- function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
179
- function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
180
- }
181
-
182
- function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
183
- function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
184
- function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
185
-
186
- // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
187
- namespace resolve4 {
188
- function __promisify__(hostname: string): Promise<string[]>;
189
- function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
190
- function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
191
- }
192
-
193
- function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
194
- function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
195
- function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
196
-
197
- // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
198
- namespace resolve6 {
199
- function __promisify__(hostname: string): Promise<string[]>;
200
- function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
201
- function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
202
- }
203
-
204
- function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
205
- namespace resolveCname {
206
- function __promisify__(hostname: string): Promise<string[]>;
207
- }
208
-
209
- function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
210
- namespace resolveMx {
211
- function __promisify__(hostname: string): Promise<MxRecord[]>;
212
- }
213
-
214
- function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
215
- namespace resolveNaptr {
216
- function __promisify__(hostname: string): Promise<NaptrRecord[]>;
217
- }
218
-
219
- function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
220
- namespace resolveNs {
221
- function __promisify__(hostname: string): Promise<string[]>;
222
- }
223
-
224
- function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
225
- namespace resolvePtr {
226
- function __promisify__(hostname: string): Promise<string[]>;
227
- }
228
-
229
- function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
230
- namespace resolveSoa {
231
- function __promisify__(hostname: string): Promise<SoaRecord>;
232
- }
233
-
234
- function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
235
- namespace resolveSrv {
236
- function __promisify__(hostname: string): Promise<SrvRecord[]>;
237
- }
238
-
239
- function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
240
- namespace resolveTxt {
241
- function __promisify__(hostname: string): Promise<string[][]>;
242
- }
243
-
244
- function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
245
- namespace resolveAny {
246
- function __promisify__(hostname: string): Promise<AnyRecord[]>;
247
- }
248
-
249
- function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void;
250
- function setServers(servers: ReadonlyArray<string>): void;
251
- function getServers(): string[];
252
-
253
- function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
254
-
255
- // Error codes
256
- const NODATA: string;
257
- const FORMERR: string;
258
- const SERVFAIL: string;
259
- const NOTFOUND: string;
260
- const NOTIMP: string;
261
- const REFUSED: string;
262
- const BADQUERY: string;
263
- const BADNAME: string;
264
- const BADFAMILY: string;
265
- const BADRESP: string;
266
- const CONNREFUSED: string;
267
- const TIMEOUT: string;
268
- const EOF: string;
269
- const FILE: string;
270
- const NOMEM: string;
271
- const DESTRUCTION: string;
272
- const BADSTR: string;
273
- const BADFLAGS: string;
274
- const NONAME: string;
275
- const BADHINTS: string;
276
- const NOTINITIALIZED: string;
277
- const LOADIPHLPAPI: string;
278
- const ADDRGETNETWORKPARAMS: string;
279
- const CANCELLED: string;
280
-
281
- interface ResolverOptions {
282
- timeout?: number | undefined;
283
- }
284
-
285
- class Resolver {
286
- constructor(options?: ResolverOptions);
287
- cancel(): void;
288
- getServers: typeof getServers;
289
- resolve: typeof resolve;
290
- resolve4: typeof resolve4;
291
- resolve6: typeof resolve6;
292
- resolveAny: typeof resolveAny;
293
- resolveCname: typeof resolveCname;
294
- resolveMx: typeof resolveMx;
295
- resolveNaptr: typeof resolveNaptr;
296
- resolveNs: typeof resolveNs;
297
- resolvePtr: typeof resolvePtr;
298
- resolveSoa: typeof resolveSoa;
299
- resolveSrv: typeof resolveSrv;
300
- resolveTxt: typeof resolveTxt;
301
- reverse: typeof reverse;
302
- setLocalAddress(ipv4?: string, ipv6?: string): void;
303
- setServers: typeof setServers;
304
- }
305
-
306
- namespace promises {
307
- function getServers(): string[];
308
-
309
- function lookup(hostname: string, family: number): Promise<LookupAddress>;
310
- function lookup(hostname: string, options: LookupOneOptions): Promise<LookupAddress>;
311
- function lookup(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
312
- function lookup(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
313
- function lookup(hostname: string): Promise<LookupAddress>;
314
-
315
- function lookupService(address: string, port: number): Promise<{ hostname: string, service: string }>;
316
-
317
- function resolve(hostname: string): Promise<string[]>;
318
- function resolve(hostname: string, rrtype: "A"): Promise<string[]>;
319
- function resolve(hostname: string, rrtype: "AAAA"): Promise<string[]>;
320
- function resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
321
- function resolve(hostname: string, rrtype: "CNAME"): Promise<string[]>;
322
- function resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
323
- function resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
324
- function resolve(hostname: string, rrtype: "NS"): Promise<string[]>;
325
- function resolve(hostname: string, rrtype: "PTR"): Promise<string[]>;
326
- function resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
327
- function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
328
- function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
329
- function resolve(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
330
-
331
- function resolve4(hostname: string): Promise<string[]>;
332
- function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
333
- function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
334
-
335
- function resolve6(hostname: string): Promise<string[]>;
336
- function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
337
- function resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
338
-
339
- function resolveAny(hostname: string): Promise<AnyRecord[]>;
340
-
341
- function resolveCname(hostname: string): Promise<string[]>;
342
-
343
- function resolveMx(hostname: string): Promise<MxRecord[]>;
344
-
345
- function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
346
-
347
- function resolveNs(hostname: string): Promise<string[]>;
348
-
349
- function resolvePtr(hostname: string): Promise<string[]>;
350
-
351
- function resolveSoa(hostname: string): Promise<SoaRecord>;
352
-
353
- function resolveSrv(hostname: string): Promise<SrvRecord[]>;
354
-
355
- function resolveTxt(hostname: string): Promise<string[][]>;
356
-
357
- function reverse(ip: string): Promise<string[]>;
358
-
359
- function setServers(servers: ReadonlyArray<string>): void;
360
-
361
- function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
362
-
363
- class Resolver {
364
- constructor(options?: ResolverOptions);
365
- cancel(): void;
366
- getServers: typeof getServers;
367
- resolve: typeof resolve;
368
- resolve4: typeof resolve4;
369
- resolve6: typeof resolve6;
370
- resolveAny: typeof resolveAny;
371
- resolveCname: typeof resolveCname;
372
- resolveMx: typeof resolveMx;
373
- resolveNaptr: typeof resolveNaptr;
374
- resolveNs: typeof resolveNs;
375
- resolvePtr: typeof resolvePtr;
376
- resolveSoa: typeof resolveSoa;
377
- resolveSrv: typeof resolveSrv;
378
- resolveTxt: typeof resolveTxt;
379
- reverse: typeof reverse;
380
- setLocalAddress(ipv4?: string, ipv6?: string): void;
381
- setServers: typeof setServers;
382
- }
383
- }
384
- }
385
- declare module 'node:dns' {
386
- export * from 'dns';
387
- }
node v14.18/https.d.ts DELETED
@@ -1,142 +0,0 @@
1
- declare module 'https' {
2
- import { Duplex } from 'stream';
3
- import * as tls from 'tls';
4
- import * as http from 'http';
5
- import { URL } from 'url';
6
-
7
- type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions;
8
-
9
- type RequestOptions = http.RequestOptions & tls.SecureContextOptions & {
10
- rejectUnauthorized?: boolean | undefined; // Defaults to true
11
- servername?: string | undefined; // SNI TLS Extension
12
- };
13
-
14
- interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
15
- rejectUnauthorized?: boolean | undefined;
16
- maxCachedSessions?: number | undefined;
17
- }
18
-
19
- class Agent extends http.Agent {
20
- constructor(options?: AgentOptions);
21
- options: AgentOptions;
22
- }
23
-
24
- interface Server extends http.Server {}
25
- class Server extends tls.Server {
26
- constructor(requestListener?: http.RequestListener);
27
- constructor(options: ServerOptions, requestListener?: http.RequestListener);
28
- addListener(event: string, listener: (...args: any[]) => void): this;
29
- addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
30
- addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
31
- addListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
32
- addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
33
- addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
34
- addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
35
- addListener(event: 'close', listener: () => void): this;
36
- addListener(event: 'connection', listener: (socket: Duplex) => void): this;
37
- addListener(event: 'error', listener: (err: Error) => void): this;
38
- addListener(event: 'listening', listener: () => void): this;
39
- addListener(event: 'checkContinue', listener: http.RequestListener): this;
40
- addListener(event: 'checkExpectation', listener: http.RequestListener): this;
41
- addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
42
- addListener(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
43
- addListener(event: 'request', listener: http.RequestListener): this;
44
- addListener(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
45
- emit(event: string, ...args: any[]): boolean;
46
- emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean;
47
- emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean;
48
- emit(event: 'OCSPRequest', certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean;
49
- emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;
50
- emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean;
51
- emit(event: 'tlsClientError', err: Error, tlsSocket: tls.TLSSocket): boolean;
52
- emit(event: 'close'): boolean;
53
- emit(event: 'connection', socket: Duplex): boolean;
54
- emit(event: 'error', err: Error): boolean;
55
- emit(event: 'listening'): boolean;
56
- emit(event: 'checkContinue', req: http.IncomingMessage, res: http.ServerResponse): boolean;
57
- emit(event: 'checkExpectation', req: http.IncomingMessage, res: http.ServerResponse): boolean;
58
- emit(event: 'clientError', err: Error, socket: Duplex): boolean;
59
- emit(event: 'connect', req: http.IncomingMessage, socket: Duplex, head: Buffer): boolean;
60
- emit(event: 'request', req: http.IncomingMessage, res: http.ServerResponse): boolean;
61
- emit(event: 'upgrade', req: http.IncomingMessage, socket: Duplex, head: Buffer): boolean;
62
- on(event: string, listener: (...args: any[]) => void): this;
63
- on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
64
- on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
65
- on(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
66
- on(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
67
- on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
68
- on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
69
- on(event: 'close', listener: () => void): this;
70
- on(event: 'connection', listener: (socket: Duplex) => void): this;
71
- on(event: 'error', listener: (err: Error) => void): this;
72
- on(event: 'listening', listener: () => void): this;
73
- on(event: 'checkContinue', listener: http.RequestListener): this;
74
- on(event: 'checkExpectation', listener: http.RequestListener): this;
75
- on(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
76
- on(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
77
- on(event: 'request', listener: http.RequestListener): this;
78
- on(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
79
- once(event: string, listener: (...args: any[]) => void): this;
80
- once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
81
- once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
82
- once(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
83
- once(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
84
- once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
85
- once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
86
- once(event: 'close', listener: () => void): this;
87
- once(event: 'connection', listener: (socket: Duplex) => void): this;
88
- once(event: 'error', listener: (err: Error) => void): this;
89
- once(event: 'listening', listener: () => void): this;
90
- once(event: 'checkContinue', listener: http.RequestListener): this;
91
- once(event: 'checkExpectation', listener: http.RequestListener): this;
92
- once(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
93
- once(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
94
- once(event: 'request', listener: http.RequestListener): this;
95
- once(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
96
- prependListener(event: string, listener: (...args: any[]) => void): this;
97
- prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
98
- prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
99
- prependListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
100
- prependListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
101
- prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
102
- prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
103
- prependListener(event: 'close', listener: () => void): this;
104
- prependListener(event: 'connection', listener: (socket: Duplex) => void): this;
105
- prependListener(event: 'error', listener: (err: Error) => void): this;
106
- prependListener(event: 'listening', listener: () => void): this;
107
- prependListener(event: 'checkContinue', listener: http.RequestListener): this;
108
- prependListener(event: 'checkExpectation', listener: http.RequestListener): this;
109
- prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
110
- prependListener(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
111
- prependListener(event: 'request', listener: http.RequestListener): this;
112
- prependListener(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
113
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
114
- prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
115
- prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
116
- prependOnceListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
117
- prependOnceListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
118
- prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
119
- prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
120
- prependOnceListener(event: 'close', listener: () => void): this;
121
- prependOnceListener(event: 'connection', listener: (socket: Duplex) => void): this;
122
- prependOnceListener(event: 'error', listener: (err: Error) => void): this;
123
- prependOnceListener(event: 'listening', listener: () => void): this;
124
- prependOnceListener(event: 'checkContinue', listener: http.RequestListener): this;
125
- prependOnceListener(event: 'checkExpectation', listener: http.RequestListener): this;
126
- prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
127
- prependOnceListener(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
128
- prependOnceListener(event: 'request', listener: http.RequestListener): this;
129
- prependOnceListener(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
130
- }
131
-
132
- function createServer(requestListener?: http.RequestListener): Server;
133
- function createServer(options: ServerOptions, requestListener?: http.RequestListener): Server;
134
- function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
135
- function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
136
- function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
137
- function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
138
- let globalAgent: Agent;
139
- }
140
- declare module 'node:https' {
141
- export * from 'https';
142
- }