*Change types so setup doesnt throw an error
*ts-ignore setting resolver
This commit is contained in:
parent
6f6a79599c
commit
69bb1f7c60
|
@ -9,7 +9,7 @@ import { dnsClient } from "./client.js";
|
|||
import { DnsClient } from "@lumeweb/kernel-dns-client";
|
||||
import { ResolverOptions } from "@lumeweb/libresolver/src/types.js";
|
||||
|
||||
let resolver: ResolverModule;
|
||||
let resolver: ResolverModule | ResolverModuleBase;
|
||||
|
||||
export interface ResolverModule {
|
||||
get resolver(): DnsClient;
|
||||
|
@ -25,12 +25,13 @@ export interface ResolverModule {
|
|||
getSupportedTlds(): any;
|
||||
}
|
||||
|
||||
export function setup(rm: ResolverModule) {
|
||||
export function setup(rm: ResolverModule | ResolverModuleBase) {
|
||||
addHandler("resolve", handleResolve);
|
||||
addHandler("register", handleRegister);
|
||||
addHandler("getSupportedTlds", handleGetSupportedTlds);
|
||||
onmessage = handleMessage;
|
||||
resolver = rm;
|
||||
// @ts-ignore
|
||||
resolver.resolver = dnsClient;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue