*Duplicate ResolverModule interface for the kernel since resolver will load the dns client

This commit is contained in:
Derrick Hammer 2023-02-19 20:39:29 -05:00
parent 1b50865939
commit 2bd13bb71b
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 11 additions and 1 deletions

View File

@ -7,12 +7,22 @@ import type {
import { DNS_RECORD_TYPE } from "@lumeweb/libresolver";
import { dnsClient } from "./client.js";
import { DnsClient } from "@lumeweb/kernel-dns-client";
import { ResolverOptions } from "@lumeweb/libresolver/src/types.js";
let resolver: ResolverModule;
interface ResolverModule extends ResolverModuleBase {
export interface ResolverModule {
get resolver(): DnsClient;
set resolver(value: DnsClient);
resolve(
domain: string,
options: ResolverOptions,
bypassCache: boolean
): Promise<DNSResult>;
getSupportedTlds(): string[];
getSupportedTlds(): Promise<string[]>;
getSupportedTlds(): any;
}
export function setup(rm: ResolverModule) {