m06_task3.js 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. package/.idea/.name +1 -0
  2. package/.idea/inspectionProfiles/Project_Default.xml +10 -0
  3. package/.idea/jsLibraryMappings.xml +6 -0
  4. package/.idea/modules.xml +8 -0
  5. package/.idea/node_lab_6.iml +12 -0
  6. package/06_task2.html +73 -0
  7. package/06_task2.js +52 -0
  8. package/06_task3.js +3 -0
  9. package/06_task4.js +3 -0
  10. package/m06_task3.js +28 -0
  11. package/package/index.js +28 -0
  12. package/package/node_modules/.package-lock.json +31 -0
  13. package/package/node_modules/@types/node/LICENSE +21 -0
  14. package/package/node_modules/@types/node/README.md +16 -0
  15. package/package/node_modules/@types/node/assert/strict.d.ts +8 -0
  16. package/package/node_modules/@types/node/assert.d.ts +961 -0
  17. package/package/node_modules/@types/node/async_hooks.d.ts +501 -0
  18. package/package/node_modules/@types/node/buffer.d.ts +2258 -0
  19. package/package/node_modules/@types/node/child_process.d.ts +1369 -0
  20. package/package/node_modules/@types/node/cluster.d.ts +410 -0
  21. package/package/node_modules/@types/node/console.d.ts +412 -0
  22. package/package/node_modules/@types/node/constants.d.ts +18 -0
  23. package/package/node_modules/@types/node/crypto.d.ts +3964 -0
  24. package/package/node_modules/@types/node/dgram.d.ts +545 -0
  25. package/package/node_modules/@types/node/diagnostics_channel.d.ts +153 -0
  26. package/package/node_modules/@types/node/dns/promises.d.ts +370 -0
  27. package/package/node_modules/@types/node/dns.d.ts +659 -0
  28. package/package/node_modules/@types/node/dom-events.d.ts +126 -0
  29. package/package/node_modules/@types/node/domain.d.ts +170 -0
  30. package/package/node_modules/@types/node/events.d.ts +678 -0
  31. package/package/node_modules/@types/node/fs/promises.d.ts +1138 -0
  32. package/package/node_modules/@types/node/fs.d.ts +3872 -0
  33. package/package/node_modules/@types/node/globals.d.ts +300 -0
  34. package/package/node_modules/@types/node/globals.global.d.ts +1 -0
  35. package/package/node_modules/@types/node/http.d.ts +1614 -0
  36. package/package/node_modules/@types/node/http2.d.ts +2134 -0
  37. package/package/node_modules/@types/node/https.d.ts +541 -0
  38. package/package/node_modules/@types/node/index.d.ts +133 -0
  39. package/package/node_modules/@types/node/inspector.d.ts +2741 -0
  40. package/package/node_modules/@types/node/module.d.ts +114 -0
  41. package/package/node_modules/@types/node/net.d.ts +869 -0
  42. package/package/node_modules/@types/node/os.d.ts +466 -0
  43. package/package/node_modules/@types/node/package.json +232 -0
  44. package/package/node_modules/@types/node/path.d.ts +191 -0
  45. package/package/node_modules/@types/node/perf_hooks.d.ts +625 -0
  46. package/package/node_modules/@types/node/process.d.ts +1482 -0
  47. package/package/node_modules/@types/node/punycode.d.ts +117 -0
  48. package/package/node_modules/@types/node/querystring.d.ts +131 -0
  49. package/package/node_modules/@types/node/readline/promises.d.ts +143 -0
  50. package/package/node_modules/@types/node/readline.d.ts +653 -0
  51. package/package/node_modules/@types/node/repl.d.ts +424 -0
  52. package/package/node_modules/@types/node/stream/consumers.d.ts +12 -0
  53. package/package/node_modules/@types/node/stream/promises.d.ts +42 -0
  54. package/package/node_modules/@types/node/stream/web.d.ts +330 -0
  55. package/package/node_modules/@types/node/stream.d.ts +1340 -0
  56. package/package/node_modules/@types/node/string_decoder.d.ts +67 -0
  57. package/package/node_modules/@types/node/test.d.ts +314 -0
  58. package/package/node_modules/@types/node/timers/promises.d.ts +68 -0
  59. package/package/node_modules/@types/node/timers.d.ts +94 -0
  60. package/package/node_modules/@types/node/tls.d.ts +1028 -0
  61. package/package/node_modules/@types/node/trace_events.d.ts +171 -0
  62. package/package/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
  63. package/package/node_modules/@types/node/ts4.8/assert.d.ts +961 -0
  64. package/package/node_modules/@types/node/ts4.8/async_hooks.d.ts +501 -0
  65. package/package/node_modules/@types/node/ts4.8/buffer.d.ts +2259 -0
  66. package/package/node_modules/@types/node/ts4.8/child_process.d.ts +1369 -0
  67. package/package/node_modules/@types/node/ts4.8/cluster.d.ts +410 -0
  68. package/package/node_modules/@types/node/ts4.8/console.d.ts +412 -0
  69. package/package/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
  70. package/package/node_modules/@types/node/ts4.8/crypto.d.ts +3964 -0
  71. package/package/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
  72. package/package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +153 -0
  73. package/package/node_modules/@types/node/ts4.8/dns/promises.d.ts +370 -0
  74. package/package/node_modules/@types/node/ts4.8/dns.d.ts +659 -0
  75. package/package/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
  76. package/package/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
  77. package/package/node_modules/@types/node/ts4.8/events.d.ts +678 -0
  78. package/package/node_modules/@types/node/ts4.8/fs/promises.d.ts +1138 -0
  79. package/package/node_modules/@types/node/ts4.8/fs.d.ts +3872 -0
  80. package/package/node_modules/@types/node/ts4.8/globals.d.ts +294 -0
  81. package/package/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
  82. package/package/node_modules/@types/node/ts4.8/http.d.ts +1614 -0
  83. package/package/node_modules/@types/node/ts4.8/http2.d.ts +2134 -0
  84. package/package/node_modules/@types/node/ts4.8/https.d.ts +541 -0
  85. package/package/node_modules/@types/node/ts4.8/index.d.ts +88 -0
  86. package/package/node_modules/@types/node/ts4.8/inspector.d.ts +2741 -0
  87. package/package/node_modules/@types/node/ts4.8/module.d.ts +114 -0
  88. package/package/node_modules/@types/node/ts4.8/net.d.ts +869 -0
  89. package/package/node_modules/@types/node/ts4.8/os.d.ts +466 -0
  90. package/package/node_modules/@types/node/ts4.8/path.d.ts +191 -0
  91. package/package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +625 -0
  92. package/package/node_modules/@types/node/ts4.8/process.d.ts +1482 -0
  93. package/package/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
  94. package/package/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
  95. package/package/node_modules/@types/node/ts4.8/readline/promises.d.ts +143 -0
  96. package/package/node_modules/@types/node/ts4.8/readline.d.ts +653 -0
  97. package/package/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
  98. package/package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
  99. package/package/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
  100. package/package/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
  101. package/package/node_modules/@types/node/ts4.8/stream.d.ts +1340 -0
  102. package/package/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
  103. package/package/node_modules/@types/node/ts4.8/test.d.ts +314 -0
  104. package/package/node_modules/@types/node/ts4.8/timers/promises.d.ts +68 -0
  105. package/package/node_modules/@types/node/ts4.8/timers.d.ts +94 -0
  106. package/package/node_modules/@types/node/ts4.8/tls.d.ts +1028 -0
  107. package/package/node_modules/@types/node/ts4.8/trace_events.d.ts +171 -0
  108. package/package/node_modules/@types/node/ts4.8/tty.d.ts +206 -0
  109. package/package/node_modules/@types/node/ts4.8/url.d.ts +897 -0
  110. package/package/node_modules/@types/node/ts4.8/util.d.ts +1850 -0
  111. package/package/node_modules/@types/node/ts4.8/v8.d.ts +396 -0
  112. package/package/node_modules/@types/node/ts4.8/vm.d.ts +509 -0
  113. package/package/node_modules/@types/node/ts4.8/wasi.d.ts +158 -0
  114. package/package/node_modules/@types/node/ts4.8/worker_threads.d.ts +689 -0
  115. package/package/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
  116. package/package/node_modules/@types/node/tty.d.ts +206 -0
  117. package/package/node_modules/@types/node/url.d.ts +897 -0
  118. package/package/node_modules/@types/node/util.d.ts +1850 -0
  119. package/package/node_modules/@types/node/v8.d.ts +396 -0
  120. package/package/node_modules/@types/node/vm.d.ts +509 -0
  121. package/package/node_modules/@types/node/wasi.d.ts +158 -0
  122. package/package/node_modules/@types/node/worker_threads.d.ts +689 -0
  123. package/package/node_modules/@types/node/zlib.d.ts +517 -0
  124. package/package/node_modules/@types/nodemailer/LICENSE +21 -0
  125. package/package/node_modules/@types/nodemailer/README.md +16 -0
  126. package/package/node_modules/@types/nodemailer/index.d.ts +83 -0
  127. package/package/node_modules/@types/nodemailer/lib/addressparser/index.d.ts +31 -0
  128. package/package/node_modules/@types/nodemailer/lib/base64/index.d.ts +22 -0
  129. package/package/node_modules/@types/nodemailer/lib/dkim/index.d.ts +45 -0
  130. package/package/node_modules/@types/nodemailer/lib/dkim/message-parser.d.ts +75 -0
  131. package/package/node_modules/@types/nodemailer/lib/dkim/relaxed-body.d.ts +75 -0
  132. package/package/node_modules/@types/nodemailer/lib/dkim/sign.d.ts +11 -0
  133. package/package/node_modules/@types/nodemailer/lib/fetch/cookies.d.ts +54 -0
  134. package/package/node_modules/@types/nodemailer/lib/fetch/index.d.ts +38 -0
  135. package/package/node_modules/@types/nodemailer/lib/json-transport/index.d.ts +50 -0
  136. package/package/node_modules/@types/nodemailer/lib/mail-composer/index.d.ts +25 -0
  137. package/package/node_modules/@types/nodemailer/lib/mailer/index.d.ts +230 -0
  138. package/package/node_modules/@types/nodemailer/lib/mailer/mail-message.d.ts +28 -0
  139. package/package/node_modules/@types/nodemailer/lib/mime-funcs/index.d.ts +87 -0
  140. package/package/node_modules/@types/nodemailer/lib/mime-funcs/mime-types.d.ts +2 -0
  141. package/package/node_modules/@types/nodemailer/lib/mime-node/index.d.ts +137 -0
  142. package/package/node_modules/@types/nodemailer/lib/mime-node/last-newline.d.ts +9 -0
  143. package/package/node_modules/@types/nodemailer/lib/qp/index.d.ts +23 -0
  144. package/package/node_modules/@types/nodemailer/lib/sendmail-transport/index.d.ts +53 -0
  145. package/package/node_modules/@types/nodemailer/lib/sendmail-transport/le-unix.d.ts +7 -0
  146. package/package/node_modules/@types/nodemailer/lib/sendmail-transport/le-windows.d.ts +7 -0
  147. package/package/node_modules/@types/nodemailer/lib/ses-transport/index.d.ts +136 -0
  148. package/package/node_modules/@types/nodemailer/lib/shared/index.d.ts +51 -0
  149. package/package/node_modules/@types/nodemailer/lib/smtp-connection/data-stream.d.ts +11 -0
  150. package/package/node_modules/@types/nodemailer/lib/smtp-connection/http-proxy-client.d.ts +11 -0
  151. package/package/node_modules/@types/nodemailer/lib/smtp-connection/index.d.ts +254 -0
  152. package/package/node_modules/@types/nodemailer/lib/smtp-pool/index.d.ts +90 -0
  153. package/package/node_modules/@types/nodemailer/lib/smtp-pool/pool-resource.d.ts +66 -0
  154. package/package/node_modules/@types/nodemailer/lib/smtp-transport/index.d.ts +115 -0
  155. package/package/node_modules/@types/nodemailer/lib/stream-transport/index.d.ts +56 -0
  156. package/package/node_modules/@types/nodemailer/lib/well-known/index.d.ts +6 -0
  157. package/package/node_modules/@types/nodemailer/lib/xoauth2/index.d.ts +110 -0
  158. package/package/node_modules/@types/nodemailer/package.json +37 -0
  159. package/package/node_modules/nodemailer/.gitattributes +6 -0
  160. package/package/node_modules/nodemailer/.prettierrc.js +8 -0
  161. package/package/node_modules/nodemailer/CHANGELOG.md +715 -0
  162. package/package/node_modules/nodemailer/CODE_OF_CONDUCT.md +76 -0
  163. package/package/node_modules/nodemailer/CONTRIBUTING.md +67 -0
  164. package/package/node_modules/nodemailer/LICENSE +16 -0
  165. package/package/node_modules/nodemailer/README.md +93 -0
  166. package/package/node_modules/nodemailer/SECURITY.txt +22 -0
  167. package/package/node_modules/nodemailer/lib/addressparser/index.js +313 -0
  168. package/package/node_modules/nodemailer/lib/base64/index.js +142 -0
  169. package/package/node_modules/nodemailer/lib/dkim/index.js +251 -0
  170. package/package/node_modules/nodemailer/lib/dkim/message-parser.js +155 -0
  171. package/package/node_modules/nodemailer/lib/dkim/relaxed-body.js +154 -0
  172. package/package/node_modules/nodemailer/lib/dkim/sign.js +117 -0
  173. package/package/node_modules/nodemailer/lib/fetch/cookies.js +281 -0
  174. package/package/node_modules/nodemailer/lib/fetch/index.js +269 -0
  175. package/package/node_modules/nodemailer/lib/json-transport/index.js +82 -0
  176. package/package/node_modules/nodemailer/lib/mail-composer/index.js +558 -0
  177. package/package/node_modules/nodemailer/lib/mailer/index.js +427 -0
  178. package/package/node_modules/nodemailer/lib/mailer/mail-message.js +315 -0
  179. package/package/node_modules/nodemailer/lib/mime-funcs/index.js +619 -0
  180. package/package/node_modules/nodemailer/lib/mime-funcs/mime-types.js +2102 -0
  181. package/package/node_modules/nodemailer/lib/mime-node/index.js +1290 -0
  182. package/package/node_modules/nodemailer/lib/mime-node/last-newline.js +33 -0
  183. package/package/node_modules/nodemailer/lib/mime-node/le-unix.js +43 -0
  184. package/package/node_modules/nodemailer/lib/mime-node/le-windows.js +52 -0
  185. package/package/node_modules/nodemailer/lib/nodemailer.js +143 -0
  186. package/package/node_modules/nodemailer/lib/qp/index.js +219 -0
  187. package/package/node_modules/nodemailer/lib/sendmail-transport/index.js +210 -0
  188. package/package/node_modules/nodemailer/lib/ses-transport/index.js +349 -0
  189. package/package/node_modules/nodemailer/lib/shared/index.js +639 -0
  190. package/package/node_modules/nodemailer/lib/smtp-connection/data-stream.js +108 -0
  191. package/package/node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js +143 -0
  192. package/package/node_modules/nodemailer/lib/smtp-connection/index.js +1786 -0
  193. package/package/node_modules/nodemailer/lib/smtp-pool/index.js +648 -0
  194. package/package/node_modules/nodemailer/lib/smtp-pool/pool-resource.js +253 -0
  195. package/package/node_modules/nodemailer/lib/smtp-transport/index.js +416 -0
  196. package/package/node_modules/nodemailer/lib/stream-transport/index.js +135 -0
  197. package/package/node_modules/nodemailer/lib/well-known/index.js +47 -0
  198. package/package/node_modules/nodemailer/lib/well-known/services.json +286 -0
  199. package/package/node_modules/nodemailer/lib/xoauth2/index.js +376 -0
  200. package/package/node_modules/nodemailer/package.json +46 -0
  201. package/package/node_modules/nodemailer/postinstall.js +101 -0
  202. package/package/package-lock.json +60 -0
  203. package/package/package.json +6 -0
  204. package/package.json +19 -0
