*Duplicate ResolverModule interface for the kernel since resolver will load the dns client
This commit is contained in:
parent
1b50865939
commit
2bd13bb71b
12
src/index.ts
12
src/index.ts
|
@ -7,12 +7,22 @@ import type {
|
||||||
import { DNS_RECORD_TYPE } from "@lumeweb/libresolver";
|
import { DNS_RECORD_TYPE } from "@lumeweb/libresolver";
|
||||||
import { dnsClient } from "./client.js";
|
import { dnsClient } from "./client.js";
|
||||||
import { DnsClient } from "@lumeweb/kernel-dns-client";
|
import { DnsClient } from "@lumeweb/kernel-dns-client";
|
||||||
|
import { ResolverOptions } from "@lumeweb/libresolver/src/types.js";
|
||||||
|
|
||||||
let resolver: ResolverModule;
|
let resolver: ResolverModule;
|
||||||
|
|
||||||
interface ResolverModule extends ResolverModuleBase {
|
export interface ResolverModule {
|
||||||
get resolver(): DnsClient;
|
get resolver(): DnsClient;
|
||||||
set resolver(value: 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) {
|
export function setup(rm: ResolverModule) {
|
||||||
|
|
Loading…
Reference in New Issue