@idlebox/stripe-node-types 24.0.14-patch.0 → 24.0.15
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.
- package/README.md +1 -1
- package/assert/strict.d.ts +113 -1
- package/assert.d.ts +162 -248
- package/async_hooks.d.ts +20 -5
- package/buffer.buffer.d.ts +24 -6
- package/buffer.d.ts +63 -168
- package/child_process.d.ts +117 -223
- package/cluster.d.ts +251 -329
- package/compatibility/iterators.d.ts +15 -0
- package/console.d.ts +60 -346
- package/constants.d.ts +15 -1
- package/crypto.d.ts +713 -1149
- package/dgram.d.ts +30 -50
- package/diagnostics_channel.d.ts +16 -3
- package/dns/promises.d.ts +15 -0
- package/dns.d.ts +150 -131
- package/domain.d.ts +25 -14
- package/events.d.ts +858 -719
- package/fs/promises.d.ts +117 -53
- package/fs.d.ts +729 -484
- package/globals.d.ts +142 -344
- package/globals.typedarray.d.ts +94 -0
- package/http.d.ts +358 -246
- package/http2.d.ts +578 -711
- package/https.d.ts +85 -216
- package/index.d.ts +39 -3
- package/inspector/promises.d.ts +54 -0
- package/inspector.d.ts +180 -3936
- package/inspector.generated.d.ts +4242 -0
- package/module.d.ts +60 -95
- package/my-shim.d.ts +15 -0
- package/net.d.ts +102 -186
- package/os.d.ts +32 -6
- package/package.json +3 -8
- package/path/posix.d.ts +20 -0
- package/path/win32.d.ts +20 -0
- package/path.d.ts +132 -122
- package/perf_hooks.d.ts +310 -644
- package/process.d.ts +192 -138
- package/punycode.d.ts +17 -2
- package/querystring.d.ts +16 -1
- package/quic.d.ts +926 -0
- package/readline/promises.d.ts +16 -1
- package/readline.d.ts +80 -118
- package/repl.d.ts +98 -96
- package/sea.d.ts +25 -1
- package/sqlite.d.ts +277 -13
- package/stream/consumers.d.ts +22 -7
- package/stream/promises.d.ts +148 -12
- package/stream/web.d.ts +187 -494
- package/stream.d.ts +608 -490
- package/string_decoder.d.ts +18 -3
- package/test/reporters.d.ts +112 -0
- package/test.d.ts +238 -199
- package/timers/promises.d.ts +16 -1
- package/timers.d.ts +16 -129
- package/tls.d.ts +163 -163
- package/trace_events.d.ts +21 -6
- package/ts5.6/buffer.buffer.d.ts +25 -8
- package/ts5.6/compatibility/float16array.d.ts +15 -0
- package/ts5.6/globals.typedarray.d.ts +31 -0
- package/ts5.6/index.d.ts +39 -3
- package/ts5.7/compatibility/float16array.d.ts +15 -0
- package/ts5.7/index.d.ts +39 -3
- package/tty.d.ts +70 -13
- package/undici-types/agent.d.ts +20 -4
- package/undici-types/api.d.ts +15 -0
- package/undici-types/balanced-pool.d.ts +15 -0
- package/undici-types/cache-interceptor.d.ts +15 -0
- package/undici-types/cache.d.ts +15 -0
- package/undici-types/client-stats.d.ts +31 -0
- package/undici-types/client.d.ts +21 -5
- package/undici-types/connector.d.ts +15 -0
- package/undici-types/content-type.d.ts +15 -0
- package/undici-types/cookies.d.ts +15 -0
- package/undici-types/diagnostics-channel.d.ts +24 -1
- package/undici-types/dispatcher.d.ts +18 -8
- package/undici-types/env-http-proxy-agent.d.ts +17 -1
- package/undici-types/errors.d.ts +20 -15
- package/undici-types/eventsource.d.ts +24 -4
- package/undici-types/fetch.d.ts +16 -0
- package/undici-types/formdata.d.ts +15 -0
- package/undici-types/global-dispatcher.d.ts +15 -0
- package/undici-types/global-origin.d.ts +15 -0
- package/undici-types/h2c-client.d.ts +15 -2
- package/undici-types/handlers.d.ts +16 -1
- package/undici-types/header.d.ts +15 -0
- package/undici-types/index.d.ts +21 -1
- package/undici-types/interceptors.d.ts +20 -0
- package/undici-types/mock-agent.d.ts +18 -0
- package/undici-types/mock-call-history.d.ts +15 -0
- package/undici-types/mock-client.d.ts +17 -0
- package/undici-types/mock-errors.d.ts +15 -0
- package/undici-types/mock-interceptor.d.ts +17 -1
- package/undici-types/mock-pool.d.ts +17 -0
- package/undici-types/package.json +1 -1
- package/undici-types/patch.d.ts +15 -0
- package/undici-types/pool-stats.d.ts +15 -0
- package/undici-types/pool.d.ts +17 -0
- package/undici-types/proxy-agent.d.ts +16 -0
- package/undici-types/readable.d.ts +15 -0
- package/undici-types/retry-agent.d.ts +15 -0
- package/undici-types/retry-handler.d.ts +24 -0
- package/undici-types/snapshot-agent.d.ts +125 -0
- package/undici-types/util.d.ts +15 -0
- package/undici-types/utility.d.ts +15 -0
- package/undici-types/webidl.d.ts +126 -36
- package/undici-types/websocket.d.ts +18 -1
- package/url.d.ts +107 -587
- package/util/types.d.ts +571 -0
- package/util.d.ts +158 -792
- package/v8.d.ts +82 -7
- package/vm.d.ts +267 -108
- package/wasi.d.ts +38 -2
- package/web-globals/abortcontroller.d.ts +75 -0
- package/web-globals/blob.d.ts +39 -0
- package/web-globals/console.d.ts +25 -0
- package/web-globals/crypto.d.ts +55 -0
- package/web-globals/domexception.d.ts +84 -0
- package/web-globals/encoding.d.ts +27 -0
- package/{dom-events.d.ts → web-globals/events.d.ts} +72 -50
- package/web-globals/fetch.d.ts +70 -0
- package/web-globals/importmeta.d.ts +29 -0
- package/web-globals/messaging.d.ts +39 -0
- package/web-globals/navigator.d.ts +41 -0
- package/web-globals/performance.d.ts +61 -0
- package/web-globals/storage.d.ts +40 -0
- package/web-globals/streams.d.ts +131 -0
- package/web-globals/timers.d.ts +60 -0
- package/web-globals/url.d.ts +40 -0
- package/worker_threads.d.ts +306 -349
- package/zlib.d.ts +59 -94
- package/ts5.1/compatibility/disposable.d.ts +0 -13
- package/ts5.1/index.d.ts +0 -100
package/dns.d.ts
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
// biome-ignore-all lint: generated file
|
|
2
|
+
// biome-ignore-all assist: generated file
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
* GENERATED FILE, DO NOT MODIFY
|
|
8
|
+
* 这是生成的文件,千万不要修改
|
|
9
|
+
*
|
|
10
|
+
* @build-script/codegen - The Simple Code Generater
|
|
11
|
+
* https://github.com/GongT/baobao
|
|
12
|
+
*
|
|
13
|
+
******************************************************************************/
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
/**
|
|
2
17
|
* The `node:dns` module enables name resolution. For example, use it to look up IP
|
|
3
18
|
* addresses of host names.
|
|
@@ -41,29 +56,28 @@
|
|
|
41
56
|
* });
|
|
42
57
|
* ```
|
|
43
58
|
*
|
|
44
|
-
* See the [Implementation considerations section](https://nodejs.org/docs/latest-
|
|
45
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
59
|
+
* See the [Implementation considerations section](https://nodejs.org/docs/latest-v25.x/api/dns.html#implementation-considerations) for more information.
|
|
60
|
+
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/dns.js)
|
|
46
61
|
*/
|
|
47
62
|
|
|
48
63
|
declare module "_not-use-node-type_dns" {
|
|
49
|
-
import * as dnsPromises from 'node:dns/promises';
|
|
50
64
|
// Supported getaddrinfo flags.
|
|
51
65
|
/**
|
|
52
66
|
* Limits returned address types to the types of non-loopback addresses configured on the system. For example, IPv4 addresses are
|
|
53
67
|
* only returned if the current system has at least one IPv4 address configured.
|
|
54
68
|
*/
|
|
55
|
-
|
|
69
|
+
const ADDRCONFIG: number;
|
|
56
70
|
/**
|
|
57
71
|
* If the IPv6 family was specified, but no IPv6 addresses were found, then return IPv4 mapped IPv6 addresses. It is not supported
|
|
58
72
|
* on some operating systems (e.g. FreeBSD 10.1).
|
|
59
73
|
*/
|
|
60
|
-
|
|
74
|
+
const V4MAPPED: number;
|
|
61
75
|
/**
|
|
62
76
|
* If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
|
|
63
77
|
* well as IPv4 mapped IPv6 addresses.
|
|
64
78
|
*/
|
|
65
|
-
|
|
66
|
-
|
|
79
|
+
const ALL: number;
|
|
80
|
+
interface LookupOptions {
|
|
67
81
|
/**
|
|
68
82
|
* The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted
|
|
69
83
|
* as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used
|
|
@@ -72,7 +86,7 @@ declare module "_not-use-node-type_dns" {
|
|
|
72
86
|
*/
|
|
73
87
|
family?: number | "IPv4" | "IPv6" | undefined;
|
|
74
88
|
/**
|
|
75
|
-
* One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-
|
|
89
|
+
* One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v25.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
|
|
76
90
|
* passed by bitwise `OR`ing their values.
|
|
77
91
|
*/
|
|
78
92
|
hints?: number | undefined;
|
|
@@ -85,7 +99,7 @@ declare module "_not-use-node-type_dns" {
|
|
|
85
99
|
* When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted
|
|
86
100
|
* by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6
|
|
87
101
|
* addresses before IPv4 addresses. Default value is configurable using
|
|
88
|
-
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-
|
|
102
|
+
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--dns-result-orderorder).
|
|
89
103
|
* @default `verbatim` (addresses are not reordered)
|
|
90
104
|
* @since v22.1.0
|
|
91
105
|
*/
|
|
@@ -99,13 +113,13 @@ declare module "_not-use-node-type_dns" {
|
|
|
99
113
|
*/
|
|
100
114
|
verbatim?: boolean | undefined;
|
|
101
115
|
}
|
|
102
|
-
|
|
116
|
+
interface LookupOneOptions extends LookupOptions {
|
|
103
117
|
all?: false | undefined;
|
|
104
118
|
}
|
|
105
|
-
|
|
119
|
+
interface LookupAllOptions extends LookupOptions {
|
|
106
120
|
all: true;
|
|
107
121
|
}
|
|
108
|
-
|
|
122
|
+
interface LookupAddress {
|
|
109
123
|
/**
|
|
110
124
|
* A string representation of an IPv4 or IPv6 address.
|
|
111
125
|
*/
|
|
@@ -134,7 +148,7 @@ declare module "_not-use-node-type_dns" {
|
|
|
134
148
|
* The implementation uses an operating system facility that can associate names
|
|
135
149
|
* with addresses and vice versa. This implementation can have subtle but
|
|
136
150
|
* important consequences on the behavior of any Node.js program. Please take some
|
|
137
|
-
* time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-
|
|
151
|
+
* time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v25.x/api/dns.html#implementation-considerations)
|
|
138
152
|
* before using `dns.lookup()`.
|
|
139
153
|
*
|
|
140
154
|
* Example usage:
|
|
@@ -156,35 +170,35 @@ declare module "_not-use-node-type_dns" {
|
|
|
156
170
|
* // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
|
|
157
171
|
* ```
|
|
158
172
|
*
|
|
159
|
-
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-
|
|
173
|
+
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v25.x/api/util.html#utilpromisifyoriginal) ed
|
|
160
174
|
* version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties.
|
|
161
175
|
* @since v0.1.90
|
|
162
176
|
*/
|
|
163
|
-
|
|
177
|
+
function lookup(
|
|
164
178
|
hostname: string,
|
|
165
179
|
family: number,
|
|
166
180
|
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
|
167
181
|
): void;
|
|
168
|
-
|
|
182
|
+
function lookup(
|
|
169
183
|
hostname: string,
|
|
170
184
|
options: LookupOneOptions,
|
|
171
185
|
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
|
172
186
|
): void;
|
|
173
|
-
|
|
187
|
+
function lookup(
|
|
174
188
|
hostname: string,
|
|
175
189
|
options: LookupAllOptions,
|
|
176
190
|
callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void,
|
|
177
191
|
): void;
|
|
178
|
-
|
|
192
|
+
function lookup(
|
|
179
193
|
hostname: string,
|
|
180
194
|
options: LookupOptions,
|
|
181
195
|
callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void,
|
|
182
196
|
): void;
|
|
183
|
-
|
|
197
|
+
function lookup(
|
|
184
198
|
hostname: string,
|
|
185
199
|
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
|
|
186
200
|
): void;
|
|
187
|
-
|
|
201
|
+
namespace lookup {
|
|
188
202
|
function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
|
|
189
203
|
function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
|
|
190
204
|
function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
|
|
@@ -196,7 +210,7 @@ declare module "_not-use-node-type_dns" {
|
|
|
196
210
|
* If `address` is not a valid IP address, a `TypeError` will be thrown.
|
|
197
211
|
* The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown.
|
|
198
212
|
*
|
|
199
|
-
* On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-
|
|
213
|
+
* On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object,
|
|
200
214
|
* where `err.code` is the error code.
|
|
201
215
|
*
|
|
202
216
|
* ```js
|
|
@@ -207,16 +221,16 @@ declare module "_not-use-node-type_dns" {
|
|
|
207
221
|
* });
|
|
208
222
|
* ```
|
|
209
223
|
*
|
|
210
|
-
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-
|
|
224
|
+
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v25.x/api/util.html#utilpromisifyoriginal) ed
|
|
211
225
|
* version, it returns a `Promise` for an `Object` with `hostname` and `service` properties.
|
|
212
226
|
* @since v0.11.14
|
|
213
227
|
*/
|
|
214
|
-
|
|
228
|
+
function lookupService(
|
|
215
229
|
address: string,
|
|
216
230
|
port: number,
|
|
217
231
|
callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void,
|
|
218
232
|
): void;
|
|
219
|
-
|
|
233
|
+
namespace lookupService {
|
|
220
234
|
function __promisify__(
|
|
221
235
|
address: string,
|
|
222
236
|
port: number,
|
|
@@ -225,25 +239,23 @@ declare module "_not-use-node-type_dns" {
|
|
|
225
239
|
service: string;
|
|
226
240
|
}>;
|
|
227
241
|
}
|
|
228
|
-
|
|
242
|
+
interface ResolveOptions {
|
|
229
243
|
ttl: boolean;
|
|
230
244
|
}
|
|
231
|
-
|
|
245
|
+
interface ResolveWithTtlOptions extends ResolveOptions {
|
|
232
246
|
ttl: true;
|
|
233
247
|
}
|
|
234
|
-
|
|
248
|
+
interface RecordWithTtl {
|
|
235
249
|
address: string;
|
|
236
250
|
ttl: number;
|
|
237
251
|
}
|
|
238
|
-
|
|
239
|
-
export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
|
|
240
|
-
export interface AnyARecord extends RecordWithTtl {
|
|
252
|
+
interface AnyARecord extends RecordWithTtl {
|
|
241
253
|
type: "A";
|
|
242
254
|
}
|
|
243
|
-
|
|
255
|
+
interface AnyAaaaRecord extends RecordWithTtl {
|
|
244
256
|
type: "AAAA";
|
|
245
257
|
}
|
|
246
|
-
|
|
258
|
+
interface CaaRecord {
|
|
247
259
|
critical: number;
|
|
248
260
|
issue?: string | undefined;
|
|
249
261
|
issuewild?: string | undefined;
|
|
@@ -251,17 +263,17 @@ declare module "_not-use-node-type_dns" {
|
|
|
251
263
|
contactemail?: string | undefined;
|
|
252
264
|
contactphone?: string | undefined;
|
|
253
265
|
}
|
|
254
|
-
|
|
266
|
+
interface AnyCaaRecord extends CaaRecord {
|
|
255
267
|
type: "CAA";
|
|
256
268
|
}
|
|
257
|
-
|
|
269
|
+
interface MxRecord {
|
|
258
270
|
priority: number;
|
|
259
271
|
exchange: string;
|
|
260
272
|
}
|
|
261
|
-
|
|
273
|
+
interface AnyMxRecord extends MxRecord {
|
|
262
274
|
type: "MX";
|
|
263
275
|
}
|
|
264
|
-
|
|
276
|
+
interface NaptrRecord {
|
|
265
277
|
flags: string;
|
|
266
278
|
service: string;
|
|
267
279
|
regexp: string;
|
|
@@ -269,10 +281,10 @@ declare module "_not-use-node-type_dns" {
|
|
|
269
281
|
order: number;
|
|
270
282
|
preference: number;
|
|
271
283
|
}
|
|
272
|
-
|
|
284
|
+
interface AnyNaptrRecord extends NaptrRecord {
|
|
273
285
|
type: "NAPTR";
|
|
274
286
|
}
|
|
275
|
-
|
|
287
|
+
interface SoaRecord {
|
|
276
288
|
nsname: string;
|
|
277
289
|
hostmaster: string;
|
|
278
290
|
serial: number;
|
|
@@ -281,44 +293,44 @@ declare module "_not-use-node-type_dns" {
|
|
|
281
293
|
expire: number;
|
|
282
294
|
minttl: number;
|
|
283
295
|
}
|
|
284
|
-
|
|
296
|
+
interface AnySoaRecord extends SoaRecord {
|
|
285
297
|
type: "SOA";
|
|
286
298
|
}
|
|
287
|
-
|
|
299
|
+
interface SrvRecord {
|
|
288
300
|
priority: number;
|
|
289
301
|
weight: number;
|
|
290
302
|
port: number;
|
|
291
303
|
name: string;
|
|
292
304
|
}
|
|
293
|
-
|
|
305
|
+
interface AnySrvRecord extends SrvRecord {
|
|
294
306
|
type: "SRV";
|
|
295
307
|
}
|
|
296
|
-
|
|
308
|
+
interface TlsaRecord {
|
|
297
309
|
certUsage: number;
|
|
298
310
|
selector: number;
|
|
299
311
|
match: number;
|
|
300
312
|
data: ArrayBuffer;
|
|
301
313
|
}
|
|
302
|
-
|
|
314
|
+
interface AnyTlsaRecord extends TlsaRecord {
|
|
303
315
|
type: "TLSA";
|
|
304
316
|
}
|
|
305
|
-
|
|
317
|
+
interface AnyTxtRecord {
|
|
306
318
|
type: "TXT";
|
|
307
319
|
entries: string[];
|
|
308
320
|
}
|
|
309
|
-
|
|
321
|
+
interface AnyNsRecord {
|
|
310
322
|
type: "NS";
|
|
311
323
|
value: string;
|
|
312
324
|
}
|
|
313
|
-
|
|
325
|
+
interface AnyPtrRecord {
|
|
314
326
|
type: "PTR";
|
|
315
327
|
value: string;
|
|
316
328
|
}
|
|
317
|
-
|
|
329
|
+
interface AnyCnameRecord {
|
|
318
330
|
type: "CNAME";
|
|
319
331
|
value: string;
|
|
320
332
|
}
|
|
321
|
-
|
|
333
|
+
type AnyRecord =
|
|
322
334
|
| AnyARecord
|
|
323
335
|
| AnyAaaaRecord
|
|
324
336
|
| AnyCaaRecord
|
|
@@ -338,62 +350,62 @@ declare module "_not-use-node-type_dns" {
|
|
|
338
350
|
*
|
|
339
351
|
* <omitted>
|
|
340
352
|
*
|
|
341
|
-
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-
|
|
353
|
+
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object,
|
|
342
354
|
* where `err.code` is one of the `DNS error codes`.
|
|
343
355
|
* @since v0.1.27
|
|
344
356
|
* @param hostname Host name to resolve.
|
|
345
357
|
* @param [rrtype='A'] Resource record type.
|
|
346
358
|
*/
|
|
347
|
-
|
|
359
|
+
function resolve(
|
|
348
360
|
hostname: string,
|
|
349
361
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
350
362
|
): void;
|
|
351
|
-
|
|
363
|
+
function resolve(
|
|
352
364
|
hostname: string,
|
|
353
365
|
rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR",
|
|
354
366
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
355
367
|
): void;
|
|
356
|
-
|
|
368
|
+
function resolve(
|
|
357
369
|
hostname: string,
|
|
358
370
|
rrtype: "ANY",
|
|
359
371
|
callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
|
|
360
372
|
): void;
|
|
361
|
-
|
|
373
|
+
function resolve(
|
|
362
374
|
hostname: string,
|
|
363
375
|
rrtype: "CAA",
|
|
364
376
|
callback: (err: NodeJS.ErrnoException | null, address: CaaRecord[]) => void,
|
|
365
377
|
): void;
|
|
366
|
-
|
|
378
|
+
function resolve(
|
|
367
379
|
hostname: string,
|
|
368
380
|
rrtype: "MX",
|
|
369
381
|
callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
|
|
370
382
|
): void;
|
|
371
|
-
|
|
383
|
+
function resolve(
|
|
372
384
|
hostname: string,
|
|
373
385
|
rrtype: "NAPTR",
|
|
374
386
|
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
|
|
375
387
|
): void;
|
|
376
|
-
|
|
388
|
+
function resolve(
|
|
377
389
|
hostname: string,
|
|
378
390
|
rrtype: "SOA",
|
|
379
391
|
callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void,
|
|
380
392
|
): void;
|
|
381
|
-
|
|
393
|
+
function resolve(
|
|
382
394
|
hostname: string,
|
|
383
395
|
rrtype: "SRV",
|
|
384
396
|
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
|
|
385
397
|
): void;
|
|
386
|
-
|
|
398
|
+
function resolve(
|
|
387
399
|
hostname: string,
|
|
388
400
|
rrtype: "TLSA",
|
|
389
401
|
callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void,
|
|
390
402
|
): void;
|
|
391
|
-
|
|
403
|
+
function resolve(
|
|
392
404
|
hostname: string,
|
|
393
405
|
rrtype: "TXT",
|
|
394
406
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
|
|
395
407
|
): void;
|
|
396
|
-
|
|
408
|
+
function resolve(
|
|
397
409
|
hostname: string,
|
|
398
410
|
rrtype: string,
|
|
399
411
|
callback: (
|
|
@@ -410,7 +422,7 @@ declare module "_not-use-node-type_dns" {
|
|
|
410
422
|
| AnyRecord[],
|
|
411
423
|
) => void,
|
|
412
424
|
): void;
|
|
413
|
-
|
|
425
|
+
namespace resolve {
|
|
414
426
|
function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
|
|
415
427
|
function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
|
|
416
428
|
function __promisify__(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
|
|
@@ -441,21 +453,21 @@ declare module "_not-use-node-type_dns" {
|
|
|
441
453
|
* @since v0.1.16
|
|
442
454
|
* @param hostname Host name to resolve.
|
|
443
455
|
*/
|
|
444
|
-
|
|
456
|
+
function resolve4(
|
|
445
457
|
hostname: string,
|
|
446
458
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
447
459
|
): void;
|
|
448
|
-
|
|
460
|
+
function resolve4(
|
|
449
461
|
hostname: string,
|
|
450
462
|
options: ResolveWithTtlOptions,
|
|
451
463
|
callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
|
|
452
464
|
): void;
|
|
453
|
-
|
|
465
|
+
function resolve4(
|
|
454
466
|
hostname: string,
|
|
455
467
|
options: ResolveOptions,
|
|
456
468
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
|
|
457
469
|
): void;
|
|
458
|
-
|
|
470
|
+
namespace resolve4 {
|
|
459
471
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
460
472
|
function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
|
|
461
473
|
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
@@ -466,21 +478,21 @@ declare module "_not-use-node-type_dns" {
|
|
|
466
478
|
* @since v0.1.16
|
|
467
479
|
* @param hostname Host name to resolve.
|
|
468
480
|
*/
|
|
469
|
-
|
|
481
|
+
function resolve6(
|
|
470
482
|
hostname: string,
|
|
471
483
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
472
484
|
): void;
|
|
473
|
-
|
|
485
|
+
function resolve6(
|
|
474
486
|
hostname: string,
|
|
475
487
|
options: ResolveWithTtlOptions,
|
|
476
488
|
callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
|
|
477
489
|
): void;
|
|
478
|
-
|
|
490
|
+
function resolve6(
|
|
479
491
|
hostname: string,
|
|
480
492
|
options: ResolveOptions,
|
|
481
493
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
|
|
482
494
|
): void;
|
|
483
|
-
|
|
495
|
+
namespace resolve6 {
|
|
484
496
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
485
497
|
function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
|
|
486
498
|
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
@@ -490,11 +502,11 @@ declare module "_not-use-node-type_dns" {
|
|
|
490
502
|
* will contain an array of canonical name records available for the `hostname` (e.g. `['bar.example.com']`).
|
|
491
503
|
* @since v0.3.2
|
|
492
504
|
*/
|
|
493
|
-
|
|
505
|
+
function resolveCname(
|
|
494
506
|
hostname: string,
|
|
495
507
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
496
508
|
): void;
|
|
497
|
-
|
|
509
|
+
namespace resolveCname {
|
|
498
510
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
499
511
|
}
|
|
500
512
|
/**
|
|
@@ -503,11 +515,11 @@ declare module "_not-use-node-type_dns" {
|
|
|
503
515
|
* available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
|
|
504
516
|
* @since v15.0.0, v14.17.0
|
|
505
517
|
*/
|
|
506
|
-
|
|
518
|
+
function resolveCaa(
|
|
507
519
|
hostname: string,
|
|
508
520
|
callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void,
|
|
509
521
|
): void;
|
|
510
|
-
|
|
522
|
+
namespace resolveCaa {
|
|
511
523
|
function __promisify__(hostname: string): Promise<CaaRecord[]>;
|
|
512
524
|
}
|
|
513
525
|
/**
|
|
@@ -515,11 +527,11 @@ declare module "_not-use-node-type_dns" {
|
|
|
515
527
|
* contain an array of objects containing both a `priority` and `exchange` property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
|
|
516
528
|
* @since v0.1.27
|
|
517
529
|
*/
|
|
518
|
-
|
|
530
|
+
function resolveMx(
|
|
519
531
|
hostname: string,
|
|
520
532
|
callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
|
|
521
533
|
): void;
|
|
522
|
-
|
|
534
|
+
namespace resolveMx {
|
|
523
535
|
function __promisify__(hostname: string): Promise<MxRecord[]>;
|
|
524
536
|
}
|
|
525
537
|
/**
|
|
@@ -545,11 +557,11 @@ declare module "_not-use-node-type_dns" {
|
|
|
545
557
|
* ```
|
|
546
558
|
* @since v0.9.12
|
|
547
559
|
*/
|
|
548
|
-
|
|
560
|
+
function resolveNaptr(
|
|
549
561
|
hostname: string,
|
|
550
562
|
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
|
|
551
563
|
): void;
|
|
552
|
-
|
|
564
|
+
namespace resolveNaptr {
|
|
553
565
|
function __promisify__(hostname: string): Promise<NaptrRecord[]>;
|
|
554
566
|
}
|
|
555
567
|
/**
|
|
@@ -557,11 +569,11 @@ declare module "_not-use-node-type_dns" {
|
|
|
557
569
|
* contain an array of name server records available for `hostname` (e.g. `['ns1.example.com', 'ns2.example.com']`).
|
|
558
570
|
* @since v0.1.90
|
|
559
571
|
*/
|
|
560
|
-
|
|
572
|
+
function resolveNs(
|
|
561
573
|
hostname: string,
|
|
562
574
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
563
575
|
): void;
|
|
564
|
-
|
|
576
|
+
namespace resolveNs {
|
|
565
577
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
566
578
|
}
|
|
567
579
|
/**
|
|
@@ -569,11 +581,11 @@ declare module "_not-use-node-type_dns" {
|
|
|
569
581
|
* be an array of strings containing the reply records.
|
|
570
582
|
* @since v6.0.0
|
|
571
583
|
*/
|
|
572
|
-
|
|
584
|
+
function resolvePtr(
|
|
573
585
|
hostname: string,
|
|
574
586
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
|
|
575
587
|
): void;
|
|
576
|
-
|
|
588
|
+
namespace resolvePtr {
|
|
577
589
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
578
590
|
}
|
|
579
591
|
/**
|
|
@@ -602,11 +614,11 @@ declare module "_not-use-node-type_dns" {
|
|
|
602
614
|
* ```
|
|
603
615
|
* @since v0.11.10
|
|
604
616
|
*/
|
|
605
|
-
|
|
617
|
+
function resolveSoa(
|
|
606
618
|
hostname: string,
|
|
607
619
|
callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void,
|
|
608
620
|
): void;
|
|
609
|
-
|
|
621
|
+
namespace resolveSoa {
|
|
610
622
|
function __promisify__(hostname: string): Promise<SoaRecord>;
|
|
611
623
|
}
|
|
612
624
|
/**
|
|
@@ -628,11 +640,11 @@ declare module "_not-use-node-type_dns" {
|
|
|
628
640
|
* ```
|
|
629
641
|
* @since v0.1.27
|
|
630
642
|
*/
|
|
631
|
-
|
|
643
|
+
function resolveSrv(
|
|
632
644
|
hostname: string,
|
|
633
645
|
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
|
|
634
646
|
): void;
|
|
635
|
-
|
|
647
|
+
namespace resolveSrv {
|
|
636
648
|
function __promisify__(hostname: string): Promise<SrvRecord[]>;
|
|
637
649
|
}
|
|
638
650
|
/**
|
|
@@ -655,11 +667,11 @@ declare module "_not-use-node-type_dns" {
|
|
|
655
667
|
* ```
|
|
656
668
|
* @since v23.9.0, v22.15.0
|
|
657
669
|
*/
|
|
658
|
-
|
|
670
|
+
function resolveTlsa(
|
|
659
671
|
hostname: string,
|
|
660
672
|
callback: (err: NodeJS.ErrnoException | null, addresses: TlsaRecord[]) => void,
|
|
661
673
|
): void;
|
|
662
|
-
|
|
674
|
+
namespace resolveTlsa {
|
|
663
675
|
function __promisify__(hostname: string): Promise<TlsaRecord[]>;
|
|
664
676
|
}
|
|
665
677
|
/**
|
|
@@ -669,11 +681,11 @@ declare module "_not-use-node-type_dns" {
|
|
|
669
681
|
* treated separately.
|
|
670
682
|
* @since v0.1.27
|
|
671
683
|
*/
|
|
672
|
-
|
|
684
|
+
function resolveTxt(
|
|
673
685
|
hostname: string,
|
|
674
686
|
callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
|
|
675
687
|
): void;
|
|
676
|
-
|
|
688
|
+
namespace resolveTxt {
|
|
677
689
|
function __promisify__(hostname: string): Promise<string[][]>;
|
|
678
690
|
}
|
|
679
691
|
/**
|
|
@@ -706,27 +718,27 @@ declare module "_not-use-node-type_dns" {
|
|
|
706
718
|
* 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
|
|
707
719
|
* [RFC 8482](https://tools.ietf.org/html/rfc8482).
|
|
708
720
|
*/
|
|
709
|
-
|
|
721
|
+
function resolveAny(
|
|
710
722
|
hostname: string,
|
|
711
723
|
callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
|
|
712
724
|
): void;
|
|
713
|
-
|
|
725
|
+
namespace resolveAny {
|
|
714
726
|
function __promisify__(hostname: string): Promise<AnyRecord[]>;
|
|
715
727
|
}
|
|
716
728
|
/**
|
|
717
729
|
* Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
|
|
718
730
|
* array of host names.
|
|
719
731
|
*
|
|
720
|
-
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-
|
|
721
|
-
* one of the [DNS error codes](https://nodejs.org/docs/latest-
|
|
732
|
+
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) object, where `err.code` is
|
|
733
|
+
* one of the [DNS error codes](https://nodejs.org/docs/latest-v25.x/api/dns.html#error-codes).
|
|
722
734
|
* @since v0.1.16
|
|
723
735
|
*/
|
|
724
|
-
|
|
736
|
+
function reverse(
|
|
725
737
|
ip: string,
|
|
726
738
|
callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
|
|
727
739
|
): void;
|
|
728
740
|
/**
|
|
729
|
-
* Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-
|
|
741
|
+
* Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnspromiseslookuphostname-options).
|
|
730
742
|
* The value could be:
|
|
731
743
|
*
|
|
732
744
|
* * `ipv4first`: for `order` defaulting to `ipv4first`.
|
|
@@ -734,7 +746,7 @@ declare module "_not-use-node-type_dns" {
|
|
|
734
746
|
* * `verbatim`: for `order` defaulting to `verbatim`.
|
|
735
747
|
* @since v18.17.0
|
|
736
748
|
*/
|
|
737
|
-
|
|
749
|
+
function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim";
|
|
738
750
|
/**
|
|
739
751
|
* Sets the IP address and port of servers to be used when performing DNS
|
|
740
752
|
* resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
|
|
@@ -763,7 +775,7 @@ declare module "_not-use-node-type_dns" {
|
|
|
763
775
|
* @since v0.11.3
|
|
764
776
|
* @param servers array of [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952#section-6) formatted addresses
|
|
765
777
|
*/
|
|
766
|
-
|
|
778
|
+
function setServers(servers: readonly string[]): void;
|
|
767
779
|
/**
|
|
768
780
|
* Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
|
|
769
781
|
* that are currently configured for DNS resolution. A string will include a port
|
|
@@ -779,9 +791,9 @@ declare module "_not-use-node-type_dns" {
|
|
|
779
791
|
* ```
|
|
780
792
|
* @since v0.11.3
|
|
781
793
|
*/
|
|
782
|
-
|
|
794
|
+
function getServers(): string[];
|
|
783
795
|
/**
|
|
784
|
-
* Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-
|
|
796
|
+
* Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnspromiseslookuphostname-options).
|
|
785
797
|
* The value could be:
|
|
786
798
|
*
|
|
787
799
|
* * `ipv4first`: sets default `order` to `ipv4first`.
|
|
@@ -789,39 +801,39 @@ declare module "_not-use-node-type_dns" {
|
|
|
789
801
|
* * `verbatim`: sets default `order` to `verbatim`.
|
|
790
802
|
*
|
|
791
803
|
* The default is `verbatim` and {@link setDefaultResultOrder} have higher
|
|
792
|
-
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-
|
|
793
|
-
* [worker threads](https://nodejs.org/docs/latest-
|
|
804
|
+
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v25.x/api/cli.html#--dns-result-orderorder). When using
|
|
805
|
+
* [worker threads](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
|
|
794
806
|
* thread won't affect the default dns orders in workers.
|
|
795
807
|
* @since v16.4.0, v14.18.0
|
|
796
808
|
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
|
|
797
809
|
*/
|
|
798
|
-
|
|
810
|
+
function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
|
|
799
811
|
// Error codes
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
812
|
+
const NODATA: "ENODATA";
|
|
813
|
+
const FORMERR: "EFORMERR";
|
|
814
|
+
const SERVFAIL: "ESERVFAIL";
|
|
815
|
+
const NOTFOUND: "ENOTFOUND";
|
|
816
|
+
const NOTIMP: "ENOTIMP";
|
|
817
|
+
const REFUSED: "EREFUSED";
|
|
818
|
+
const BADQUERY: "EBADQUERY";
|
|
819
|
+
const BADNAME: "EBADNAME";
|
|
820
|
+
const BADFAMILY: "EBADFAMILY";
|
|
821
|
+
const BADRESP: "EBADRESP";
|
|
822
|
+
const CONNREFUSED: "ECONNREFUSED";
|
|
823
|
+
const TIMEOUT: "ETIMEOUT";
|
|
824
|
+
const EOF: "EOF";
|
|
825
|
+
const FILE: "EFILE";
|
|
826
|
+
const NOMEM: "ENOMEM";
|
|
827
|
+
const DESTRUCTION: "EDESTRUCTION";
|
|
828
|
+
const BADSTR: "EBADSTR";
|
|
829
|
+
const BADFLAGS: "EBADFLAGS";
|
|
830
|
+
const NONAME: "ENONAME";
|
|
831
|
+
const BADHINTS: "EBADHINTS";
|
|
832
|
+
const NOTINITIALIZED: "ENOTINITIALIZED";
|
|
833
|
+
const LOADIPHLPAPI: "ELOADIPHLPAPI";
|
|
834
|
+
const ADDRGETNETWORKPARAMS: "EADDRGETNETWORKPARAMS";
|
|
835
|
+
const CANCELLED: "ECANCELLED";
|
|
836
|
+
interface ResolverOptions {
|
|
825
837
|
/**
|
|
826
838
|
* Query timeout in milliseconds, or `-1` to use the default timeout.
|
|
827
839
|
*/
|
|
@@ -830,13 +842,18 @@ declare module "_not-use-node-type_dns" {
|
|
|
830
842
|
* The number of tries the resolver will try contacting each name server before giving up.
|
|
831
843
|
* @default 4
|
|
832
844
|
*/
|
|
833
|
-
tries?: number;
|
|
845
|
+
tries?: number | undefined;
|
|
846
|
+
/**
|
|
847
|
+
* The max retry timeout, in milliseconds.
|
|
848
|
+
* @default 0
|
|
849
|
+
*/
|
|
850
|
+
maxTimeout?: number | undefined;
|
|
834
851
|
}
|
|
835
852
|
/**
|
|
836
853
|
* An independent resolver for DNS requests.
|
|
837
854
|
*
|
|
838
855
|
* Creating a new resolver uses the default server settings. Setting
|
|
839
|
-
* the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-
|
|
856
|
+
* the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v25.x/api/dns.html#dnssetserversservers) does not affect
|
|
840
857
|
* other resolvers:
|
|
841
858
|
*
|
|
842
859
|
* ```js
|
|
@@ -870,7 +887,7 @@ declare module "_not-use-node-type_dns" {
|
|
|
870
887
|
* * `resolver.setServers()`
|
|
871
888
|
* @since v8.3.0
|
|
872
889
|
*/
|
|
873
|
-
|
|
890
|
+
class Resolver {
|
|
874
891
|
constructor(options?: ResolverOptions);
|
|
875
892
|
/**
|
|
876
893
|
* Cancel all outstanding DNS queries made by this resolver. The corresponding
|
|
@@ -912,5 +929,7 @@ declare module "_not-use-node-type_dns" {
|
|
|
912
929
|
setLocalAddress(ipv4?: string, ipv6?: string): void;
|
|
913
930
|
setServers: typeof setServers;
|
|
914
931
|
}
|
|
915
|
-
|
|
932
|
+
}
|
|
933
|
+
declare module "_not-use-node-type_dns" {
|
|
934
|
+
export * as promises from "node:dns/promises";
|
|
916
935
|
}
|