@@ -0,0 +1,659 @@
1
+ /**
2
+ * The `dns` module enables name resolution. For example, use it to look up IP
3
+ * addresses of host names.
4
+ *
5
+ * Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the
6
+ * DNS protocol for lookups. {@link lookup} uses the operating system
7
+ * facilities to perform name resolution. It may not need to perform any network
8
+ * communication. To perform name resolution the way other applications on the same
9
+ * system do, use {@link lookup}.
10
+ *
11
+ * ```js
12
+ * const dns = require('dns');
13
+ *
14
+ * dns.lookup('example.org', (err, address, family) => {
15
+ * console.log('address: %j family: IPv%s', address, family);
16
+ * });
17
+ * // address: "93.184.216.34" family: IPv4
18
+ * ```
19
+ *
20
+ * All other functions in the `dns` module connect to an actual DNS server to
21
+ * perform name resolution. They will always use the network to perform DNS
22
+ * queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform
23
+ * DNS queries, bypassing other name-resolution facilities.
24
+ *
25
+ * ```js
26
+ * const dns = require('dns');
27
+ *
28
+ * dns.resolve4('archive.org', (err, addresses) => {
29
+ * if (err) throw err;
30
+ *
31
+ * console.log(`addresses: ${JSON.stringify(addresses)}`);
32
+ *
33
+ * addresses.forEach((a) => {
34
+ * dns.reverse(a, (err, hostnames) => {
35
+ * if (err) {
36
+ * throw err;
37
+ * }
38
+ * console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`);
39
+ * });
40
+ * });
41
+ * });
42
+ * ```
43
+ *
44
+ * See the `Implementation considerations section` for more information.
45
+ * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dns.js)
46
+ */
47
+ declare module 'dns' {
48
+ import * as dnsPromises from 'node:dns/promises';
49
+ // Supported getaddrinfo flags.
50
+ export const ADDRCONFIG: number;
51
+ export const V4MAPPED: number;
52
+ /**
53
+ * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
54
+ * well as IPv4 mapped IPv6 addresses.
55
+ */
56
+ export const ALL: number;
57
+ export interface LookupOptions {
58
+ family?: number | undefined;
59
+ hints?: number | undefined;
60
+ all?: boolean | undefined;
61
+ /**
62
+ * @default true
63
+ */
64
+ verbatim?: boolean | undefined;
65
+ }
66
+ export interface LookupOneOptions extends LookupOptions {
67
+ all?: false | undefined;
68
+ }
69
+ export interface LookupAllOptions extends LookupOptions {
70
+ all: true;
71
+ }
72
+ export interface LookupAddress {
73
+ address: string;
74
+ family: number;
75
+ }
76
+ /**
77
+ * Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or
78
+ * AAAA (IPv6) record. All `option` properties are optional. If `options` is an
79
+ * integer, then it must be `4` or `6` – if `options` is not provided, then IPv4
80
+ * and IPv6 addresses are both returned if found.
81
+ *
82
+ * With the `all` option set to `true`, the arguments for `callback` change to`(err, addresses)`, with `addresses` being an array of objects with the
83
+ * properties `address` and `family`.
84
+ *
85
+ * On error, `err` is an `Error` object, where `err.code` is the error code.
86
+ * Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when
87
+ * the host name does not exist but also when the lookup fails in other ways
88
+ * such as no available file descriptors.
89
+ *
90
+ * `dns.lookup()` does not necessarily have anything to do with the DNS protocol.
91
+ * The implementation uses an operating system facility that can associate names
92
+ * with addresses, and vice versa. This implementation can have subtle but
93
+ * important consequences on the behavior of any Node.js program. Please take some
94
+ * time to consult the `Implementation considerations section` before using`dns.lookup()`.
95
+ *
96
+ * Example usage:
97
+ *
98
+ * ```js
99
+ * const dns = require('dns');
100
+ * const options = {
101
+ * family: 6,
102
+ * hints: dns.ADDRCONFIG | dns.V4MAPPED,
103
+ * };
104
+ * dns.lookup('example.com', options, (err, address, family) =>
105
+ * console.log('address: %j family: IPv%s', address, family));
106
+ * // address: "2606:2800:220:1:248:1893:25c8:1946" family: IPv6
107
+ *
108
+ * // When options.all is true, the result will be an Array.
109
+ * options.all = true;
110
+ * dns.lookup('example.com', options, (err, addresses) =>
111
+ * console.log('addresses: %j', addresses));
112
+ * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
113
+ * ```
114
+ *
115
+ * 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.
116
+ * @since v0.1.90
117
+ */
118
+ export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
119
+ export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
120
+ export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
121
+ export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
122
+ export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
123
+ export namespace lookup {
124
+ function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
125
+ function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
126
+ function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
127
+ }
128
+ /**
129
+ * Resolves the given `address` and `port` into a host name and service using
130
+ * the operating system's underlying `getnameinfo` implementation.
131
+ *
132
+ * If `address` is not a valid IP address, a `TypeError` will be thrown.
133
+ * The `port` will be coerced to a number. If it is not a legal port, a `TypeError`will be thrown.
134
+ *
135
+ * On an error, `err` is an `Error` object, where `err.code` is the error code.
136
+ *
137
+ * ```js
138
+ * const dns = require('dns');
139
+ * dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {
140
+ * console.log(hostname, service);
141
+ * // Prints: localhost ssh
142
+ * });
143
+ * ```
144
+ *
145
+ * If this method is invoked as its `util.promisify()` ed version, it returns a`Promise` for an `Object` with `hostname` and `service` properties.
146
+ * @since v0.11.14
147
+ */
148
+ export function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
149
+ export namespace lookupService {
150
+ function __promisify__(
151
+ address: string,
152
+ port: number
153
+ ): Promise<{
154
+ hostname: string;
155
+ service: string;
156
+ }>;
157
+ }
158
+ export interface ResolveOptions {
159
+ ttl: boolean;
160
+ }
161
+ export interface ResolveWithTtlOptions extends ResolveOptions {
162
+ ttl: true;
163
+ }
164
+ export interface RecordWithTtl {
165
+ address: string;
166
+ ttl: number;
167
+ }
168
+ /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
169
+ export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
170
+ export interface AnyARecord extends RecordWithTtl {
171
+ type: 'A';
172
+ }
173
+ export interface AnyAaaaRecord extends RecordWithTtl {
174
+ type: 'AAAA';
175
+ }
176
+ export interface CaaRecord {
177
+ critial: number;
178
+ issue?: string | undefined;
179
+ issuewild?: string | undefined;
180
+ iodef?: string | undefined;
181
+ contactemail?: string | undefined;
182
+ contactphone?: string | undefined;
183
+ }
184
+ export interface MxRecord {
185
+ priority: number;
186
+ exchange: string;
187
+ }
188
+ export interface AnyMxRecord extends MxRecord {
189
+ type: 'MX';
190
+ }
191
+ export interface NaptrRecord {
192
+ flags: string;
193
+ service: string;
194
+ regexp: string;
195
+ replacement: string;
196
+ order: number;
197
+ preference: number;
198
+ }
199
+ export interface AnyNaptrRecord extends NaptrRecord {
200
+ type: 'NAPTR';
201
+ }
202
+ export interface SoaRecord {
203
+ nsname: string;
204
+ hostmaster: string;
205
+ serial: number;
206
+ refresh: number;
207
+ retry: number;
208
+ expire: number;
209
+ minttl: number;
210
+ }
211
+ export interface AnySoaRecord extends SoaRecord {
212
+ type: 'SOA';
213
+ }
214
+ export interface SrvRecord {
215
+ priority: number;
216
+ weight: number;
217
+ port: number;
218
+ name: string;
219
+ }
220
+ export interface AnySrvRecord extends SrvRecord {
221
+ type: 'SRV';
222
+ }
223
+ export interface AnyTxtRecord {
224
+ type: 'TXT';
225
+ entries: string[];
226
+ }
227
+ export interface AnyNsRecord {
228
+ type: 'NS';
229
+ value: string;
230
+ }
231
+ export interface AnyPtrRecord {
232
+ type: 'PTR';
233
+ value: string;
234
+ }
235
+ export interface AnyCnameRecord {
236
+ type: 'CNAME';
237
+ value: string;
238
+ }
239
+ export type AnyRecord = AnyARecord | AnyAaaaRecord | AnyCnameRecord | AnyMxRecord | AnyNaptrRecord | AnyNsRecord | AnyPtrRecord | AnySoaRecord | AnySrvRecord | AnyTxtRecord;
240
+ /**
241
+ * Uses the DNS protocol to resolve a host name (e.g. `'nodejs.org'`) into an array
242
+ * of the resource records. The `callback` function has arguments`(err, records)`. When successful, `records` will be an array of resource
243
+ * records. The type and structure of individual results varies based on `rrtype`:
244
+ *
245
+ * <omitted>
246
+ *
247
+ * On error, `err` is an `Error` object, where `err.code` is one of the `DNS error codes`.
248
+ * @since v0.1.27
249
+ * @param hostname Host name to resolve.
250
+ * @param [rrtype='A'] Resource record type.
251
+ */
252
+ export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
253
+ export function resolve(hostname: string, rrtype: 'A', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
254
+ export function resolve(hostname: string, rrtype: 'AAAA', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
255
+ export function resolve(hostname: string, rrtype: 'ANY', callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
256
+ export function resolve(hostname: string, rrtype: 'CNAME', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
257
+ export function resolve(hostname: string, rrtype: 'MX', callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
258
+ export function resolve(hostname: string, rrtype: 'NAPTR', callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
259
+ export function resolve(hostname: string, rrtype: 'NS', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
260
+ export function resolve(hostname: string, rrtype: 'PTR', callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
261
+ export function resolve(hostname: string, rrtype: 'SOA', callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
262
+ export function resolve(hostname: string, rrtype: 'SRV', callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
263
+ export function resolve(hostname: string, rrtype: 'TXT', callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
264
+ export function resolve(
265
+ hostname: string,
266
+ rrtype: string,
267
+ callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void
268
+ ): void;
269
+ export namespace resolve {
270
+ function __promisify__(hostname: string, rrtype?: 'A' | 'AAAA' | 'CNAME' | 'NS' | 'PTR'): Promise<string[]>;
271
+ function __promisify__(hostname: string, rrtype: 'ANY'): Promise<AnyRecord[]>;
272
+ function __promisify__(hostname: string, rrtype: 'MX'): Promise<MxRecord[]>;
273
+ function __promisify__(hostname: string, rrtype: 'NAPTR'): Promise<NaptrRecord[]>;
274
+ function __promisify__(hostname: string, rrtype: 'SOA'): Promise<SoaRecord>;
275
+ function __promisify__(hostname: string, rrtype: 'SRV'): Promise<SrvRecord[]>;
276
+ function __promisify__(hostname: string, rrtype: 'TXT'): Promise<string[][]>;
277
+ function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
278
+ }
279
+ /**
280
+ * Uses the DNS protocol to resolve a IPv4 addresses (`A` records) for the`hostname`. The `addresses` argument passed to the `callback` function
281
+ * will contain an array of IPv4 addresses (e.g.`['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
282
+ * @since v0.1.16
283
+ * @param hostname Host name to resolve.
284
+ */
285
+ export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
286
+ export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
287
+ export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
288
+ export namespace resolve4 {
289
+ function __promisify__(hostname: string): Promise<string[]>;
290
+ function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
291
+ function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
292
+ }
293
+ /**
294
+ * Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the`hostname`. The `addresses` argument passed to the `callback` function
295
+ * will contain an array of IPv6 addresses.
296
+ * @since v0.1.16
297
+ * @param hostname Host name to resolve.
298
+ */
299
+ export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
300
+ export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
301
+ export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
302
+ export namespace resolve6 {
303
+ function __promisify__(hostname: string): Promise<string[]>;
304
+ function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
305
+ function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
306
+ }
307
+ /**
308
+ * Uses the DNS protocol to resolve `CNAME` records for the `hostname`. The`addresses` argument passed to the `callback` function
309
+ * will contain an array of canonical name records available for the `hostname`(e.g. `['bar.example.com']`).
310
+ * @since v0.3.2
311
+ */
312
+ export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
313
+ export namespace resolveCname {
314
+ function __promisify__(hostname: string): Promise<string[]>;
315
+ }
316
+ /**
317
+ * Uses the DNS protocol to resolve `CAA` records for the `hostname`. The`addresses` argument passed to the `callback` function
318
+ * will contain an array of certification authority authorization records
319
+ * available for the `hostname` (e.g. `[{critical: 0, iodef: 'mailto:pki@example.com'}, {critical: 128, issue: 'pki.example.com'}]`).
320
+ * @since v15.0.0, v14.17.0
321
+ */
322
+ export function resolveCaa(hostname: string, callback: (err: NodeJS.ErrnoException | null, records: CaaRecord[]) => void): void;
323
+ export namespace resolveCaa {
324
+ function __promisify__(hostname: string): Promise<CaaRecord[]>;
325
+ }
326
+ /**
327
+ * Uses the DNS protocol to resolve mail exchange records (`MX` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
328
+ * contain an array of objects containing both a `priority` and `exchange`property (e.g. `[{priority: 10, exchange: 'mx.example.com'}, ...]`).
329
+ * @since v0.1.27
330
+ */
331
+ export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
332
+ export namespace resolveMx {
333
+ function __promisify__(hostname: string): Promise<MxRecord[]>;
334
+ }
335
+ /**
336
+ * Uses the DNS protocol to resolve regular expression based records (`NAPTR`records) for the `hostname`. The `addresses` argument passed to the `callback`function will contain an array of
337
+ * objects with the following properties:
338
+ *
339
+ * * `flags`
340
+ * * `service`
341
+ * * `regexp`
342
+ * * `replacement`
343
+ * * `order`
344
+ * * `preference`
345
+ *
346
+ * ```js
347
+ * {
348
+ * flags: 's',
349
+ * service: 'SIP+D2U',
350
+ * regexp: '',
351
+ * replacement: '_sip._udp.example.com',
352
+ * order: 30,
353
+ * preference: 100
354
+ * }
355
+ * ```
356
+ * @since v0.9.12
357
+ */
358
+ export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
359
+ export namespace resolveNaptr {
360
+ function __promisify__(hostname: string): Promise<NaptrRecord[]>;
361
+ }
362
+ /**
363
+ * Uses the DNS protocol to resolve name server records (`NS` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
364
+ * contain an array of name server records available for `hostname`(e.g. `['ns1.example.com', 'ns2.example.com']`).
365
+ * @since v0.1.90
366
+ */
367
+ export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
368
+ export namespace resolveNs {
369
+ function __promisify__(hostname: string): Promise<string[]>;
370
+ }
371
+ /**
372
+ * Uses the DNS protocol to resolve pointer records (`PTR` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
373
+ * be an array of strings containing the reply records.
374
+ * @since v6.0.0
375
+ */
376
+ export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
377
+ export namespace resolvePtr {
378
+ function __promisify__(hostname: string): Promise<string[]>;
379
+ }
380
+ /**
381
+ * Uses the DNS protocol to resolve a start of authority record (`SOA` record) for
382
+ * the `hostname`. The `address` argument passed to the `callback` function will
383
+ * be an object with the following properties:
384
+ *
385
+ * * `nsname`
386
+ * * `hostmaster`
387
+ * * `serial`
388
+ * * `refresh`
389
+ * * `retry`
390
+ * * `expire`
391
+ * * `minttl`
392
+ *
393
+ * ```js
394
+ * {
395
+ * nsname: 'ns.example.com',
396
+ * hostmaster: 'root.example.com',
397
+ * serial: 2013101809,
398
+ * refresh: 10000,
399
+ * retry: 2400,
400
+ * expire: 604800,
401
+ * minttl: 3600
402
+ * }
403
+ * ```
404
+ * @since v0.11.10
405
+ */
406
+ export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
407
+ export namespace resolveSoa {
408
+ function __promisify__(hostname: string): Promise<SoaRecord>;
409
+ }
410
+ /**
411
+ * Uses the DNS protocol to resolve service records (`SRV` records) for the`hostname`. The `addresses` argument passed to the `callback` function will
412
+ * be an array of objects with the following properties:
413
+ *
414
+ * * `priority`
415
+ * * `weight`
416
+ * * `port`
417
+ * * `name`
418
+ *
419
+ * ```js
420
+ * {
421
+ * priority: 10,
422
+ * weight: 5,
423
+ * port: 21223,
424
+ * name: 'service.example.com'
425
+ * }
426
+ * ```
427
+ * @since v0.1.27
428
+ */
429
+ export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
430
+ export namespace resolveSrv {
431
+ function __promisify__(hostname: string): Promise<SrvRecord[]>;
432
+ }
433
+ /**
434
+ * Uses the DNS protocol to resolve text queries (`TXT` records) for the`hostname`. The `records` argument passed to the `callback` function is a
435
+ * two-dimensional array of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
436
+ * one record. Depending on the use case, these could be either joined together or
437
+ * treated separately.
438
+ * @since v0.1.27
439
+ */
440
+ export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
441
+ export namespace resolveTxt {
442
+ function __promisify__(hostname: string): Promise<string[][]>;
443
+ }
444
+ /**
445
+ * Uses the DNS protocol to resolve all records (also known as `ANY` or `*` query).
446
+ * The `ret` argument passed to the `callback` function will be an array containing
447
+ * various types of records. Each object has a property `type` that indicates the
448
+ * type of the current record. And depending on the `type`, additional properties
449
+ * will be present on the object:
450
+ *
451
+ * <omitted>
452
+ *
453
+ * Here is an example of the `ret` object passed to the callback:
454
+ *
455
+ * ```js
456
+ * [ { type: 'A', address: '127.0.0.1', ttl: 299 },
457
+ * { type: 'CNAME', value: 'example.com' },
458
+ * { type: 'MX', exchange: 'alt4.aspmx.l.example.com', priority: 50 },
459
+ * { type: 'NS', value: 'ns1.example.com' },
460
+ * { type: 'TXT', entries: [ 'v=spf1 include:_spf.example.com ~all' ] },
461
+ * { type: 'SOA',
462
+ * nsname: 'ns1.example.com',
463
+ * hostmaster: 'admin.example.com',
464
+ * serial: 156696742,
465
+ * refresh: 900,
466
+ * retry: 900,
467
+ * expire: 1800,
468
+ * minttl: 60 } ]
469
+ * ```
470
+ *
471
+ * 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
472
+ * 8482](https://tools.ietf.org/html/rfc8482).
473
+ */
474
+ export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
475
+ export namespace resolveAny {
476
+ function __promisify__(hostname: string): Promise<AnyRecord[]>;
477
+ }
478
+ /**
479
+ * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
480
+ * array of host names.
481
+ *
482
+ * On error, `err` is an `Error` object, where `err.code` is
483
+ * one of the `DNS error codes`.
484
+ * @since v0.1.16
485
+ */
486
+ export function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void;
487
+ /**
488
+ * Sets the IP address and port of servers to be used when performing DNS
489
+ * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
490
+ * addresses. If the port is the IANA default DNS port (53) it can be omitted.
491
+ *
492
+ * ```js
493
+ * dns.setServers([
494
+ * '4.4.4.4',
495
+ * '[2001:4860:4860::8888]',
496
+ * '4.4.4.4:1053',
497
+ * '[2001:4860:4860::8888]:1053',
498
+ * ]);
499
+ * ```
500
+ *
501
+ * An error will be thrown if an invalid address is provided.
502
+ *
503
+ * The `dns.setServers()` method must not be called while a DNS query is in
504
+ * progress.
505
+ *
506
+ * The {@link setServers} method affects only {@link resolve},`dns.resolve*()` and {@link reverse} (and specifically _not_ {@link lookup}).
507
+ *
508
+ * This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
509
+ * That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
510
+ * subsequent servers provided. Fallback DNS servers will only be used if the
511
+ * earlier ones time out or result in some other error.
512
+ * @since v0.11.3
513
+ * @param servers array of `RFC 5952` formatted addresses
514
+ */
515
+ export function setServers(servers: ReadonlyArray<string>): void;
516
+ /**
517
+ * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
518
+ * that are currently configured for DNS resolution. A string will include a port
519
+ * section if a custom port is used.
520
+ *
521
+ * ```js
522
+ * [
523
+ * '4.4.4.4',
524
+ * '2001:4860:4860::8888',
525
+ * '4.4.4.4:1053',
526
+ * '[2001:4860:4860::8888]:1053',
527
+ * ]
528
+ * ```
529
+ * @since v0.11.3
530
+ */
531
+ export function getServers(): string[];
532
+ /**
533
+ * Set the default value of `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
534
+ *
535
+ * * `ipv4first`: sets default `verbatim` `false`.
536
+ * * `verbatim`: sets default `verbatim` `true`.
537
+ *
538
+ * The default is `ipv4first` and {@link setDefaultResultOrder} have higher
539
+ * priority than `--dns-result-order`. When using `worker threads`,{@link setDefaultResultOrder} from the main thread won't affect the default
540
+ * dns orders in workers.
541
+ * @since v16.4.0, v14.18.0
542
+ * @param order must be `'ipv4first'` or `'verbatim'`.
543
+ */
544
+ export function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
545
+ // Error codes
546
+ export const NODATA: string;
547
+ export const FORMERR: string;
548
+ export const SERVFAIL: string;
549
+ export const NOTFOUND: string;
550
+ export const NOTIMP: string;
551
+ export const REFUSED: string;
552
+ export const BADQUERY: string;
553
+ export const BADNAME: string;
554
+ export const BADFAMILY: string;
555
+ export const BADRESP: string;
556
+ export const CONNREFUSED: string;
557
+ export const TIMEOUT: string;
558
+ export const EOF: string;
559
+ export const FILE: string;
560
+ export const NOMEM: string;
561
+ export const DESTRUCTION: string;
562
+ export const BADSTR: string;
563
+ export const BADFLAGS: string;
564
+ export const NONAME: string;
565
+ export const BADHINTS: string;
566
+ export const NOTINITIALIZED: string;
567
+ export const LOADIPHLPAPI: string;
568
+ export const ADDRGETNETWORKPARAMS: string;
569
+ export const CANCELLED: string;
570
+ export interface ResolverOptions {
571
+ timeout?: number | undefined;
572
+ /**
573
+ * @default 4
574
+ */
575
+ tries?: number;
576
+ }
577
+ /**
578
+ * An independent resolver for DNS requests.
579
+ *
580
+ * Creating a new resolver uses the default server settings. Setting
581
+ * the servers used for a resolver using `resolver.setServers()` does not affect
582
+ * other resolvers:
583
+ *
584
+ * ```js
585
+ * const { Resolver } = require('dns');
586
+ * const resolver = new Resolver();
587
+ * resolver.setServers(['4.4.4.4']);
588
+ *
589
+ * // This request will use the server at 4.4.4.4, independent of global settings.
590
+ * resolver.resolve4('example.org', (err, addresses) => {
591
+ * // ...
592
+ * });
593
+ * ```
594
+ *
595
+ * The following methods from the `dns` module are available:
596
+ *
597
+ * * `resolver.getServers()`
598
+ * * `resolver.resolve()`
599
+ * * `resolver.resolve4()`
600
+ * * `resolver.resolve6()`
601
+ * * `resolver.resolveAny()`
602
+ * * `resolver.resolveCaa()`
603
+ * * `resolver.resolveCname()`
604
+ * * `resolver.resolveMx()`
605
+ * * `resolver.resolveNaptr()`
606
+ * * `resolver.resolveNs()`
607
+ * * `resolver.resolvePtr()`
608
+ * * `resolver.resolveSoa()`
609
+ * * `resolver.resolveSrv()`
610
+ * * `resolver.resolveTxt()`
611
+ * * `resolver.reverse()`
612
+ * * `resolver.setServers()`
613
+ * @since v8.3.0
614
+ */
615
+ export class Resolver {
616
+ constructor(options?: ResolverOptions);
617
+ /**
618
+ * Cancel all outstanding DNS queries made by this resolver. The corresponding
619
+ * callbacks will be called with an error with code `ECANCELLED`.
620
+ * @since v8.3.0
621
+ */
622
+ cancel(): void;
623
+ getServers: typeof getServers;
624
+ resolve: typeof resolve;
625
+ resolve4: typeof resolve4;
626
+ resolve6: typeof resolve6;
627
+ resolveAny: typeof resolveAny;
628
+ resolveCname: typeof resolveCname;
629
+ resolveMx: typeof resolveMx;
630
+ resolveNaptr: typeof resolveNaptr;
631
+ resolveNs: typeof resolveNs;
632
+ resolvePtr: typeof resolvePtr;
633
+ resolveSoa: typeof resolveSoa;
634
+ resolveSrv: typeof resolveSrv;
635
+ resolveTxt: typeof resolveTxt;
636
+ reverse: typeof reverse;
637
+ /**
638
+ * The resolver instance will send its requests from the specified IP address.
639
+ * This allows programs to specify outbound interfaces when used on multi-homed
640
+ * systems.
641
+ *
642
+ * If a v4 or v6 address is not specified, it is set to the default, and the
643
+ * operating system will choose a local address automatically.
644
+ *
645
+ * The resolver will use the v4 local address when making requests to IPv4 DNS
646
+ * servers, and the v6 local address when making requests to IPv6 DNS servers.
647
+ * The `rrtype` of resolution requests has no impact on the local address used.
648
+ * @since v15.1.0, v14.17.0
649
+ * @param [ipv4='0.0.0.0'] A string representation of an IPv4 address.
650
+ * @param [ipv6='::0'] A string representation of an IPv6 address.
651
+ */
652
+ setLocalAddress(ipv4?: string, ipv6?: string): void;
653
+ setServers: typeof setServers;
654
+ }
655
+ export { dnsPromises as promises };
656
+ }
657
+ declare module 'node:dns' {
658
+ export * from 'dns';
659
+ }