@types/node 16.18.52 → 16.18.54
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.
- node v16.18/README.md +1 -1
- node v16.18/assert/strict.d.ts +4 -4
- node v16.18/assert.d.ts +48 -24
- node v16.18/async_hooks.d.ts +10 -7
- node v16.18/buffer.d.ts +47 -24
- node v16.18/child_process.d.ts +262 -122
- node v16.18/cluster.d.ts +107 -89
- node v16.18/console.d.ts +7 -7
- node v16.18/constants.d.ts +12 -11
- node v16.18/crypto.d.ts +738 -267
- node v16.18/dgram.d.ts +81 -45
- node v16.18/diagnostics_channel.d.ts +3 -3
- node v16.18/dns/promises.d.ts +28 -25
- node v16.18/dns.d.ts +202 -61
- node v16.18/domain.d.ts +4 -4
- node v16.18/events.d.ts +15 -7
- node v16.18/fs/promises.d.ts +93 -64
- node v16.18/fs.d.ts +485 -290
- node v16.18/globals.d.ts +13 -13
- node v16.18/http.d.ts +177 -177
- node v16.18/http2.d.ts +628 -376
- node v16.18/https.d.ts +107 -105
- node v16.18/inspector.d.ts +3 -3
- node v16.18/module.d.ts +11 -8
- node v16.18/net.d.ts +106 -87
- node v16.18/os.d.ts +7 -7
- node v16.18/package.json +2 -2
- node v16.18/path.d.ts +13 -13
- node v16.18/perf_hooks.d.ts +17 -15
- node v16.18/process.d.ts +144 -124
- node v16.18/punycode.d.ts +3 -3
- node v16.18/querystring.d.ts +14 -4
- node v16.18/readline.d.ts +64 -54
- node v16.18/repl.d.ts +67 -61
- node v16.18/stream/consumers.d.ts +4 -4
- node v16.18/stream/promises.d.ts +56 -15
- node v16.18/stream/web.d.ts +19 -19
- node v16.18/stream.d.ts +314 -216
- node v16.18/string_decoder.d.ts +3 -3
- node v16.18/test.d.ts +2 -2
- node v16.18/timers/promises.d.ts +4 -4
- node v16.18/timers.d.ts +23 -8
- node v16.18/tls.d.ts +150 -71
- node v16.18/trace_events.d.ts +3 -3
- node v16.18/ts4.8/assert/strict.d.ts +4 -4
- node v16.18/ts4.8/assert.d.ts +48 -24
- node v16.18/ts4.8/async_hooks.d.ts +10 -7
- node v16.18/ts4.8/buffer.d.ts +47 -24
- node v16.18/ts4.8/child_process.d.ts +262 -122
- node v16.18/ts4.8/cluster.d.ts +107 -89
- node v16.18/ts4.8/console.d.ts +7 -7
- node v16.18/ts4.8/constants.d.ts +12 -11
- node v16.18/ts4.8/crypto.d.ts +738 -267
- node v16.18/ts4.8/dgram.d.ts +81 -45
- node v16.18/ts4.8/diagnostics_channel.d.ts +3 -3
- node v16.18/ts4.8/dns/promises.d.ts +28 -25
- node v16.18/ts4.8/dns.d.ts +202 -61
- node v16.18/ts4.8/domain.d.ts +4 -4
- node v16.18/ts4.8/events.d.ts +15 -7
- node v16.18/ts4.8/fs/promises.d.ts +93 -64
- node v16.18/ts4.8/fs.d.ts +485 -290
- node v16.18/ts4.8/globals.d.ts +13 -13
- node v16.18/ts4.8/http.d.ts +176 -176
- node v16.18/ts4.8/http2.d.ts +628 -376
- node v16.18/ts4.8/https.d.ts +107 -105
- node v16.18/ts4.8/inspector.d.ts +3 -3
- node v16.18/ts4.8/module.d.ts +11 -8
- node v16.18/ts4.8/net.d.ts +106 -87
- node v16.18/ts4.8/os.d.ts +7 -7
- node v16.18/ts4.8/path.d.ts +13 -13
- node v16.18/ts4.8/perf_hooks.d.ts +17 -15
- node v16.18/ts4.8/process.d.ts +144 -124
- node v16.18/ts4.8/punycode.d.ts +3 -3
- node v16.18/ts4.8/querystring.d.ts +14 -4
- node v16.18/ts4.8/readline.d.ts +64 -54
- node v16.18/ts4.8/repl.d.ts +67 -61
- node v16.18/ts4.8/stream/consumers.d.ts +4 -4
- node v16.18/ts4.8/stream/promises.d.ts +56 -15
- node v16.18/ts4.8/stream/web.d.ts +19 -19
- node v16.18/ts4.8/stream.d.ts +309 -214
- node v16.18/ts4.8/string_decoder.d.ts +3 -3
- node v16.18/ts4.8/test.d.ts +2 -2
- node v16.18/ts4.8/timers/promises.d.ts +4 -4
- node v16.18/ts4.8/timers.d.ts +23 -8
- node v16.18/ts4.8/tls.d.ts +150 -71
- node v16.18/ts4.8/trace_events.d.ts +3 -3
- node v16.18/ts4.8/tty.d.ts +10 -10
- node v16.18/ts4.8/url.d.ts +26 -14
- node v16.18/ts4.8/util.d.ts +122 -51
- node v16.18/ts4.8/v8.d.ts +4 -4
- node v16.18/ts4.8/vm.d.ts +18 -18
- node v16.18/ts4.8/wasi.d.ts +3 -3
- node v16.18/ts4.8/worker_threads.d.ts +77 -77
- node v16.18/ts4.8/zlib.d.ts +9 -9
- node v16.18/tty.d.ts +10 -10
- node v16.18/url.d.ts +26 -14
- node v16.18/util.d.ts +122 -51
- node v16.18/v8.d.ts +4 -4
- node v16.18/vm.d.ts +18 -18
- node v16.18/wasi.d.ts +3 -3
- node v16.18/worker_threads.d.ts +77 -77
- node v16.18/zlib.d.ts +9 -9
node v16.18/dns.d.ts
CHANGED
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
* See the `Implementation considerations section` for more information.
|
|
45
45
|
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/dns.js)
|
|
46
46
|
*/
|
|
47
|
-
declare module
|
|
48
|
-
import * as dnsPromises from
|
|
47
|
+
declare module "dns" {
|
|
48
|
+
import * as dnsPromises from "node:dns/promises";
|
|
49
49
|
// Supported getaddrinfo flags.
|
|
50
50
|
export const ADDRCONFIG: number;
|
|
51
51
|
export const V4MAPPED: number;
|
|
@@ -112,11 +112,30 @@ declare module 'node:dns' {
|
|
|
112
112
|
* If this method is invoked as its `util.promisify()` ed version, and `all`is not set to `true`, it returns a `Promise` for an `Object` with `address` and`family` properties.
|
|
113
113
|
* @since v0.1.90
|
|
114
114
|
*/
|
|
115
|
-
export function lookup(
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
export function lookup(
|
|
116
|
+
hostname: string,
|
|
117
|
+
family: number,
|
|
118
|
+
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
|
119
|
+
): void;
|
|
120
|
+
export function lookup(
|
|
121
|
+
hostname: string,
|
|
122
|
+
options: LookupOneOptions,
|
|
123
|
+
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
|
124
|
+
): void;
|
|
125
|
+
export function lookup(
|
|
126
|
+
hostname: string,
|
|
127
|
+
options: LookupAllOptions,
|
|
128
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void,
|
|
129
|
+
): void;
|
|
130
|
+
export function lookup(
|
|
131
|
+
hostname: string,
|
|
132
|
+
options: LookupOptions,
|
|
133
|
+
callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void,
|
|
134
|
+
): void;
|
|
135
|
+
export function lookup(
|
|
136
|
+
hostname: string,
|
|
137
|
+
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
|
138
|
+
): void;
|
|
120
139
|
export namespace lookup {
|
|
121
140
|
function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
|
|
122
141
|
function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
|
|
@@ -142,11 +161,15 @@ declare module 'node:dns' {
|
|
|
142
161
|
* If this method is invoked as its `util.promisify()` ed version, it returns a`Promise` for an `Object` with `hostname` and `service` properties.
|
|
143
162
|
* @since v0.11.14
|
|
144
163
|
*/
|
|
145
|
-
export function lookupService(
|
|
164
|
+
export function lookupService(
|
|
165
|
+
address: string,
|
|
166
|
+
port: number,
|
|
167
|
+
callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void,
|
|
168
|
+
): void;
|
|
146
169
|
export namespace lookupService {
|
|
147
170
|
function __promisify__(
|
|
148
171
|
address: string,
|
|
149
|
-
port: number
|
|
172
|
+
port: number,
|
|
150
173
|
): Promise<{
|
|
151
174
|
hostname: string;
|
|
152
175
|
service: string;
|
|
@@ -165,10 +188,10 @@ declare module 'node:dns' {
|
|
|
165
188
|
/** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
|
|
166
189
|
export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
|
|
167
190
|
export interface AnyARecord extends RecordWithTtl {
|
|
168
|
-
type:
|
|
191
|
+
type: "A";
|
|
169
192
|
}
|
|
170
193
|
export interface AnyAaaaRecord extends RecordWithTtl {
|
|
171
|
-
type:
|
|
194
|
+
type: "AAAA";
|
|
172
195
|
}
|
|
173
196
|
export interface CaaRecord {
|
|
174
197
|
critical: number;
|
|
@@ -183,7 +206,7 @@ declare module 'node:dns' {
|
|
|
183
206
|
exchange: string;
|
|
184
207
|
}
|
|
185
208
|
export interface AnyMxRecord extends MxRecord {
|
|
186
|
-
type:
|
|
209
|
+
type: "MX";
|
|
187
210
|
}
|
|
188
211
|
export interface NaptrRecord {
|
|
189
212
|
flags: string;
|
|
@@ -194,7 +217,7 @@ declare module 'node:dns' {
|
|
|
194
217
|
preference: number;
|
|
195
218
|
}
|
|
196
219
|
export interface AnyNaptrRecord extends NaptrRecord {
|
|
197
|
-
type:
|
|
220
|
+
type: "NAPTR";
|
|
198
221
|
}
|
|
199
222
|
export interface SoaRecord {
|
|
200
223
|
nsname: string;
|
|
@@ -206,7 +229,7 @@ declare module 'node:dns' {
|
|
|
206
229
|
minttl: number;
|
|
207
230
|
}
|
|
208
231
|
export interface AnySoaRecord extends SoaRecord {
|
|
209
|
-
type:
|
|
232
|
+
type: "SOA";
|
|
210
233
|
}
|
|
211
234
|
export interface SrvRecord {
|
|
212
235
|
priority: number;
|
|
@@ -215,25 +238,35 @@ declare module 'node:dns' {
|
|
|
215
238
|
name: string;
|
|
216
239
|
}
|
|
217
240
|
export interface AnySrvRecord extends SrvRecord {
|
|
218
|
-
type:
|
|
241
|
+
type: "SRV";
|
|
219
242
|
}
|
|
220
243
|
export interface AnyTxtRecord {
|
|
221
|
-
type:
|
|
244
|
+
type: "TXT";
|
|
222
245
|
entries: string[];
|
|
223
246
|
}
|
|
224
247
|
export interface AnyNsRecord {
|
|
225
|
-
type:
|
|
248
|
+
type: "NS";
|
|
226
249
|
value: string;
|
|
227
250
|
}
|
|
228
251
|
export interface AnyPtrRecord {
|
|
229
|
-
type:
|
|
252
|
+
type: "PTR";
|
|
230
253
|
value: string;
|
|
231
254
|
}
|
|
232
255
|
export interface AnyCnameRecord {
|
|
233
|
-
type:
|
|
256
|
+
type: "CNAME";
|
|
234
257
|
value: string;
|
|
235
258
|
}
|
|
236
|
-
export type AnyRecord =
|
|
259
|
+
export type AnyRecord =
|
|
260
|
+
| AnyARecord
|
|
261
|
+
| AnyAaaaRecord
|
|
262
|
+
| AnyCnameRecord
|
|
263
|
+
| AnyMxRecord
|
|
264
|
+
| AnyNaptrRecord
|
|
265
|
+
| AnyNsRecord
|
|
266
|
+
| AnyPtrRecord
|
|
267
|
+
| AnySoaRecord
|
|
268
|
+
| AnySrvRecord
|
|
269
|
+
| AnyTxtRecord;
|
|
237
270
|
/**
|
|
238
271
|
* Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
|
|
239
272
|
* of the resource records. The `callback` function has arguments`(err, records)`. When successful, `records` will be an array of resource
|
|
@@ -246,32 +279,85 @@ declare module 'node:dns' {
|
|
|
246
279
|
* @param hostname Host name to resolve.
|
|
247
280
|
* @param [rrtype='A'] Resource record type.
|
|
248
281
|
*/
|
|
249
|
-
export function resolve(
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
export function resolve(
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
export function resolve(
|
|
259
|
-
|
|
260
|
-
|
|
282
|
+
export function resolve(
|
|
283
|
+
hostname: string,
|
|
284
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
285
|
+
): void;
|
|
286
|
+
export function resolve(
|
|
287
|
+
hostname: string,
|
|
288
|
+
rrtype: "A",
|
|
289
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
290
|
+
): void;
|
|
291
|
+
export function resolve(
|
|
292
|
+
hostname: string,
|
|
293
|
+
rrtype: "AAAA",
|
|
294
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
295
|
+
): void;
|
|
296
|
+
export function resolve(
|
|
297
|
+
hostname: string,
|
|
298
|
+
rrtype: "ANY",
|
|
299
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
|
|
300
|
+
): void;
|
|
301
|
+
export function resolve(
|
|
302
|
+
hostname: string,
|
|
303
|
+
rrtype: "CNAME",
|
|
304
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
305
|
+
): void;
|
|
306
|
+
export function resolve(
|
|
307
|
+
hostname: string,
|
|
308
|
+
rrtype: "MX",
|
|
309
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
|
|
310
|
+
): void;
|
|
311
|
+
export function resolve(
|
|
312
|
+
hostname: string,
|
|
313
|
+
rrtype: "NAPTR",
|
|
314
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
|
|
315
|
+
): void;
|
|
316
|
+
export function resolve(
|
|
317
|
+
hostname: string,
|
|
318
|
+
rrtype: "NS",
|
|
319
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
320
|
+
): void;
|
|
321
|
+
export function resolve(
|
|
322
|
+
hostname: string,
|
|
323
|
+
rrtype: "PTR",
|
|
324
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
325
|
+
): void;
|
|
326
|
+
export function resolve(
|
|
327
|
+
hostname: string,
|
|
328
|
+
rrtype: "SOA",
|
|
329
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void,
|
|
330
|
+
): void;
|
|
331
|
+
export function resolve(
|
|
332
|
+
hostname: string,
|
|
333
|
+
rrtype: "SRV",
|
|
334
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
|
|
335
|
+
): void;
|
|
336
|
+
export function resolve(
|
|
337
|
+
hostname: string,
|
|
338
|
+
rrtype: "TXT",
|
|
339
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
|
|
340
|
+
): void;
|
|
261
341
|
export function resolve(
|
|
262
342
|
hostname: string,
|
|
263
343
|
rrtype: string,
|
|
264
|
-
callback: (
|
|
344
|
+
callback: (
|
|
345
|
+
err: NodeJS.ErrnoException | null,
|
|
346
|
+
addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[],
|
|
347
|
+
) => void,
|
|
265
348
|
): void;
|
|
266
349
|
export namespace resolve {
|
|
267
|
-
function __promisify__(hostname: string, rrtype?:
|
|
268
|
-
function __promisify__(hostname: string, rrtype:
|
|
269
|
-
function __promisify__(hostname: string, rrtype:
|
|
270
|
-
function __promisify__(hostname: string, rrtype:
|
|
271
|
-
function __promisify__(hostname: string, rrtype:
|
|
272
|
-
function __promisify__(hostname: string, rrtype:
|
|
273
|
-
function __promisify__(hostname: string, rrtype:
|
|
274
|
-
function __promisify__(
|
|
350
|
+
function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
|
|
351
|
+
function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
|
|
352
|
+
function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
|
|
353
|
+
function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
|
|
354
|
+
function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
|
|
355
|
+
function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
|
|
356
|
+
function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
|
|
357
|
+
function __promisify__(
|
|
358
|
+
hostname: string,
|
|
359
|
+
rrtype: string,
|
|
360
|
+
): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
|
|
275
361
|
}
|
|
276
362
|
/**
|
|
277
363
|
* Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the`hostname`. The `addresses` argument passed to the `callback` function
|
|
@@ -279,9 +365,20 @@ declare module 'node:dns' {
|
|
|
279
365
|
* @since v0.1.16
|
|
280
366
|
* @param hostname Host name to resolve.
|
|
281
367
|
*/
|
|
282
|
-
export function resolve4(
|
|
283
|
-
|
|
284
|
-
|
|
368
|
+
export function resolve4(
|
|
369
|
+
hostname: string,
|
|
370
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
371
|
+
): void;
|
|
372
|
+
export function resolve4(
|
|
373
|
+
hostname: string,
|
|
374
|
+
options: ResolveWithTtlOptions,
|
|
375
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
|
|
376
|
+
): void;
|
|
377
|
+
export function resolve4(
|
|
378
|
+
hostname: string,
|
|
379
|
+
options: ResolveOptions,
|
|
380
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
|
|
381
|
+
): void;
|
|
285
382
|
export namespace resolve4 {
|
|
286
383
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
287
384
|
function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
|
|
@@ -293,9 +390,20 @@ declare module 'node:dns' {
|
|
|
293
390
|
* @since v0.1.16
|
|
294
391
|
* @param hostname Host name to resolve.
|
|
295
392
|
*/
|
|
296
|
-
export function resolve6(
|
|
297
|
-
|
|
298
|
-
|
|
393
|
+
export function resolve6(
|
|
394
|
+
hostname: string,
|
|
395
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
396
|
+
): void;
|
|
397
|
+
export function resolve6(
|
|
398
|
+
hostname: string,
|
|
399
|
+
options: ResolveWithTtlOptions,
|
|
400
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
|
|
401
|
+
): void;
|
|
402
|
+
export function resolve6(
|
|
403
|
+
hostname: string,
|
|
404
|
+
options: ResolveOptions,
|
|
405
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
|
|
406
|
+
): void;
|
|
299
407
|
export namespace resolve6 {
|
|
300
408
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
301
409
|
function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
|
|
@@ -306,7 +414,10 @@ declare module 'node:dns' {
|
|
|
306
414
|
* will contain an array of canonical name records available for the `hostname`(e.g. `['bar.example.com']`).
|
|
307
415
|
* @since v0.3.2
|
|
308
416
|
*/
|
|
309
|
-
export function resolveCname(
|
|
417
|
+
export function resolveCname(
|
|
418
|
+
hostname: string,
|
|
419
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
420
|
+
): void;
|
|
310
421
|
export namespace resolveCname {
|
|
311
422
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
312
423
|
}
|
|
@@ -316,7 +427,10 @@ declare module 'node:dns' {
|
|
|
316
427
|
* available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
|
|
317
428
|
* @since v15.0.0
|
|
318
429
|
*/
|
|
319
|
-
export function resolveCaa(
|
|
430
|
+
export function resolveCaa(
|
|
431
|
+
hostname: string,
|
|
432
|
+
callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void,
|
|
433
|
+
): void;
|
|
320
434
|
export namespace resolveCaa {
|
|
321
435
|
function __promisify__(hostname: string): Promise<CaaRecord[]>;
|
|
322
436
|
}
|
|
@@ -325,7 +439,10 @@ declare module 'node:dns' {
|
|
|
325
439
|
* contain an array of objects containing both a `priority` and `exchange`property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
|
|
326
440
|
* @since v0.1.27
|
|
327
441
|
*/
|
|
328
|
-
export function resolveMx(
|
|
442
|
+
export function resolveMx(
|
|
443
|
+
hostname: string,
|
|
444
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
|
|
445
|
+
): void;
|
|
329
446
|
export namespace resolveMx {
|
|
330
447
|
function __promisify__(hostname: string): Promise<MxRecord[]>;
|
|
331
448
|
}
|
|
@@ -352,7 +469,10 @@ declare module 'node:dns' {
|
|
|
352
469
|
* ```
|
|
353
470
|
* @since v0.9.12
|
|
354
471
|
*/
|
|
355
|
-
export function resolveNaptr(
|
|
472
|
+
export function resolveNaptr(
|
|
473
|
+
hostname: string,
|
|
474
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
|
|
475
|
+
): void;
|
|
356
476
|
export namespace resolveNaptr {
|
|
357
477
|
function __promisify__(hostname: string): Promise<NaptrRecord[]>;
|
|
358
478
|
}
|
|
@@ -361,7 +481,10 @@ declare module 'node:dns' {
|
|
|
361
481
|
* contain an array of name server records available for `hostname`(e.g. `['ns1.example.com', 'ns2.example.com']`).
|
|
362
482
|
* @since v0.1.90
|
|
363
483
|
*/
|
|
364
|
-
export function resolveNs(
|
|
484
|
+
export function resolveNs(
|
|
485
|
+
hostname: string,
|
|
486
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
487
|
+
): void;
|
|
365
488
|
export namespace resolveNs {
|
|
366
489
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
367
490
|
}
|
|
@@ -370,7 +493,10 @@ declare module 'node:dns' {
|
|
|
370
493
|
* be an array of strings containing the reply records.
|
|
371
494
|
* @since v6.0.0
|
|
372
495
|
*/
|
|
373
|
-
export function resolvePtr(
|
|
496
|
+
export function resolvePtr(
|
|
497
|
+
hostname: string,
|
|
498
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
499
|
+
): void;
|
|
374
500
|
export namespace resolvePtr {
|
|
375
501
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
376
502
|
}
|
|
@@ -400,7 +526,10 @@ declare module 'node:dns' {
|
|
|
400
526
|
* ```
|
|
401
527
|
* @since v0.11.10
|
|
402
528
|
*/
|
|
403
|
-
export function resolveSoa(
|
|
529
|
+
export function resolveSoa(
|
|
530
|
+
hostname: string,
|
|
531
|
+
callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void,
|
|
532
|
+
): void;
|
|
404
533
|
export namespace resolveSoa {
|
|
405
534
|
function __promisify__(hostname: string): Promise<SoaRecord>;
|
|
406
535
|
}
|
|
@@ -423,7 +552,10 @@ declare module 'node:dns' {
|
|
|
423
552
|
* ```
|
|
424
553
|
* @since v0.1.27
|
|
425
554
|
*/
|
|
426
|
-
export function resolveSrv(
|
|
555
|
+
export function resolveSrv(
|
|
556
|
+
hostname: string,
|
|
557
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
|
|
558
|
+
): void;
|
|
427
559
|
export namespace resolveSrv {
|
|
428
560
|
function __promisify__(hostname: string): Promise<SrvRecord[]>;
|
|
429
561
|
}
|
|
@@ -434,7 +566,10 @@ declare module 'node:dns' {
|
|
|
434
566
|
* treated separately.
|
|
435
567
|
* @since v0.1.27
|
|
436
568
|
*/
|
|
437
|
-
export function resolveTxt(
|
|
569
|
+
export function resolveTxt(
|
|
570
|
+
hostname: string,
|
|
571
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
|
|
572
|
+
): void;
|
|
438
573
|
export namespace resolveTxt {
|
|
439
574
|
function __promisify__(hostname: string): Promise<string[][]>;
|
|
440
575
|
}
|
|
@@ -468,7 +603,10 @@ declare module 'node:dns' {
|
|
|
468
603
|
* DNS server operators may choose not to respond to `ANY`queries. It may be better to call individual methods like {@link resolve4},{@link resolveMx}, and so on. For more details, see [RFC
|
|
469
604
|
* 8482](https://tools.ietf.org/html/rfc8482).
|
|
470
605
|
*/
|
|
471
|
-
export function resolveAny(
|
|
606
|
+
export function resolveAny(
|
|
607
|
+
hostname: string,
|
|
608
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
|
|
609
|
+
): void;
|
|
472
610
|
export namespace resolveAny {
|
|
473
611
|
function __promisify__(hostname: string): Promise<AnyRecord[]>;
|
|
474
612
|
}
|
|
@@ -480,7 +618,10 @@ declare module 'node:dns' {
|
|
|
480
618
|
* one of the `DNS error codes`.
|
|
481
619
|
* @since v0.1.16
|
|
482
620
|
*/
|
|
483
|
-
export function reverse(
|
|
621
|
+
export function reverse(
|
|
622
|
+
ip: string,
|
|
623
|
+
callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
|
|
624
|
+
): void;
|
|
484
625
|
/**
|
|
485
626
|
* Sets the IP address and port of servers to be used when performing DNS
|
|
486
627
|
* resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
|
|
@@ -536,7 +677,7 @@ declare module 'node:dns' {
|
|
|
536
677
|
* @since v14.18.0
|
|
537
678
|
* @param order must be 'ipv4first' or 'verbatim'.
|
|
538
679
|
*/
|
|
539
|
-
export function setDefaultResultOrder(order:
|
|
680
|
+
export function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;
|
|
540
681
|
// Error codes
|
|
541
682
|
export const NODATA: string;
|
|
542
683
|
export const FORMERR: string;
|
|
@@ -650,6 +791,6 @@ declare module 'node:dns' {
|
|
|
650
791
|
}
|
|
651
792
|
export { dnsPromises as promises };
|
|
652
793
|
}
|
|
653
|
-
declare module
|
|
654
|
-
export * from
|
|
794
|
+
declare module "node:dns" {
|
|
795
|
+
export * from "dns";
|
|
655
796
|
}
|
node v16.18/domain.d.ts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* @deprecated Since v1.4.2 - Deprecated
|
|
15
15
|
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/domain.js)
|
|
16
16
|
*/
|
|
17
|
-
declare module
|
|
18
|
-
import EventEmitter = require(
|
|
17
|
+
declare module "domain" {
|
|
18
|
+
import EventEmitter = require("node:events");
|
|
19
19
|
/**
|
|
20
20
|
* The `Domain` class encapsulates the functionality of routing errors and
|
|
21
21
|
* uncaught exceptions to the active `Domain` object.
|
|
@@ -165,6 +165,6 @@ declare module 'node:domain' {
|
|
|
165
165
|
}
|
|
166
166
|
function create(): Domain;
|
|
167
167
|
}
|
|
168
|
-
declare module
|
|
169
|
-
export * from
|
|
168
|
+
declare module "node:domain" {
|
|
169
|
+
export * from "domain";
|
|
170
170
|
}
|
node v16.18/events.d.ts
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* ```
|
|
35
35
|
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/events.js)
|
|
36
36
|
*/
|
|
37
|
-
declare module
|
|
37
|
+
declare module "events" {
|
|
38
38
|
interface EventEmitterOptions {
|
|
39
39
|
/**
|
|
40
40
|
* Enables automatic capturing of promise rejection.
|
|
@@ -50,7 +50,7 @@ declare module 'node:events' {
|
|
|
50
50
|
listener: (...args: any[]) => void,
|
|
51
51
|
opts?: {
|
|
52
52
|
once: boolean;
|
|
53
|
-
}
|
|
53
|
+
},
|
|
54
54
|
): any;
|
|
55
55
|
}
|
|
56
56
|
interface StaticEventEmitterOptions {
|
|
@@ -154,7 +154,11 @@ declare module 'node:events' {
|
|
|
154
154
|
* ```
|
|
155
155
|
* @since v11.13.0, v10.16.0
|
|
156
156
|
*/
|
|
157
|
-
static once(
|
|
157
|
+
static once(
|
|
158
|
+
emitter: NodeEventTarget,
|
|
159
|
+
eventName: string | symbol,
|
|
160
|
+
options?: StaticEventEmitterOptions,
|
|
161
|
+
): Promise<any[]>;
|
|
158
162
|
static once(emitter: DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;
|
|
159
163
|
/**
|
|
160
164
|
* ```js
|
|
@@ -214,7 +218,11 @@ declare module 'node:events' {
|
|
|
214
218
|
* @param eventName The name of the event being listened for
|
|
215
219
|
* @return that iterates `eventName` events emitted by the `emitter`
|
|
216
220
|
*/
|
|
217
|
-
static on(
|
|
221
|
+
static on(
|
|
222
|
+
emitter: NodeJS.EventEmitter,
|
|
223
|
+
eventName: string,
|
|
224
|
+
options?: StaticEventEmitterOptions,
|
|
225
|
+
): AsyncIterableIterator<any>;
|
|
218
226
|
/**
|
|
219
227
|
* A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`.
|
|
220
228
|
*
|
|
@@ -296,7 +304,7 @@ declare module 'node:events' {
|
|
|
296
304
|
static captureRejections: boolean;
|
|
297
305
|
static defaultMaxListeners: number;
|
|
298
306
|
}
|
|
299
|
-
import internal = require(
|
|
307
|
+
import internal = require("node:events");
|
|
300
308
|
namespace EventEmitter {
|
|
301
309
|
// Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
|
|
302
310
|
export { internal as EventEmitter };
|
|
@@ -635,7 +643,7 @@ declare module 'node:events' {
|
|
|
635
643
|
}
|
|
636
644
|
export = EventEmitter;
|
|
637
645
|
}
|
|
638
|
-
declare module
|
|
639
|
-
import events = require(
|
|
646
|
+
declare module "node:events" {
|
|
647
|
+
import events = require("events");
|
|
640
648
|
export = events;
|
|
641
649
|
}
|