mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
feat(ext/net): add CAA
DNS record support in Deno.resolveDns() API (#14624)
This commit is contained in:
parent
eb5ffab1cb
commit
10a68a5635
5 changed files with 90 additions and 14 deletions
15
cli/dts/lib.deno.ns.d.ts
vendored
15
cli/dts/lib.deno.ns.d.ts
vendored
|
@ -2953,6 +2953,7 @@ declare namespace Deno {
|
|||
| "A"
|
||||
| "AAAA"
|
||||
| "ANAME"
|
||||
| "CAA"
|
||||
| "CNAME"
|
||||
| "MX"
|
||||
| "NAPTR"
|
||||
|
@ -2974,6 +2975,13 @@ declare namespace Deno {
|
|||
};
|
||||
}
|
||||
|
||||
/** If `resolveDns` is called with "CAA" record type specified, it will return an array of this interface. */
|
||||
export interface CAARecord {
|
||||
critical: boolean;
|
||||
tag: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
/** If `resolveDns` is called with "MX" record type specified, it will return an array of this interface. */
|
||||
export interface MXRecord {
|
||||
preference: number;
|
||||
|
@ -3015,6 +3023,12 @@ declare namespace Deno {
|
|||
options?: ResolveDnsOptions,
|
||||
): Promise<string[]>;
|
||||
|
||||
export function resolveDns(
|
||||
query: string,
|
||||
recordType: "CAA",
|
||||
options?: ResolveDnsOptions,
|
||||
): Promise<CAARecord[]>;
|
||||
|
||||
export function resolveDns(
|
||||
query: string,
|
||||
recordType: "MX",
|
||||
|
@ -3068,6 +3082,7 @@ declare namespace Deno {
|
|||
options?: ResolveDnsOptions,
|
||||
): Promise<
|
||||
| string[]
|
||||
| CAARecord[]
|
||||
| MXRecord[]
|
||||
| NAPTRRecord[]
|
||||
| SOARecord[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue