@types/dns2 2.0.8 → 2.0.9
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.
- dns2/README.md +1 -1
- dns2/index.d.ts +11 -1
- dns2/package.json +3 -3
dns2/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for dns2 (https://github.com/song940/node
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dns2.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Mon,
|
|
11
|
+
* Last updated: Mon, 26 Feb 2024 07:07:08 GMT
|
|
12
12
|
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
|
13
13
|
|
|
14
14
|
# Credits
|
dns2/index.d.ts
CHANGED
|
@@ -84,6 +84,12 @@ declare namespace DNS {
|
|
|
84
84
|
type: "udp4" | "udp6";
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
interface DnsServerListenOptions {
|
|
88
|
+
udp?: ListenOptions;
|
|
89
|
+
tcp?: ListenOptions;
|
|
90
|
+
doh?: ListenOptions;
|
|
91
|
+
}
|
|
92
|
+
|
|
87
93
|
type DnsHandler = (
|
|
88
94
|
request: DnsRequest,
|
|
89
95
|
sendResponse: (response: DnsResponse) => void,
|
|
@@ -92,6 +98,10 @@ declare namespace DNS {
|
|
|
92
98
|
|
|
93
99
|
type PacketClass = typeof Packet.CLASS[keyof typeof Packet.CLASS];
|
|
94
100
|
type PacketQuestion = keyof typeof Packet.TYPE;
|
|
101
|
+
type ListenOptions = number | {
|
|
102
|
+
port: number;
|
|
103
|
+
address: string;
|
|
104
|
+
};
|
|
95
105
|
}
|
|
96
106
|
|
|
97
107
|
declare class DnsServer extends EventEmitter {
|
|
@@ -101,7 +111,7 @@ declare class DnsServer extends EventEmitter {
|
|
|
101
111
|
doh?: net.AddressInfo;
|
|
102
112
|
};
|
|
103
113
|
|
|
104
|
-
listen(
|
|
114
|
+
listen(options: DNS.DnsServerListenOptions): Promise<void>;
|
|
105
115
|
|
|
106
116
|
close(): Promise<void>;
|
|
107
117
|
}
|
dns2/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/dns2",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "TypeScript definitions for dns2",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dns2",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@types/node": "*"
|
|
24
24
|
},
|
|
25
|
-
"typesPublisherContentHash": "
|
|
26
|
-
"typeScriptVersion": "4.
|
|
25
|
+
"typesPublisherContentHash": "cb21cdacf072f697cfd79c460dfbcdb03dbb96055bd8e9898f35813b3c2f3c58",
|
|
26
|
+
"typeScriptVersion": "4.6"
|
|
27
27
|
}
|