From c9e9265c3eea93cd6006546a70f3552a41718944 Mon Sep 17 00:00:00 2001 From: Craig Morten Date: Sun, 15 May 2022 16:42:02 +0100 Subject: feat(ext/net): support NAPTR records in Deno.resolveDns() API (#14613) --- cli/dts/lib.deno.ns.d.ts | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'cli/dts/lib.deno.ns.d.ts') diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index 8ed0ab83e..3777aa56b 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -2955,6 +2955,7 @@ declare namespace Deno { | "ANAME" | "CNAME" | "MX" + | "NAPTR" | "NS" | "PTR" | "SOA" @@ -2979,6 +2980,16 @@ declare namespace Deno { exchange: string; } + /** If `resolveDns` is called with "NAPTR" record type specified, it will return an array of this interface. */ + export interface NAPTRRecord { + order: number; + preference: number; + flags: string; + services: string; + regexp: string; + replacement: string; + } + /** If `resolveDns` is called with "SOA" record type specified, it will return an array of this interface. */ export interface SOARecord { mname: string; @@ -3010,6 +3021,12 @@ declare namespace Deno { options?: ResolveDnsOptions, ): Promise; + export function resolveDns( + query: string, + recordType: "NAPTR", + options?: ResolveDnsOptions, + ): Promise; + export function resolveDns( query: string, recordType: "SOA", @@ -3049,5 +3066,12 @@ declare namespace Deno { query: string, recordType: RecordType, options?: ResolveDnsOptions, - ): Promise; + ): Promise< + | string[] + | MXRecord[] + | NAPTRRecord[] + | SOARecord[] + | SRVRecord[] + | string[][] + >; } -- cgit v1.2.3