From 2bd13bb71b3f20d09dacc8684ea24d6a461fe7e7 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 19 Feb 2023 20:39:29 -0500 Subject: [PATCH] *Duplicate ResolverModule interface for the kernel since resolver will load the dns client --- src/index.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index bad382b..7e66afb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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; + + getSupportedTlds(): string[]; + getSupportedTlds(): Promise; + getSupportedTlds(): any; } export function setup(rm: ResolverModule) {