@types/dns2 2.0.4 → 2.0.5
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 +12 -3
- dns2/package.json +2 -2
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: Fri,
|
|
11
|
+
* Last updated: Fri, 06 Oct 2023 15:35:00 GMT
|
|
12
12
|
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
|
13
13
|
* Global values: none
|
|
14
14
|
|
dns2/index.d.ts
CHANGED
|
@@ -85,6 +85,10 @@ declare namespace DNS {
|
|
|
85
85
|
data?: string;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
interface UdpDnsServerOptions {
|
|
89
|
+
type: 'udp4' | 'udp6';
|
|
90
|
+
}
|
|
91
|
+
|
|
88
92
|
type DnsHandler = (
|
|
89
93
|
request: DnsRequest,
|
|
90
94
|
sendResponse: (response: DnsResponse) => void,
|
|
@@ -108,8 +112,8 @@ declare class DnsServer extends EventEmitter {
|
|
|
108
112
|
}
|
|
109
113
|
|
|
110
114
|
declare class UdpDnsServer extends udp.Socket {
|
|
111
|
-
constructor(
|
|
112
|
-
listen(port: number, address
|
|
115
|
+
constructor(arg?: DNS.UdpDnsServerOptions | DNS.DnsHandler);
|
|
116
|
+
listen(port: number, address?: string): Promise<void>;
|
|
113
117
|
}
|
|
114
118
|
|
|
115
119
|
declare class TcpDnsServer extends net.Server {
|
|
@@ -119,7 +123,12 @@ declare class TcpDnsServer extends net.Server {
|
|
|
119
123
|
declare class DNS {
|
|
120
124
|
constructor(options?: Partial<DNS.DnsClientOptions>);
|
|
121
125
|
|
|
122
|
-
static createServer(options: {
|
|
126
|
+
static createServer(options: {
|
|
127
|
+
udp?: boolean | DNS.UdpDnsServerOptions;
|
|
128
|
+
tcp?: boolean;
|
|
129
|
+
doh?: boolean;
|
|
130
|
+
handle: DNS.DnsHandler;
|
|
131
|
+
}): DnsServer;
|
|
123
132
|
|
|
124
133
|
static Packet: typeof Packet;
|
|
125
134
|
|
dns2/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/dns2",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
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": "
|
|
25
|
+
"typesPublisherContentHash": "dec52803ab6c79ec8ec23f5a80ebd47a2c679d01587f767fc587c0615fac623e",
|
|
26
26
|
"typeScriptVersion": "4.5"
|
|
27
27
|
}
|