libresolver/src/types.ts

30 lines
457 B
TypeScript
Raw Permalink Normal View History

2022-08-18 14:49:10 +00:00
export interface ResolverOptions {
2022-08-18 15:13:49 +00:00
type: string;
2022-08-18 14:49:10 +00:00
customType?: string;
2022-08-18 15:11:53 +00:00
options?: any;
2022-08-18 14:49:10 +00:00
}
export interface DNSResult {
records: DNSRecord[];
2022-08-18 14:49:10 +00:00
error?: Error;
}
export interface DNSRecord {
type: string;
customType?: string;
value: string;
}
const DNS_RECORD_TYPE = {
A: "A",
CNAME: "CNAME",
NS: "NS",
CONTENT: "CONTENT",
TEXT: "TEXT",
ALL: "ALL",
CUSTOM: "CUSTOM",
};
Object.freeze(DNS_RECORD_TYPE);
export { DNS_RECORD_TYPE };