mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 03:46:07 +08:00
[node] Update declarations for dns.resolveAny (#27950)
* [node] Update declarations for dns.resolveAny * Fix dns.resolve test * Add CNAME record type * Use @deprecated tag for AnyRecordWithTtl interface
This commit is contained in:
82
types/node/index.d.ts
vendored
82
types/node/index.d.ts
vendored
@@ -2582,8 +2582,15 @@ declare module "dns" {
|
||||
ttl: number;
|
||||
}
|
||||
|
||||
export interface AnyRecordWithTtl extends RecordWithTtl {
|
||||
type: "A" | "AAAA";
|
||||
/** @deprecated Use AnyARecord or AnyAaaaRecord instead. */
|
||||
export type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
|
||||
|
||||
export interface AnyARecord extends RecordWithTtl {
|
||||
type: "A";
|
||||
}
|
||||
|
||||
export interface AnyAaaaRecord extends RecordWithTtl {
|
||||
type: "AAAA";
|
||||
}
|
||||
|
||||
export interface MxRecord {
|
||||
@@ -2638,10 +2645,36 @@ declare module "dns" {
|
||||
entries: string[];
|
||||
}
|
||||
|
||||
export interface AnyNsRecord {
|
||||
type: "NS";
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface AnyPtrRecord {
|
||||
type: "PTR";
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface AnyCnameRecord {
|
||||
type: "CNAME";
|
||||
value: string;
|
||||
}
|
||||
|
||||
export type AnyRecord = AnyARecord |
|
||||
AnyAaaaRecord |
|
||||
AnyCnameRecord |
|
||||
AnyMxRecord |
|
||||
AnyNaptrRecord |
|
||||
AnyNsRecord |
|
||||
AnyPtrRecord |
|
||||
AnySoaRecord |
|
||||
AnySrvRecord |
|
||||
AnyTxtRecord;
|
||||
|
||||
export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException, addresses: ReadonlyArray<AnySrvRecord | AnySoaRecord | AnyNaptrRecord | AnyRecordWithTtl | AnyMxRecord | AnyTxtRecord>) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException, addresses: AnyRecord[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
||||
@@ -2650,18 +2683,18 @@ declare module "dns" {
|
||||
export function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException, addresses: SoaRecord) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
export namespace resolve {
|
||||
export function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
|
||||
export function __promisify__(hostname: string, rrtype: "ANY"): Promise<ReadonlyArray<AnySrvRecord | AnySoaRecord | AnyNaptrRecord | AnyRecordWithTtl | AnyMxRecord | AnyTxtRecord>>;
|
||||
export function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
|
||||
export function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
|
||||
export function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
|
||||
export function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
|
||||
export function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
|
||||
export function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
|
||||
export function __promisify__(hostname: string, rrtype?: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][]>;
|
||||
export function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
|
||||
}
|
||||
|
||||
export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
@@ -2686,15 +2719,50 @@ declare module "dns" {
|
||||
export function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
||||
}
|
||||
|
||||
export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: ReadonlyArray<AnySrvRecord | AnySoaRecord | AnyNaptrRecord | AnyRecordWithTtl | AnyMxRecord | AnyTxtRecord>) => void): void;
|
||||
export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export namespace resolveCname {
|
||||
export function __promisify__(hostname: string): Promise<string[]>;
|
||||
}
|
||||
|
||||
export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
||||
export namespace resolveMx {
|
||||
export function __promisify__(hostname: string): Promise<MxRecord[]>;
|
||||
}
|
||||
|
||||
export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
||||
export namespace resolveNaptr {
|
||||
export function __promisify__(hostname: string): Promise<NaptrRecord[]>;
|
||||
}
|
||||
|
||||
export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export namespace resolveNs {
|
||||
export function __promisify__(hostname: string): Promise<string[]>;
|
||||
}
|
||||
|
||||
export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export namespace resolvePtr {
|
||||
export function __promisify__(hostname: string): Promise<string[]>;
|
||||
}
|
||||
|
||||
export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException, address: SoaRecord) => void): void;
|
||||
export namespace resolveSoa {
|
||||
export function __promisify__(hostname: string): Promise<SoaRecord>;
|
||||
}
|
||||
|
||||
export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
||||
export namespace resolveSrv {
|
||||
export function __promisify__(hostname: string): Promise<SrvRecord[]>;
|
||||
}
|
||||
|
||||
export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
||||
export namespace resolveTxt {
|
||||
export function __promisify__(hostname: string): Promise<string[][]>;
|
||||
}
|
||||
|
||||
export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: AnyRecord[]) => void): void;
|
||||
export namespace resolveAny {
|
||||
export function __promisify__(hostname: string): Promise<AnyRecord[]>;
|
||||
}
|
||||
|
||||
export function reverse(ip: string, callback: (err: NodeJS.ErrnoException, hostnames: string[]) => void): void;
|
||||
export function setServers(servers: string[]): void;
|
||||
|
||||
@@ -3355,7 +3355,7 @@ namespace dns_tests {
|
||||
const _addresses: string[] = addresses;
|
||||
});
|
||||
dns.resolve("nodejs.org", "ANY", (err, addresses) => {
|
||||
const _addresses: ReadonlyArray<dns.AnySrvRecord | dns.AnySoaRecord | dns.AnyNaptrRecord | dns.AnyRecordWithTtl | dns.AnyMxRecord | dns.AnyTxtRecord> = addresses;
|
||||
const _addresses: dns.AnyRecord[] = addresses;
|
||||
});
|
||||
dns.resolve("nodejs.org", "MX", (err, addresses) => {
|
||||
const _addresses: dns.MxRecord[] = addresses;
|
||||
|
||||
97
types/node/v8/index.d.ts
vendored
97
types/node/v8/index.d.ts
vendored
@@ -2465,11 +2465,23 @@ declare module "dns" {
|
||||
ttl: number;
|
||||
}
|
||||
|
||||
export interface AnyARecord extends RecordWithTtl {
|
||||
type: "A";
|
||||
}
|
||||
|
||||
export interface AnyAaaaRecord extends RecordWithTtl {
|
||||
type: "AAAA";
|
||||
}
|
||||
|
||||
export interface MxRecord {
|
||||
priority: number;
|
||||
exchange: string;
|
||||
}
|
||||
|
||||
export interface AnyMxRecord extends MxRecord {
|
||||
type: "MX";
|
||||
}
|
||||
|
||||
export interface NaptrRecord {
|
||||
flags: string;
|
||||
service: string;
|
||||
@@ -2479,6 +2491,10 @@ declare module "dns" {
|
||||
preference: number;
|
||||
}
|
||||
|
||||
export interface AnyNaptrRecord extends NaptrRecord {
|
||||
type: "NAPTR";
|
||||
}
|
||||
|
||||
export interface SoaRecord {
|
||||
nsname: string;
|
||||
hostmaster: string;
|
||||
@@ -2489,6 +2505,10 @@ declare module "dns" {
|
||||
minttl: number;
|
||||
}
|
||||
|
||||
export interface AnySoaRecord extends SoaRecord {
|
||||
type: "SOA";
|
||||
}
|
||||
|
||||
export interface SrvRecord {
|
||||
priority: number;
|
||||
weight: number;
|
||||
@@ -2496,9 +2516,45 @@ declare module "dns" {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface AnySrvRecord extends SrvRecord {
|
||||
type: "SRV";
|
||||
}
|
||||
|
||||
export interface AnyTxtRecord {
|
||||
type: "TXT";
|
||||
entries: string[];
|
||||
}
|
||||
|
||||
export interface AnyNsRecord {
|
||||
type: "NS";
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface AnyPtrRecord {
|
||||
type: "PTR";
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface AnyCnameRecord {
|
||||
type: "CNAME";
|
||||
value: string;
|
||||
}
|
||||
|
||||
export type AnyRecord = AnyARecord |
|
||||
AnyAaaaRecord |
|
||||
AnyCnameRecord |
|
||||
AnyMxRecord |
|
||||
AnyNaptrRecord |
|
||||
AnyNsRecord |
|
||||
AnyPtrRecord |
|
||||
AnySoaRecord |
|
||||
AnySrvRecord |
|
||||
AnyTxtRecord;
|
||||
|
||||
export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException, addresses: AnyRecord[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
||||
@@ -2507,17 +2563,18 @@ declare module "dns" {
|
||||
export function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException, addresses: SoaRecord) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
export namespace resolve {
|
||||
export function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
|
||||
export function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
|
||||
export function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
|
||||
export function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
|
||||
export function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
|
||||
export function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
|
||||
export function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
|
||||
export function __promisify__(hostname: string, rrtype?: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][]>;
|
||||
export function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
|
||||
}
|
||||
|
||||
export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
@@ -2543,13 +2600,49 @@ declare module "dns" {
|
||||
}
|
||||
|
||||
export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export namespace resolveCname {
|
||||
export function __promisify__(hostname: string): Promise<string[]>;
|
||||
}
|
||||
|
||||
export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
||||
export namespace resolveMx {
|
||||
export function __promisify__(hostname: string): Promise<MxRecord[]>;
|
||||
}
|
||||
|
||||
export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
||||
export namespace resolveNaptr {
|
||||
export function __promisify__(hostname: string): Promise<NaptrRecord[]>;
|
||||
}
|
||||
|
||||
export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export namespace resolveNs {
|
||||
export function __promisify__(hostname: string): Promise<string[]>;
|
||||
}
|
||||
|
||||
export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export namespace resolvePtr {
|
||||
export function __promisify__(hostname: string): Promise<string[]>;
|
||||
}
|
||||
|
||||
export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException, address: SoaRecord) => void): void;
|
||||
export namespace resolveSoa {
|
||||
export function __promisify__(hostname: string): Promise<SoaRecord>;
|
||||
}
|
||||
|
||||
export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
||||
export namespace resolveSrv {
|
||||
export function __promisify__(hostname: string): Promise<SrvRecord[]>;
|
||||
}
|
||||
|
||||
export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
||||
export namespace resolveTxt {
|
||||
export function __promisify__(hostname: string): Promise<string[][]>;
|
||||
}
|
||||
|
||||
export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: AnyRecord[]) => void): void;
|
||||
export namespace resolveAny {
|
||||
export function __promisify__(hostname: string): Promise<AnyRecord[]>;
|
||||
}
|
||||
|
||||
export function reverse(ip: string, callback: (err: NodeJS.ErrnoException, hostnames: string[]) => void): void;
|
||||
export function setServers(servers: string[]): void;
|
||||
|
||||
97
types/node/v9/index.d.ts
vendored
97
types/node/v9/index.d.ts
vendored
@@ -2547,11 +2547,23 @@ declare module "dns" {
|
||||
ttl: number;
|
||||
}
|
||||
|
||||
export interface AnyARecord extends RecordWithTtl {
|
||||
type: "A";
|
||||
}
|
||||
|
||||
export interface AnyAaaaRecord extends RecordWithTtl {
|
||||
type: "AAAA";
|
||||
}
|
||||
|
||||
export interface MxRecord {
|
||||
priority: number;
|
||||
exchange: string;
|
||||
}
|
||||
|
||||
export interface AnyMxRecord extends MxRecord {
|
||||
type: "MX";
|
||||
}
|
||||
|
||||
export interface NaptrRecord {
|
||||
flags: string;
|
||||
service: string;
|
||||
@@ -2561,6 +2573,10 @@ declare module "dns" {
|
||||
preference: number;
|
||||
}
|
||||
|
||||
export interface AnyNaptrRecord extends NaptrRecord {
|
||||
type: "NAPTR";
|
||||
}
|
||||
|
||||
export interface SoaRecord {
|
||||
nsname: string;
|
||||
hostmaster: string;
|
||||
@@ -2571,6 +2587,10 @@ declare module "dns" {
|
||||
minttl: number;
|
||||
}
|
||||
|
||||
export interface AnySoaRecord extends SoaRecord {
|
||||
type: "SOA";
|
||||
}
|
||||
|
||||
export interface SrvRecord {
|
||||
priority: number;
|
||||
weight: number;
|
||||
@@ -2578,9 +2598,45 @@ declare module "dns" {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface AnySrvRecord extends SrvRecord {
|
||||
type: "SRV";
|
||||
}
|
||||
|
||||
export interface AnyTxtRecord {
|
||||
type: "TXT";
|
||||
entries: string[];
|
||||
}
|
||||
|
||||
export interface AnyNsRecord {
|
||||
type: "NS";
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface AnyPtrRecord {
|
||||
type: "PTR";
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface AnyCnameRecord {
|
||||
type: "CNAME";
|
||||
value: string;
|
||||
}
|
||||
|
||||
export type AnyRecord = AnyARecord |
|
||||
AnyAaaaRecord |
|
||||
AnyCnameRecord |
|
||||
AnyMxRecord |
|
||||
AnyNaptrRecord |
|
||||
AnyNsRecord |
|
||||
AnyPtrRecord |
|
||||
AnySoaRecord |
|
||||
AnySrvRecord |
|
||||
AnyTxtRecord;
|
||||
|
||||
export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException, addresses: AnyRecord[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
||||
@@ -2589,17 +2645,18 @@ declare module "dns" {
|
||||
export function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException, addresses: SoaRecord) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][]) => void): void;
|
||||
export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void): void;
|
||||
|
||||
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
||||
export namespace resolve {
|
||||
export function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
|
||||
export function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
|
||||
export function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
|
||||
export function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
|
||||
export function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
|
||||
export function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
|
||||
export function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
|
||||
export function __promisify__(hostname: string, rrtype?: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][]>;
|
||||
export function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
|
||||
}
|
||||
|
||||
export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
@@ -2625,13 +2682,49 @@ declare module "dns" {
|
||||
}
|
||||
|
||||
export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export namespace resolveCname {
|
||||
export function __promisify__(hostname: string): Promise<string[]>;
|
||||
}
|
||||
|
||||
export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
||||
export namespace resolveMx {
|
||||
export function __promisify__(hostname: string): Promise<MxRecord[]>;
|
||||
}
|
||||
|
||||
export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
||||
export namespace resolveNaptr {
|
||||
export function __promisify__(hostname: string): Promise<NaptrRecord[]>;
|
||||
}
|
||||
|
||||
export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export namespace resolveNs {
|
||||
export function __promisify__(hostname: string): Promise<string[]>;
|
||||
}
|
||||
|
||||
export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
||||
export namespace resolvePtr {
|
||||
export function __promisify__(hostname: string): Promise<string[]>;
|
||||
}
|
||||
|
||||
export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException, address: SoaRecord) => void): void;
|
||||
export namespace resolveSoa {
|
||||
export function __promisify__(hostname: string): Promise<SoaRecord>;
|
||||
}
|
||||
|
||||
export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
||||
export namespace resolveSrv {
|
||||
export function __promisify__(hostname: string): Promise<SrvRecord[]>;
|
||||
}
|
||||
|
||||
export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
||||
export namespace resolveTxt {
|
||||
export function __promisify__(hostname: string): Promise<string[][]>;
|
||||
}
|
||||
|
||||
export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: AnyRecord[]) => void): void;
|
||||
export namespace resolveAny {
|
||||
export function __promisify__(hostname: string): Promise<AnyRecord[]>;
|
||||
}
|
||||
|
||||
export function reverse(ip: string, callback: (err: NodeJS.ErrnoException, hostnames: string[]) => void): void;
|
||||
export function setServers(servers: string[]): void;
|
||||
|
||||
Reference in New Issue
Block a user